-
Notifications
You must be signed in to change notification settings - Fork 44
Understanding conflict resolution #107
Comments
The guarentee isn't that a node will recive the data in the same order, it is that two nodes will eventually have the same state regardless of the order they recive the data. |
but how is it proved that they will have the same state? |
Hi @gasparyanyur . Thanks for your patience in waiting for me to get back to you. @phillmac is right. It's a lot less about when the events are written to the log then it is about how they are processed to create the state of the database. This is accomplished using something called a Lamport Clock, where the "time" of each value is a tuple. The tuple contains the ID of the node, as well as a a monotonically increasing integer value for each write, i.e. 1 2 3 4 5, etc. Let's step through your example:
A great place to dive in deep and learn more are the automated tests inside IPFS-log. All of them are instructive on this topic |
@gasparyanyur Just checking in here again, is the above explanation satisfactory? |
Hi all :)
Today I read that in OrbitDb documentation speaks about the problem of consistency. And also I read somewhere that the orbitdb guarantee that all peers in p2p network at one moment in time will receive the same data in the same order. In fact, this is a good argument to implement many great projects based on orbits. But there is one problem that I can’t solve at all.
On what basis does the orbit guarantee that all nodes in a peer-to-peer network will receive the same data at the same time in the same order?
The text was updated successfully, but these errors were encountered: