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

For OT to work you would need the ability to track all the changes and mirror them to the other users. React appears to have the ability to track changes, but I am unsure how easy it would be to mirror them over the network.

There's a great article here that describes how OT and other synchronization algorithms work (OT is event passing): https://neil.fraser.name/writing/sync/



React internals support being used in a web worker. It should be easy to send it via XHR.

Now, synchronizing two clients is going to be more tricky. The diff algorithm works on the virtual DOM which is the result of an arbitrary javascript execution.

So while it's certainly possible to synchronize and merge the virtual DOM. You'll need to also feed this result back to the javascript program that generates this virtual DOM. The next time you call render, it should return the new merged virtual DOM.

This would be a pretty exciting thing to be able to do, i'd love to see a demo :)




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

Search: