Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Google Wave did something like this. What protocol did they use to update JSON, and is it modular and can stand on its own, without all the other Wave stuff? Does anyone know what its features and drawbacks were?


I'll help you, but you should know that what they do is nothing like that. They used Operational Transformation. They have convergent properties which guarantee that you won't ever have merge conflicts. They also have, depending on the implementation, certain causality guarantees that ensure that what you edited stays the way you intended.

The basic idea is that you receive operations that modify your local operations. The challenge is in writing the function that takes each two operations and mutates them. Therefore, the protocol is of no practical interest, it simply serves that function's purpose.

Here's a set of libraries that implement this for strings: https://github.com/Operational-Transformation

Implementing this for JSON is certainly possible, and has been done. See this for instance: https://github.com/share/ShareJS




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: