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 想法

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,





(别通知) (可选) 请,登录

使用用于任意文本的 CRDT,您可以将两个独立的更改合并到任意文本字段,因此不需要 git 合并过程。

这篇文章描述了任意文本的 CRDTs 的速度有多快 https://josephg.com/blog/crdts-go-brrr/

这有点像 Google 文档同步或 Etherpad。两个用户可以修改同一个文档,并且可以毫无问题地合并它们。我们可以对记录中的每个字段执行此操作。所以我们可以有许多 CRDT 代表的 0oo 类别或想法。

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.


事件溯源系统的一个逆转是在减少数据时简单地排除一个条目

每个更改都是事件历史中的一个单独版本。您对历史进行归约以获得最终值。

要排除骗局或退款,您只需排除不良交易。当然,您需要其他用户信任您的排除,然后这将成为记录系统。

当前状态/值 = 减少(到目前为止的所有事件 - 排除的事件或排除的参与者)

只要用户信任同一组事件,用户就会得到相同的答案。其中 answer 是数据库中某个字段的当前值或分类帐中某人帐户的余额。

如果我可以对交易提出异议——比如我没有收到支付的服务,我可以说我的付款没有兑现,然后如果我能让别人信任我,我的钱就会被退回。我只需要别人信任我。

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.


似乎涉及对某些中央权威的信任。会有一个仲裁员,我们会再次受到审判并被欺骗。我们受够了。

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.


没有中央权威的信任。您必须分别信任每个用户的事件。

如果你看到一个你不信任的用户,你就禁止他们,然后忽略他们未来和历史上的交易。

每个人都必须维护自己的禁令清单。

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.