Blockchain Change Management
At their core, blockchains are used to manage data and state changes on that data. The structure of this data is nearly always based on a custom-built struct within a pallet or smart contract. Applications that are built on blockchains are typically built for a specific smart contract’s data structure, and the application is highly coupled to that application. When a data structure changes, it typically requires a complex migration of existing data and source code within the smart contract as well as perhaps changes to other backend or service layers and the application itself.
For example, assume the overly simplified struct within a smart contract. Upon an approval, the amount would be sent to the account indicated.
#![allow(unused)] fn main() { pub struct Proposal { pub label: str, pub account: AccountId, pub amount: u32, } }
Then, let's say the DAO wants to add support for recurring payments. This would need to be supported within the data model by adding a time period to use as the recurring period and the total number of payments.
#![allow(unused)] fn main() { pub struct Proposal { pub title: str, pub account: AccountId, pub amount: u32, pub time_period_seconds: u32, pub payment_count: u32, } }
Depending on the blockchain, this change management event requires a series of gymnastics by developers to maintain a reasonable user experience. For example, on non-upgradable platforms, it may require clients to query from both structs, or if upgradable, may require erasing data from the original data store and recreating it (losing metadata in the process). Some may require maintaining both structures and adding a roll-up of sorts to maintain client backwards compatibility.
All of these complications create a significant change management burden on software developers.
Document Graph Solves This
Document Graph alleviates the need for developers to change their persistence layer when making upgrades to their data model.
This is achieved by supporting flexible variant pairs within a consistently structured document
type and support for an edge
type used to link the graph's documents in meaningful ways.