Automerge: A library of data structures for building collaborative applications

原始链接: https://automerge.org/

讨论了两个同时维护的用于协作编辑的开源库,Yjs 和 Automerge。 两者都是由才华横溢的个人创建的:Kevin Jahns 主要单独开发 Yjs,而著名学者 Martin Kleppmann 领导 Automerge 的开发。 尽管它们有着相似的目标,但它们的功能略有不同: * **Yjs**:这个基于 JavaScript 的轻量级库专注于为文档版本控制提供多个检查点选项,而不存储完整的修订历史记录。 然而,其 Rust 版本 (Yrs) 尽管由社区资助,但执行速度至少比 JavaScript 版本慢五倍。 * **Automerge**:使用 Rust 开发,兼容 WebAssembly,该库完整记录对文档所做的每个更改。 因此,已删除的内容在系统中仍然可以永久访问,尽管与较大文本的 Yjs 相比,其代价是增加存储空间和降低性能。 尽管存在这些限制,但据报道,Automerge 背后的专门团队正在努力提高效率和速度。 这两种解决方案都对该领域做出了宝贵的贡献,提供了独特的优势和潜在的改进领域。 人们寻求诸如“用于本地优先应用程序的 SQLite”之类的全面解决方案,以进一步简化跨平台实时协作和数据同步的过程。 对于那些对速度优先于复杂性感兴趣的人来说,还有其他更快、基于测试的 CRDT。 一个值得注意的替代方案是 Cola,与 Yjs 和 Automerge 相比,它表现出了卓越的性能。
相关文章

原文

Build local-first software

Automerge is a library of data structures for building collaborative applications.

Automatic merging

Automerge is a Conflict-Free Replicated Data Type (CRDT), which allows concurrent changes on different devices to be merged automatically without requiring any central server.

Network-agnostic

Use any connection-oriented network protocol: client-server, peer-to-peer, or local. Or use unidirectional messaging: send an Automerge file as an email attachment or store it on a file server.

Portable

Implemented in JavaScript and Rust, with FFI bindings across platforms including iOS, Electron, Chrome, Safari, Edge, Firefox, and more.

联系我们 contact @ memedata.com