Hi, I’m currently trying to create a collaborative editing feature for an existing desktop app (Electron based). I’m considering using Yjs for CRDT framework after see the performance comparison between this project and Automerge.
But I’m still not sure if Yjs can be used for extending the functionality of a desktop app. Is it can only be used exclusively for web-based apps? or can I Yjs for my use case? I’m still very new to this kind of collaborative feature development.
Thank you so much for your hard work on this great project
If Yjs supports the editor you are using, then you should have a really easy time. Electron as a target is fully supported.
The only catch on electron/nodejs apps is that they don’t natively support websockets. But this can easily be polyfilled: https://github.com/yjs/y-websocket/#client-code-in-nodejs
First of all thank you for your initial response,
Now I have another question about the provider, is y-websocket is the correct provider to use If I want to make P2P offline-first desktop architecture? Or should I use y-dat for the provider (but It’s still WIP based on the README page)?
Edit: Also I’m afraid I don’t understand what do you mean by editor support? For the context I’m trying to add the feature to this project (I know It’s meant to use only as an offline app, but for now I’m only trying to create a Proof of Concept)
You can use any provider. All of them work, even y-dat. It’s all about the tradeoffs that are described in their respective GitHub repositories.
You wrote about “collaborative editing” so I assumed you want to make a text editor collaborative.
Oh I am, what I meant is that I want to try If I can add a collaborative editing feature to an initially offline-only app, sorry if my explanation was unclear.
Okay I just want to assure myself, thanks a lot for your help @dmonad !