Operational Transformation in Meteor.js?

前端 未结 2 1479
醉梦人生
醉梦人生 2021-01-04 18:59

Does Meteor.js support Operational Transformation yet?

I\'m working on a project which is some what related to Etherpad for which I thought of usi

相关标签:
2条回答
  • 2021-01-04 19:28

    After seeing several Meteor projects make use of OT (i.e. http://cocodojo.meteor.com/), I decided to go for a proper integration.

    I've created a smart package to integrate ShareJS into meteor. Please come check it out and add your pull requests: https://github.com/mizzao/meteor-sharejs

    Demo App: http://documents.meteor.com

    0 讨论(0)
  • 2021-01-04 19:28

    An in-browser collaborative text editor has two major components: the text area itself, which must behave well in coordinating the user's typing with other edits that are received from the server; and the data model for sending, receiving, and combining these edits.

    Meteor today doesn't provide special help for either of these things specifically, but it does provide real-time data transport, and a way to move data automatically between the client and server.

    If I were to implement EtherPad on Meteor, I've always imagined I would use a collection as an "operation log". User changes would be sent to the server, where they would be appended to the official log of operations (basically diffs) which would automatically stream to all clients. The client would have the work of applying diffs that come in and reconciling them with typing that hasn't been acknowledged by the server yet.

    It's a tough implementation challenge. Good luck!

    0 讨论(0)
提交回复
热议问题