Hacker News new | past | comments | ask | show | jobs | submit login

OT is done at the document level. Documents are JSON objects of arbitrary complexity. Any mutation of the JSON object can be composed against any other mutation of the JSON object.

Firepad doesn't actually do OT of JSON. In Firepad, a string OT algorithm is used to merge text edits, and the metadata describing rich text is separately managed as span objects, which get modified in accordance with text changes.

Firebase provides conflict resolution of JSON structures using their Transaction primitive, which allows them to create a Software Transactional Memory used to update the journal that powers the text OT in Firepad. ShareJS inside of Derby uses a similar approach to allow multiple servers to access the journal, but it is done in Redis with Lua scripting.




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

Search: