News.EOS.WiKi Bilingual News & Info Of EOS

引进EOSIO区块链链下验证的解复用确定性数据库/Introducing Demux — Deterministic Databases Off-Chain Verified by the EOSIO Blockchain




该建议性构架允许应用开发人员在使用传统Mongo或Postgres SQL数据库时,让数据储存在库中,但仍可被区块链验证。这样就可以实现两全其美:获得传统数据的灵活性和速度,同时伴有区块链的信赖和不可变属性。



  1. 用以检索索引数据的查询界面有限。复杂的数据要求可能意味着您必须在DAPP中进行多次查询并处理数据,或者您必须将附加的分类数据储存在区块链自身身上。
  2. 此外,扩展查询负载意味着需要更多区块链端点节点,花费昂贵。


可在官方Github资源库中查看该版本完整详情。示例库 demux-js 作为Demux构架NodeJS执行的参考。

开发者关系团队(Developer Relations)将为您持续更新,为您重点介绍Block.one的开发团队为优化EOSIO开发者体验,正努力研发的功能。请在社交渠道持续关注EOSIO,继续关注更多更新内容,请在EOSIO开发者门户订阅我们的邮件清单。




One of the primary advantages of the EOSIO blockchain platform is in empowering the development of usable, scalable, and flexible decentralized applications. To that end, we at are excited to announce Demux, a new open-source development tool for the EOSIO community that simplifies complex DAPP development.

Demux draws inspiration from Facebook’s Flux Architecture pattern and Redux, creating a back-end infrastructure pattern for sourcing blockchain events in order to deterministically update queryable databases for applications built on the EOSIO blockchain.

This suggested architecture allows application developers to use traditional Mongo or Postgres SQL databases in a way that means the data stored in them is still verifiable by the blockchain. This enables the best of both worlds: the flexibility and speed of traditional databases, coupled with the trust and immutable properties of a blockchain.

Storing and retrieving indexed data is something that developers have commonly utilized for decades. The ability to search, sort, filter etc. are all easily done in traditional database environments, but is something that is missed when working directly with the inherently limited query interface of blockchain nodes.

When building more complex DAPPs, you run into a few problems when retrieving data directly from the blockchain:

  1. The query interface used to retrieve the indexed data is limited. Complex data requirements can mean you either have to make an excess number of queries and process the data in your DAPP, or you must store additional sorted data on the blockchain itself.
  2. Additionally, scaling your query load means requiring more blockchain endpoint nodes, which can be expensive.

Demux solves these problems by off-loading storage and queries to your preferred database (MongoDB, Postgres etc). As blockchain events happen, your chosen database is updated by Updater functions, which deterministically process an array of Action objects. The database can then be queried by your front-end DAPP through a suitable API (for example, REST or GraphQL), reducing the amount of direct interaction with the blockchain in order to retrieve data for your application. This also can help developers to limit the amount of data that needs to be stored in RAM, lowering applications’ operating costs whilst also improving their architectural efficiency.

The full details of the release can be viewed on the official GitHub repository. The example library demux-js serves as a reference NodeJS implementation of Demux architecture.

Developer Relations will continue to bring you updates highlighting the features our development teams at are working on to improve the developer experience on EOSIO. As always, stay tuned for more updates by following EOSIO on our social channels and be sure to subscribe to our mailing list on the EOSIO Developer Portal.

Thanks, Developer Relations

Read disclaimer

原文链接/Original URL:

About the author

By user
News.EOS.WiKi Bilingual News & Info Of EOS

Recent Posts