操作转换库? [英] Operational Transformation library?

查看:20
本文介绍了操作转换库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm looking for a library that would allow me to synchronize text in real-time between multiple users (ala Google Docs).

我偶然发现了运营转型,它似乎符合我的需求.话虽如此,我了解 OT 的要点,但不了解 OT 的数学和实现.

I've stumbled upon Operational Transformation, which seems to fit my needs. Having said that, I understand the gist of OT, but not the math nor implementation of OT.

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

Thus, I was wondering if there was a drag'n'drop Javascript library that would hook into a text area, generate the transforms, then allow me to apply those transformations onto another client?

(我已经获得了 Etherpad 的源代码,但我无法从中得出结论.如果有人能指出如何利用 Etherpad 的 OT 实现,那也太棒了!)

(I've gotten the Etherpad source, but I can't make head or tails out of it. If anyone could point out how to leverage on Etherpad's OT implementation, that'll be great too!)

推荐答案

我认为 Google Wave 的 OT 实现的部分内容是开源的(而且更多部分即将推出).

I think that parts of Google Wave's OT implementation are Open Source (and more parts are coming).

我不确定这是否是您要查找的内容,但 OT 的替代方法是 Differential同步:

I'm not sure if this is what you are looking for, but an alternative to OT is Differential Synchronization:

  • Google-Diff-Match-Patch - Diff, Match and Patch libraries for Plain Text: "The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text."
  • Google-MobWrite - Real-time Synchronization and Collaboration Service: "MobWrite converts forms and web applications into collaborative environments. Create a simple single-user system, add one line of JavaScript, and instantly get a collaborative system." (Uses Google-Diff-Match-Patch.)

这篇关于操作转换库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆