Collaboration with non-js backend

Hey there,

I am implementing a simple collaborative editor with CodeMirror 6 for company internal purposes. The client side seems to be done, websocket connections have been set up for user presence and language changes (updating the editor language for all peers when changed).

Now it’s time for the big one: Merging the documents of all peers. I have read the examples and looked at example code but all examples expect a JS backend (Well at least the examples use functions and structures from @codemirror/collab, which is a node package).

I understand that CodeMirror may not have the time to create backend-collaboration-sdks for every language, but is there some kind of list of community packages for that? Every example I find always requires a node backend, since everyone is using @codemirror/collab because they can work with the ChangeSet-class for example.

So when using a Rust, Python, PHP, Go or whatever backend, the logic from the @codemirror/collab package (which is used in the backend examples) needs to be implemented by ourselves, correct?

Just asking in case we start to implement it and then find a “codemirror-collab-adaptors” repository for different languages after we built it :smiley:

Thanks in advance

I’m not aware of any implementations in languages other than JS, so far. But the model is pretty simple and such an implementation, especially if you use a simplified form of the document data structure (such as a big string or an array of lines), could be pretty straightforward.