Martin Kleppmann
Martin Kleppmann
There is one simple (and reasonably efficient) way how ephemeral updates can be implemented today, without any API changes. Every client creates two Automerge instances for every document, rather than...
At any time you can do `Automerge.free(ephemeral); ephemeral = Automerge.clone(persistent)`, which will throw away the state and history of the ephemeral document. (The freeing is only needed if using the...
That's correct — sorry, I should have made that clear. In 0.x versions you can clone with `epemeral = Automerge.merge(Automerge.init(), persistent)`.
The freeing can happen whenever the ephemeral document is cloned from the persistent one. When to clone, though? After every persistent change, maybe? But then there might be concurrent ephemeral...
Hi @echarles! There is no Automerge server, since Automerge is a client-only library. It can be used with any one of a range of different server or peer-to-peer implementations, as...
You certainly can treat the server as another actor if you want, but if only the clients are going to make edits, then this would be more complicated than necessary....
No problem, good luck and please let us know how you get on! > What is the goal of the backend folder in the source tree? Automerge is split into...
Interesting case. Can I restate it to see if I understood it correctly? Peer A is syncing with peer B, and you want to ensure that changes can only flow...
Oops, sorry, that should have been `parsedMsg.changes.length === 0`.
@raphael10-collab Hopefully @pvh can help you with the automerge-demo. Hi @corwin-of-amber, you can look at the [tests](https://github.com/automerge/automerge/blob/main/test/sync_test.js) and the [sync protocol docs](https://github.com/automerge/automerge/blob/main/SYNC.md) for some self-contained examples. > Also, Connection used...