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

Trim room? #60

Open
Wh1isper opened this issue Jul 29, 2024 · 3 comments
Open

Trim room? #60

Wh1isper opened this issue Jul 29, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Wh1isper
Copy link

Problem

Hi, I've been working on persistence for pycrdt recently. In the project, the store(ystore) seems to grow infinitely. Do we need to provide a trim method for update compression?

I noticed that when a new connection is established, the latest document is directly synchronized, instead of transferring all the updates for the client to redo/undo.

Proposed Solution

It seems that we don't need to save all updates, just the most recent ones? Providing a trim method allows the server to compress updates that no longer needed, similar to disk organizing.

Additional context

@Wh1isper Wh1isper added the enhancement New feature or request label Jul 29, 2024
@davidbrochart
Copy link
Collaborator

Have you looked at document_ttl?

@Wh1isper
Copy link
Author

Oh thanks! I referenced the FileYStore implementation and missed the SQLiteYStore's. Sorry about that! The document_ttl implementation is basically the same as my thoughts :)

Out of curiosity, does FileYStore doesn't require trim, or is there another way to safely trim them?

@davidbrochart
Copy link
Collaborator

It's not implemented for FileYStore but it would be good to have.

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

No branches or pull requests

2 participants