操作转换库? [英] Operational Transformation library?
问题描述
我正在寻找一个可以让我在多个用户(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 和 Patch 库提供了强大的算法来执行同步纯文本所需的操作."
- Google-MobWrite - 实时同步和协作服务:MobWrite 转换表单并将 Web 应用程序整合到协作环境中.创建一个简单的单用户系统,添加一行 JavaScript,即可立即获得一个协作系统."(使用 Google-Diff-Match-Patch.)
- 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屋!