Architecture for data layer that uses both localStorage and a REST remote server
Anybody has any ideas or references on how to implement a data persistence layer that uses both a localStorage and a REST remote storage: The data of a certain client is stored with localStorage (using an ember-data indexedDB adapter). The locally stored data is synced with the remote server (using ember-data RESTadapter). The server gathers all data from clients. Using mathematical sets notation: Server = Client1 ∪ Client2 ∪ ... ∪ ClientN where, in general, any record may not be unique to a certain client: ClientX ∩ ClientY ≠ 0, ∀ X,Y ∈ [1,N] Here are some scenarios: A client creates a record