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

Auto cleanup as data grows #192

Open
ramezrafla opened this issue Jan 15, 2017 · 2 comments
Open

Auto cleanup as data grows #192

ramezrafla opened this issue Jan 15, 2017 · 2 comments

Comments

@ramezrafla
Copy link

Is there an easy way to clean up docs in a groundDB to prevent it from growing? Should we simply listen to isDone event and call keep when it goes over a number of docs?

@raix
Copy link

raix commented Jan 17, 2017

you could in theory add some offline metrics like size/usage/age of documents, then have a sort function using weights to figure out the most important documents. I've done this in the past and wanted this in gdb at some point. It's something to think about.

@ramezrafla
Copy link
Author

ramezrafla commented Jan 31, 2017

Thanks @raix

I had an idea to make sure we keep data well sync-ed with server. The problem is with all the subscriptions, it's tricky running a keep as you may lose data that is still on server but not subscribed to yet.

We could have a server method to which we send all the ids currently in gdb and it returns the ones that are valid, and we would run on the client a keepIds (a clone of keep but that depends on id's).

Thoughts? If you are willing to accept a PR, I could work on it. It could be a simple client method called sync() that would take care of everything.

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

No branches or pull requests

2 participants