about 4 years
Current version of dexie-syncable support Eventual consistency by automatically resolves conflicts using last writer wins. This simplifies a lot for 90% cases such as updating a property of an object, adding object or deleting objects. We currently have nothing to offer for the few cases where conflicts could break consistency (like updating an array property, or for example a counter) except than putting the hard work on the application developer to implement some kind of CRDT types or solving it in another custom way. PouchDB has the option to provide a custom conflict handler for those cases, but as I have understood, that doesn't solve the whole issue either. It also puts the burden on to the app developer.
A lot of research has been made about Conflict-free replication data. We could allow a super-simple way to accomplish conflict-free replication without the requirement to use state-based CRDT types. What we need is a server-side implementation of the Dexie API along with a framework for decorating methods to become conflict-free database operations. The idea is this:
When implementing this, we must not forget a common requirement of multi-tenancy support on the server. An ideal solution is a server-implementation of the Dexie API that also maintains access control, only replicates data that the user has access to, and only allows queries on data that the user has access to. This is not part of this feature request, but I mention it so that it could be brought up when designing a server with Dexie API.
almost 4 years
This would have some great applications for offline first mobile apps where data is shared between users. I really appreciate you pointed out the need for multi-tenancy as well.
almost 2 years
Awesome! Simply an awesome idea right there. :)
Join the discussion!