Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Main takeaways from toying with both Yjs and Automerge:

1. Extremely difficult to build backend in other programming languages than Nodejs

Rust implementations https://github.com/automerge/automerge-rs https://github.com/yjs/y-crdt

You will cry looking at source code https://github.com/yjs/y-crdt/blob/main/yffi/src/lib.rs

C-binding, FFI, etc

2. Both communities are great. Before committing recommend to go through issues and discussions

Yjs forum https://discuss.yjs.dev/

Automerge Slack https://join.slack.com/t/automerge/shared_invite/zt-e4p3760n...

3. Watch out implementations of underline libraries. Trace lib0 libraries usage and internals in Yjs for example

https://github.com/yjs/yjs/blob/7bd764fba73fecb8bacd1eb82a4b... https://github.com/dmonad/lib0

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.

Build parallels with Automerge

4. Rich editing similar to Google Doc is very very complicated subject with lot of landmines

BitPhinix seems making a progress on updated example https://github.com/BitPhinix/slate-yjs/tree/next

However there is a surprise waiting for you on backend https://github.com/BitPhinix/slate-yjs/blob/next/examples/ba...

See "@hocuspocus/server" https://tiptap.dev/hocuspocus/

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)

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.



I’m a bit biased, but I think 2022 will be the year of Y.js.

What we’ve done or set up for the next year:

* The Y-Collective to fund more and more related projects, like slate-yjs: https://opencollective.com/y-collective

* The Hocuspocus backend you've discovered, which will become public in April or so

* A cloud offering we’re bootstrapping to hopefully get even more money into the ecosystem

* Y.js core support for the Tiptap editor (900k downloads/month), with a lot more advanced features coming next year

* More and more frontend libraries, like SyncedStore which was on the frontpage a few days ago: https://syncedstore.org/docs/

* The Y.js Rust port: https://github.com/yjs/y-crdt

Exciting times!


I agree with Hans, we are going to see an explosion of collaborative tools next year. And Yjs is best placed to enable them.

The ecosystem around Yjs with the Y-collective is so impressive.


CRDTs (and Y.js especially) will deliver what Google Wave promised. Not as a single unifying UI for communication, rather all existing apps can get collaborative power where it makes sense. And that is a game changer for me – as a user and developer. Exciting times indeed!


I’m biased into Yjs too and bet on it. Yjs Rust port and other simply not ready for the prime and won’t be for a while. Bindings and unsafe Rust is the road to hell


How do the performance and features of Yjs compare to Automerge?


https://github.com/dmonad/crdt-benchmarks

Not completely up to date I believe but it shows that Yjs significantly outperforms automerge.


It will depend on your use cases. Better to check updated roadmaps too. The final gap won’t be too big IMHO


> You will cry looking at source code https://github.com/yjs/y-crdt/blob/main/yffi/src/lib.rs

Am I missing something? You linked a file that is inherently going to be "un-Rusty" because it's meant to be an FFI shim for _non-Rust_ languages to use through a common C API that this file exposes.


> 4. Rich editing similar to Google Doc is very very complicated subject with lot of landmines

They (Ink & Switch) are actually working on that too, see https://www.inkandswitch.com/peritext/


Wow - you weren't kidding - the rust port is total trash. What is even going on there?


I'm one of the maintainers of this project: we're happy to hear some constructive feedback and proposals for improvements, so please don't hesitate to speak your mind at github issues: https://github.com/yjs/y-crdt/issues .

The internals are still very hot and in a state of flux, as we 1st decided to go with porting the Yjs, then leave cleaning and optimizations for 2nd step after we have something, that's compatible with existing Yjs behavior.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: