首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运营型转换库?

运营型转换库?
EN

Stack Overflow用户
提问于 2010-01-12 00:30:04
回答 14查看 33.5K关注 0票数 111

我正在寻找一个库,可以让我在多个用户之间实时同步文本(ala Google Docs)。

我偶然发现了Operational Transformation,它似乎符合我的需求。话虽如此,我理解OT的要点,但不理解OT的数学和实现。

因此,我想知道是否有一个拖放Javascript库可以挂接到文本区域,生成转换,然后允许我将这些转换应用到另一个客户端上?

(我已经得到了Etherpad的源代码,但是我不能理解它。如果有人能指出如何利用Etherpad的OT实现,那就太好了!)

EN

回答 14

Stack Overflow用户

回答已采纳

发布于 2010-01-12 00:58:10

我认为Google Wave的OT实现的一部分是开源的(而且还会有更多的部分)。

我不确定这是否是您想要的,但是OT的替代方案是Differential Synchronization

  • Google-Diff-Match-Patch - Diff, Match and Patch libraries for Plain Text:“Diff Match和Patch libraries提供强大的算法来执行同步纯text."
  • Google-MobWrite - Real-time Synchronization and Collaboration Service:所需的操作"MobWrite将表单和web应用程序转换为协作环境。创建一个简单的单用户系统,添加一行JavaScript,即可立即获得协作系统。(使用Google-Diff-Match-Patch.)
票数 59
EN

Stack Overflow用户

发布于 2011-10-19 05:57:53

其中一位前Wave工程师发布了名为ShareJS的协同编辑算法的Coffeescript实现,该算法现在名为ShareDB

票数 44
EN

Stack Overflow用户

发布于 2014-10-26 06:18:08

我将总结我找到的解决方案。

  • 运营转型:例如

代码语言:javascript
复制
- 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.

  • Differential Synchronization:

代码语言:javascript
复制
- Diff-Match-Patch from Neil Fraser.
- MobWrite leverages the Diff-Match-Patch algorithm.

  • CRDT (交换式复制数据类型):

代码语言:javascript
复制
- 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) 

票数 39
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2043165

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档