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

Introduce Snapshot #9

Closed
hackerwins opened this issue Jan 12, 2020 · 4 comments · Fixed by #32
Closed

Introduce Snapshot #9

hackerwins opened this issue Jan 12, 2020 · 4 comments · Fixed by #32
Labels
enhancement 🌟 New feature or request

Comments

@hackerwins
Copy link
Member

hackerwins commented Jan 12, 2020

Problem

Yorkie allows each client to exchange operations with the server. This causes a performance problem when a client attaches a document that has many accumulated operations.

Operations vs Snapshot in counter example:

  • operation: (+1), (+1), (+1), (+1), (+1), (+1), (+1)
  • snapshot: 7

Solution

The server stores snapshot at specific intervals then send a snapshot when the client attaches a document.

@hackerwins hackerwins added the enhancement 🌟 New feature or request label Jan 12, 2020
@hackerwins
Copy link
Member Author

hackerwins commented Mar 6, 2020

The response size of the attach API with 3972 changes is about 1.3 Mb in CodeMirror example.

Screen Shot 2020-03-06 at 13 40 09

@hackerwins
Copy link
Member Author

hackerwins commented Mar 29, 2020

without snapshot

The response size of the attach API with 4343 changes without a snapshot is about 2.5 Mb in Drawing example.
Screen Shot 2020-03-29 at 22 55 40

with snapshot

The response size of the attach API with 4250 changes with a snapshot is about 0.789 Mb in Drawing example.
Screen Shot 2020-03-29 at 22 47 21

@hackerwins
Copy link
Member Author

hackerwins commented Mar 29, 2020

I think that the payload will be reduced if we replace the size of actorID or perform garbage collection as follow-up work.

#3
#36

@hackerwins
Copy link
Member Author

hackerwins commented Feb 4, 2021

with snapshot + replace actor_id(24 bytes string -> 12 bytes array)

The response size of the attach API with 4296 changes with a snapshot is about 0.636 MB in Drawing example.
Screen Shot 2021-02-04 at 22 53 40

#36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant