我正在寻找一个库,可以让我在多个用户之间实时同步文本(ala Google Docs)。
我偶然发现了Operational Transformation,它似乎符合我的需求。话虽如此,我理解OT的要点,但不理解OT的数学和实现。
因此,我想知道是否有一个拖放Javascript库可以挂接到文本区域,生成转换,然后允许我将这些转换应用到另一个客户端上?
(我已经得到了Etherpad的源代码,但是我不能理解它。如果有人能指出如何利用Etherpad的OT实现,那就太好了!)
发布于 2010-01-12 00:58:10
我认为Google Wave的OT实现的一部分是开源的(而且还会有更多的部分)。
我不确定这是否是您想要的,但是OT的替代方案是Differential Synchronization
发布于 2011-10-19 05:57:53
其中一位前Wave工程师发布了名为ShareJS的协同编辑算法的Coffeescript实现,该算法现在名为ShareDB。
发布于 2014-10-26 06:18:08
我将总结我找到的解决方案。
- Google Wave OT. The approach is based on the so called Jupiter approach.
- ShareJs. Based on the same OT algorithm as Google Wave OT.
- Coweb-jsoe. Based on COT - a very sophisticated OT approach that also supports p2p message propagation.
- OpenCoweb. It leverages OpenCoweb-jsoe in order to provide a full-fledged Framework for a lot of similar problems.
- OT.js is based on the operation-types of ShareJs.
- DriveSDK. A very interesting API that can do a lot of things - e.g. collaboration on graphs.
- SwellRT is a Fork of Apache Wave. Is is federated, and supports rich text.
- Diff-Match-Patch from Neil Fraser.
- MobWrite leverages the Diff-Match-Patch algorithm.
- There are a lot of different CRDT algorithms that allow the implementation of shared types. Some CRDTs work with P2P message propagation, some rely on client-server models
- [Yjs](https://github.com/y-js/yjs) allows you to share arbitrary data types (RichText, Array, Hash Maps, .. extendable). Offline support and support for P2P communication protocols (there are modules for XMPP, Websockets, and WebRTC)
- [SwarmJS](https://github.com/gritzko/swarm) Client server shared database with offline support. Works well with React
- [Woot](https://bitbucket.org/d6y/woot) An implementation of the Woot CRDT
- [CRDT](https://github.com/dominictarr/crdt) Another CRDT implementation
- [Automerge](https://github.com/automerge/automerge)
https://stackoverflow.com/questions/2043165
复制相似问题