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

how to build offline-first, redis based app? #4635

Open
anlexN opened this issue Jan 27, 2018 · 2 comments
Open

how to build offline-first, redis based app? #4635

anlexN opened this issue Jan 27, 2018 · 2 comments

Comments

@anlexN
Copy link

anlexN commented Jan 27, 2018

We all know that redis is client-server model. But i want to know use redis offline, and when sync is needed, i also can connect redis server to sync.

like Pouchdb and Couchdb

@antirez
Copy link
Contributor

antirez commented Jan 27, 2018

There is no built in support for this in Redis. You can do it at application level if the data model is simple. For instance persist each user information in a set of keys you can easily retrieve. When doing a sync write a merge function that presented with two versions of the data, do some sensible choice about what to do in order to provide a single version. Then set this version both on Redis and in the application local storage. You need some experience in distributed systems to do that but if you know your application very well, the access patterns, and there is a not too hard way in such an application to merge different versions, you may end with something good enough for your business requirements.

@anlexN
Copy link
Author

anlexN commented Jan 28, 2018

@antirez, what solution do you advise? i am js developer.
what do you think about this repo relite-js ?

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