Event sourcing and CRDTs as data storage

+1  

I think event sourcing and CRDTs can be combined to provide an alternative to the blockchain for general purpose data storage

YAML Idea

I'm not particularly fond of the block chain. It functions as a distributed ledger but I think there is a simpler combination of technologies that provides a slightly different architecture for general purpose data storage.

One problem with block chain is the centralisation of miners and the proof of work is inefficient.

If you disagree with the network, you have to be a miner to change the course of transactions on the network. There are no chargebacks on Bitcoin. You cannot get money transferred to the wrong address or reverse stolen money.

You cannot 'disagree' or 'vote against' other actors in the system. Also a problem with bitcoin is the landed wealth problem. Essentially early adopters or early adopters in the case of commercial coins get the lion's share of wealth in any cryptocurrency. It's inherently unfair, like aristocratic wealth from birth. Nobody earns their bitcoins.

So this idea is to represent a ledger of transactions as both as a CRDT so that arbitrary transactions can be combined in any order from any peer. The second is that events are event sourced so the new state of the system is the product of applying a reduction function over all past events.

To disagree with the system state, you simply exclude or create reversing events to the transaction stream. This undoes previous transactions.

So if you used this event sourcing with CRDTs to indicate ownership, a community of people would have to mark other sources of information as trusted to get the final decision of the network.

This system also tracks debts automatically as balances may not reconcile. (If people decide to reverse a transaction en masse, the reversed transactions could cause a negative balance elsewhere in the system)

Event sourcing helps produce a final state in a simple CRUD app. Two users on a P2P network can edit the same field in a record and this will produce two different versions of the data. They are mergeable through CRDTs merge operator and event sourced reduction.

chronological,





(suppress notifications) (Optional) Please, log in.

Theres no trust of central authority. You have to trust each user's events individually.

If you see a user you dont trust, you ban them and that then ignores their transactions going forward AND historically.

Everybody has to maintain their own ban list.


It seems trust in some central authority is involved. There would be an arbitrator, and we would get judged again and cheated on. We had enough of that.


A reversal in an event sourcing system is to simply exclude an entry when reducing the data

Each change is a separate version in the history of events. You run a reduction over the history to get a final value.

To exclude a scam or return money you just exclude the bad transactions..Of course you need other users to trust your exclusion then that becomes the system of record.

Current state/value = reduce(all events so far - excluded events or excluded actors)

As long as users are trusting the same set of events the users will get the same answers. Where answer is the current value of a field in the database or the balance of someone's account in the ledger.

If I can dispute a transaction - like I didn't receive services paid for I can say that my payment was not honoured and then if I can get others to trust me, my money is returned for spending. I just need others to trust me.


With CRDTs for arbitrary text you can merge two independent changes to arbitrary text fields so no git merge process is necessary.

This article describes how fast CRDTs for arbitrary text can be https://josephg.com/blog/crdts-go-brrr/

It's a bit like Google docs synchronisation or Etherpad. Two users can modify the same document and they can be merged without issue. We can do this for every field in a record. So we could have 0oo category or idea represented by many CRDTs.