You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the great work. This is more of a question. I started playing with the lib and discovered that the webSocket server plays a central role. As Automerge is pitched as a "serverless" solution compared to OT, I'm trying to figure out how a serverless slate-collaborative could look like.
Right now, the server is responsible for the initial coordination. When clients connect to it. It creates an Automerge doc out of a Slate Value, creates an Automerge connection, then sets the doc with setDoc. setDoc (on the server) fires an operation message with the initial Clock. Doing so, it's guaranteed that clients starts off the same clock. (correct me if I'm wrong)
In a serverless world, let's say we use PubSub to send and subscribe to operations, how could we possibly start off the same clock? Clients need to run setDoc but, by doing so, they send different initial clocks to each other.
Is it impossible to achieve this setup?
Thank you
The text was updated successfully, but these errors were encountered:
Thank you for your interest to slate-collaborative
Good question!
I think it is definitely possible to implement peer-to-peer synchronization between clients. I currently don't have an example for this case, but you could use withAutomerge from @slate-collaborative/client to create a sync wrapper with your own transport layer logic.
If you have any more questions, I will be happy to answer you
Hi, @cudr,
Sorry for not replying sooner. I'll definitely give it a try and let you know. The separation of concern you did: Automerge without the transport logic makes it easy. Thank you!
Thank you for the great work. This is more of a question. I started playing with the lib and discovered that the webSocket server plays a central role. As Automerge is pitched as a "serverless" solution compared to OT, I'm trying to figure out how a serverless slate-collaborative could look like.
Right now, the server is responsible for the initial coordination. When clients connect to it. It creates an Automerge doc out of a Slate Value, creates an Automerge connection, then sets the doc with
setDoc
.setDoc
(on the server) fires an operation message with the initial Clock. Doing so, it's guaranteed that clients starts off the same clock. (correct me if I'm wrong)In a serverless world, let's say we use PubSub to send and subscribe to operations, how could we possibly start off the same clock? Clients need to run
setDoc
but, by doing so, they send different initial clocks to each other.Is it impossible to achieve this setup?
Thank you
The text was updated successfully, but these errors were encountered: