Skip to content
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

v3 - WIP #772

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

v3 - WIP #772

wants to merge 1 commit into from

Conversation

janthurau
Copy link
Collaborator

@janthurau janthurau commented Jan 4, 2024

goals:

@solirpa
Copy link
Contributor

solirpa commented Jan 10, 2024

Consider using the api Y.diffUpdate, we don't need to load ydoc into memory.

Here is the simulation syncstep1 and syncstep2 code:

if messageYjsSyncStep1
    cli_sv = decode(cli_msg)
    srv_state = load(name)

    diff = Y.diffUpdate(srv_state, cli_sv);
    send(writeSyncStep2(diff))

    srv_sv = Y.encodeStateVectorFromUpdate(srv_state)
    send(writeFirstSyncStep(srv_sv))

else if messageYjsSyncStep2
    update = decode(msg)
    srv.persist(update)

......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants