Hi @erwan, welcome.
Could you say a little more about this? Are you creating a brand-new encoding protocol or update format, or are you using the default lib0 protocol?
What is the custom save format, and why? That would help determine how deep the change is and what infrastructure changes would be required.
If you haven’t seen it already, I recommend this thread that offers some solid clues:
A custom provider needs to handle two main cases:
- Initial sync - Load from DB/network + sync with local Doc.
- Ongoing sync - Save Doc changes back to the DB/network. Also, changes from the network need to be applied to the local Doc.
A network provider is much more complicated than a storage provider since it needs to manage connections and client-server messaging. y-websocket is less than 500 lines but it is not trivial by any means.
I would recommend using an existing network provider if at all possible. (On the other hand, maybe you know what you’re doing and you just need to figure out how to apply that damn update! )