Demux Open-Source Off-Chain Database Tool For EOSIO dApps | Flux & Redux Architecture Inspire Back-End Infrastructure

1 min read

EOS - Demux

Simplified DAPP Development

We are very excited to introduce DEMUX – an open-source EOSIO development tool that helps simplify complex DAPP development. Being able to empower decentralized application development for usability, scalability, and flexibility is one of the main benefits of using the EOSIO blockchain platform. Simply put, deterministic off-chain databases that are verified by the EOSIO blockchain.

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.

Complex DAPPs present several problems

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.

How Demux addresses database issues

Demux solves these problems by offloading 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 for NodeJS implementation of Demux architecture.

Developer Relations will continue to bring you updates highlighting the features our development teams at is 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.

Originally Published Here


Chris Munch

Chris Munch is a professional cryptocurrency and blockchain writer with a background in software businesses, and has been involved in marketing within the cryptocurrency space. With a passion for innovation, Chris brings a unique and insightful perspective to the world of crypto and blockchain. Chris has a deep understanding of the economic, psychological, marketing and financial forces that drive the crypto market, and has made a number of accurate calls of major shifts in market trends. He is constantly researching and studying the latest trends and technologies, ensuring that he is always up-to-date on the latest developments in the industry. Chris’ writing is characterized by his ability to explain complex concepts in a clear and concise manner, making it accessible to a wide audience of readers.