How Yjs works from the inside out <a href="https://www.youtube.com/watch?v=0l5XgnQ6rB4" rel="nofollow">https://www.youtube.com/watch?v=0l5XgnQ6rB4</a>
I really love Automerge, had some fun in the last months with building some small experiment. Some major problem I see currently is the lacking ecosystem.<p>I had to roll my own persistence implementation on top of IndexedDB and I still haven’t touched the backend synchronization part.<p>I would love to see Y.js or Automerge more throughly supported by a wider ecosystem of elements that make building a production app easier.
Main takeaways from toying with both Yjs and Automerge:<p>1. Extremely difficult to build backend in other programming languages than Nodejs<p>Rust implementations
<a href="https://github.com/automerge/automerge-rs" rel="nofollow">https://github.com/automerge/automerge-rs</a>
<a href="https://github.com/yjs/y-crdt" rel="nofollow">https://github.com/yjs/y-crdt</a><p>You will cry looking at source code
<a href="https://github.com/yjs/y-crdt/blob/main/yffi/src/lib.rs" rel="nofollow">https://github.com/yjs/y-crdt/blob/main/yffi/src/lib.rs</a><p>C-binding, FFI, etc<p>2. Both communities are great. Before committing recommend to go through issues and discussions<p>Yjs forum
<a href="https://discuss.yjs.dev/" rel="nofollow">https://discuss.yjs.dev/</a><p>Automerge Slack
<a href="https://join.slack.com/t/automerge/shared_invite/zt-e4p3760n-kKh7r3KRH1YwwNfiZM8ktw" rel="nofollow">https://join.slack.com/t/automerge/shared_invite/zt-e4p3760n...</a><p>3. Watch out implementations of underline libraries. Trace lib0 libraries usage and internals in Yjs for example<p><a href="https://github.com/yjs/yjs/blob/7bd764fba73fecb8bacd1eb82a4bd7c9e15a33ee/src/utils/ID.js" rel="nofollow">https://github.com/yjs/yjs/blob/7bd764fba73fecb8bacd1eb82a4b...</a>
<a href="https://github.com/dmonad/lib0" rel="nofollow">https://github.com/dmonad/lib0</a><p>JavaScript engines use UTF-16 encoding. Golang (my main backend language) is using UTF-8 ... reimplementing Yjs code in Golang with algorithms and optimization and futher scaling might become impossible for small startups.<p>Build parallels with Automerge<p>4. Rich editing similar to Google Doc is very very complicated subject with lot of landmines<p>BitPhinix seems making a progress on updated example
<a href="https://github.com/BitPhinix/slate-yjs/tree/next" rel="nofollow">https://github.com/BitPhinix/slate-yjs/tree/next</a><p>However there is a surprise waiting for you on backend
<a href="https://github.com/BitPhinix/slate-yjs/blob/next/examples/backend/package.json" rel="nofollow">https://github.com/BitPhinix/slate-yjs/blob/next/examples/ba...</a><p>See "@hocuspocus/server"
<a href="https://tiptap.dev/hocuspocus/" rel="nofollow">https://tiptap.dev/hocuspocus/</a><p>5. There's ProseMirror editor for collaborative editing. However you might not like its internals compare to Slatejs (which is far from perfect and lot of people rely on hard forks)<p>Feel free to ping me on Telegram @reactima if you are committed to build something similar to Notion.so or thinking to add collaborating editing with Slatejs and Reactjs.
I'm really curious how other people plans to live with Yjs and Automerge impressive foundation.
One sort of issue is that this only directly supports documents/DAGs, so representing many-to-many relationships is a bit iffy. This is similar to how Rust can't directly represent cyclic data structures.<p>It's not a <i>huge</i> deal, because working with indices works well enough, but it is a bit annoying.