Skip to content

Instantly share code, notes, and snippets.

@andriytyurnikov
Created October 10, 2023 15:30
Show Gist options
  • Save andriytyurnikov/30a4e44350ac2e1a825e5c34e0cbb9b6 to your computer and use it in GitHub Desktop.
Save andriytyurnikov/30a4e44350ac2e1a825e5c34e0cbb9b6 to your computer and use it in GitHub Desktop.
Design of systems without loss of information.

Design of information systems without loss of information

Problem: Traditional systems built on RDBMS suffer from loss of (potentially valuable) information. Information system, is a system which recieves Inputs, Transforms them somehow, and then stores derived State. It is important to highlight, that while system evolves schema of Inputs may change, code of Transformers may change, and State may change.

Solutions:

  1. Blockchains: blockchains store all Inputs, code of all Transformers, so even if they don't store all versions of State, it may be derived deterministically, with strong guarantee.
  2. Versioned databases: versioned databases (Datomic, XTDB, RDBMS with temporal tables) store all versions of the state, past and current, they ignore Inputs and Transformers totally, and achieve easy access to past state.
  3. EventSoucing: EventSoucing stores Inputs, it hopes that somebody won't change Transformes critically, and while it overwrites State, there is a some chance that old State may be recovered though, as long as Inputs were stored safely, and Transformes are not changed in some way.

Conclusion: EventSourcing is a poor man's Blockchain, it requires discipline to achieve it's promises, and while old State may be recovered, it is not accessible out of the box. It looks like Versioned databases are fundamentally superior to other approaches of building systems without loss of information.

The end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment