News for hackers. Stuff that matters.
Re:Eventual Consistency in Real-time Web Apps by josephg on Tuesday June 17, 2014 @02:28PM (#7906062)
We already have this sort of eventual consistency in Derby, built on top of ShareJS. All documents (JSON objects) can be edited synchronously in the browser, and changes are automatically replicated to all other clients.

If two people make a change to the same documents at the same time, the changes are merged in a way that will never conflict. For example if we both simultaneously insert into a list embedded in some part of the data model, derby sends a "list insert at position X" operation, which is seamlessly transformed & merged into the document at all sites. The insertion position is updated automatically before merging using the same logic that makes collaborative text editing in etherpad work. Except you can do it over the JSON structures that power your web app.

There are no comments on this comment yet.