🚀 𝗗𝘂𝗯𝗵𝗲 𝗘𝗻𝗴𝗶𝗻𝗲 𝗘𝘅𝗲𝗰𝘂𝘁𝗶𝗼𝗻 𝗠𝗼𝗱𝗲𝗹
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

1.19万
168
本页面内容由第三方提供。除非另有说明,欧易不是所引用文章的作者,也不对此类材料主张任何版权。该内容仅供参考,并不代表欧易观点,不作为任何形式的认可,也不应被视为投资建议或购买或出售数字资产的招揽。在使用生成式人工智能提供摘要或其他信息的情况下,此类人工智能生成的内容可能不准确或不一致。请阅读链接文章,了解更多详情和信息。欧易不对第三方网站上的内容负责。包含稳定币、NFTs 等在内的数字资产涉及较高程度的风险,其价值可能会产生较大波动。请根据自身财务状况,仔细考虑交易或持有数字资产是否适合您。

