3 ms·
For a SaaS style (aka client-server) application, the right way to think of client-side storage is as a persistent cache, for a few reasons: * it can be delete
by aboodman 5y ago
For a SaaS style (aka client-server) application, the right way to think of client-side storage is as a persistent cache, for a few reasons:
* it can be deleted at anytime (by browser, or even by user!)
* you generally want the server to be authoritative. if there's a bug client-side, server view of state should win.
* it's not possible in the general case to store all user data offline, it's always a subset.
Once you realize that the client-side state is a cache, potential uses of it become a lot more clear.
- kevincox 5y agoThat's the thing. I want to make apps where the client-state is more than a cache. I want it to be able to be authoritative. Sure, you probably want to put some sort of syncing on top, but that isn't even always necessary.
- aboodman 5y agoAlright, there is some naming collision then. "offline-first" (terrible name, but here we are) generally refers to a classic web application that wants to be able to run offline either for network resiliency reasons or for performance. "local-first" is a term that has been coined for something close to what you are talking about: https://www.inkandswitch.com/local-first.html https://www.inkandswitch.com/local-first.html
- oblib 5y agoYou can do that with CouchDB installed on the client's PC. Syncing that with a Cloud based CouchDB is trivial, and fast and efficient, and requires no user interaction.