🚀 𝗗𝘂𝗯𝗵𝗲 𝗘𝗻𝗴𝗶𝗻𝗲 𝗘𝘅𝗲𝗰𝘂𝘁𝗶𝗼𝗻 𝗠𝗼𝗱𝗲𝗹
Logic and Data Decoupling Execution Flow
⚙️ In Dubhe Engine, business logic execution is completed by system modules, while state reads and writes are performed through Schema modules.
🔀 This decoupling allows developers to independently evolve logic and data structures:
🧱 When Schema structures need expansion or modification, old data can be migrated to new Schema through migration scripts (such as migrate.move) and hot upgrade mechanisms provided by Dubhe.
Business logic changes can also be implemented by publishing new system module versions without affecting underlying storage layouts.
During execution, system modules cooperate closely with Schema modules.
📦 For example, when system logic needs to create a new object instance, it actually calls Schema modules to create that object in on-chain resource storage and assign a unique key.
🔍 When system logic queries or modifies attributes, it also accesses or updates corresponding fields through functions provided by Schema.
🧩 This pattern can be compared to Entity-Component-System (ECS):
-Schema defines components (data)
-System modules play systems (logic)
-Certain on-chain object IDs are similar to entities, Mounting different components to entities through dynamic fields.
🚀 The result is higher modularity and upgradeability of on-chain state models while ensuring performance, similar to upgrading from manual low-level storage management to using high-level database ORM development experience.
@DubheEngine #DubheEngine #Sui #SmartContracts

2,98 tys.
70
Treści na tej stronie są dostarczane przez strony trzecie. O ile nie zaznaczono inaczej, OKX nie jest autorem cytowanych artykułów i nie rości sobie żadnych praw autorskich do tych materiałów. Treść jest dostarczana wyłącznie w celach informacyjnych i nie reprezentuje poglądów OKX. Nie mają one na celu jakiejkolwiek rekomendacji i nie powinny być traktowane jako porada inwestycyjna lub zachęta do zakupu lub sprzedaży aktywów cyfrowych. Treści, w zakresie w jakim jest wykorzystywana generatywna sztuczna inteligencja do dostarczania podsumowań lub innych informacji, mogą być niedokładne lub niespójne. Przeczytaj podlinkowany artykuł, aby uzyskać więcej szczegółów i informacji. OKX nie ponosi odpowiedzialności za treści hostowane na stronach osób trzecich. Posiadanie aktywów cyfrowych, w tym stablecoinów i NFT, wiąże się z wysokim stopniem ryzyka i może podlegać znacznym wahaniom. Musisz dokładnie rozważyć, czy handel lub posiadanie aktywów cyfrowych jest dla Ciebie odpowiednie w świetle Twojej sytuacji finansowej.

