News for hackers. Stuff that matters.
Re:Playing with Lasp and CRDTs by rdtsc on Tuesday January 02, 2018 @02:56AM (#16050551)
It's a bit of a silly tagline.

The idea with CRDT is to define some data structures and operations on them so that it's possible to update the data structure in a concurrent environment with potentially conflicting updates which then end up being merged automatically.

For example, take a set and the operation of updating it. Say I am in Australia and you are in US and we are trying to operate on a shared set S. We both have local versions of it on our servers and our servers replicate with each other.

Maybe I add an item x to it and you pretty much at the same time add an item y. For a short while my version of the set will be S={x}, yours will be S={y}. Then after say 250 msec I'll see your changes and you'll see my changes we'd both have S={x,y}.

Notice how time didn't really figure out in the operation, and the order didn't matter -- you could have updated your version first or I could have updated mine first, but we'd both end up with the same result. And even better, we didn't have to manually resolve a conflict. Also you could have been on Neptune and I could have been on Mercury, it would have still worked but taken longer to replicate, maybe 6 hours or something like that.

PS: Mathematically this is related to https://en.wikipedia.org/wiki/Semilattice

There are no comments on this comment yet.