-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request of helpfull hints : Automerge Sync Protocol Implementation #437
Comments
I've found this |
Ah good, @raphael10-collab. I'd seen your message but wasn't at my desk over the weekend. Feel free to ping me here or on the automerge Slack with questions and I'll try to help you along. |
I'm trying to port this As starting point, I just imported in a brand new Typescript checking I'm getting these errors:
|
I too want to try the new preview version of automerge 1.0.0, and would appreciate some simple working example. I used DocSet and Connection in the past so I'm familiar with the idea. What I want to see is a single snippet where you:
Also, Connection used to know when changes occur in the document without the user having to initiate synchronization, and DocSet had a registerHandler which was most convenient for this purpose. Is there a replacement for this functionality? |
@raphael10-collab Hopefully @pvh can help you with the automerge-demo. Hi @corwin-of-amber, you can look at the tests and the sync protocol docs for some self-contained examples.
Do you want to receive a callback whenever a document changes? You can use the Observable API for this. |
Does https://github.com/pvh/automerge-demo use the latest version of Automerge? I've also been unsure about which version all the other demo projects using Automerge were using and if the API they are all using is still the most current one. |
Yes, automerge-demo is intended to show off how to use 1.0.
…On Tue, Oct 12, 2021 at 4:49 AM douira ***@***.***> wrote:
Does https://github.com/pvh/automerge-demo use the latest version of
Automerge? I've also been unsure about which version all the other demo
projects using Automerge were using and if the API they are all using is
still the most current one.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<automerge/automerge#437 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAWQC4FMPU22M7Q6AADELUGQOFDANCNFSM5FGL4XWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Peter van Hardenberg
"Everything was beautiful, and nothing hurt."—Kurt Vonnegut
|
Thanks @ept! These would be helpful pointers. I assumed the Observable API would come in handy from the name, so I will follow the examples in the tests. |
In the attempt to re-write https://github.com/cudr/slate-collaborative/blob/master/packages/backend/src/AutomergeBackend.ts
to make it fit with the latest automerge version changes,
I'm trying to implement what has been outlined here: https://github.com/automerge/automerge/blob/main/SYNC.md
This is what I've done so far (forgive me for eventual errors):
Executing it I get :
I also added
updatePeers
as class method:Is, according to you, my implementation of
syncStates
reasonable and fully correct?I looked for clues about
syncState
interface but I didn't find any:https://github.com/automerge/automerge/blob/d82f6208a485376fc07b18dda43af8dfa2fde7c2/%40types/automerge/index.d.ts#L201
How would you suggest me to implement
backends
?The text was updated successfully, but these errors were encountered: