Requests for 2.0 listening
We've been working a bit on our own deeptream fork modifying it for our specific needs. In particular we are using CouchDB as our storage and conflict resolution framework. However, we would still like to stay as close as possible to deepstream server and if possible maintain some compatibility with the official javascript client. I would like to at least highlight the changes here for future consideration.
- We've added the concept that all records exists virtually as
{}. There is no such thing as whether a record exists or not and "deleting" a record is essentially the same as setting it to{}. This greatly simplifies a lot of things and allows us to remove theCREATEORREAD,CREATE,DELETE,HASandSNAPSHOTactions. In particular it resolves some asynchronous races client side. PATCHandUPDATEmessages take a fourth argument which specifies the parent (previous) version. This allows us to implement master-master setups with server merges where versions forPATCHandUPDATEare not guaranteed to be monotonic. If the client receives aPATCHwhich is out of order he has to issue aREADto receive a complete record. This also allows us to recover from network partitions (#384).- versions are no longer an integer but a string with the following format:
${version}-${uuid}. This is to allow conflicts to be merged even after a network partition.
With these changes it would be rather easy to implement offline support in clients using e.g. https://pouchdb.com which has all of that already figured out.
We've added the concept that all records exists virtually as {}.
Isn't this essentially the purpose anonymous records serve?
Anonymous records are a client thing. Not sure how that is related?
Not really, anonymous records are useful to change records on the client side while keeping the bindings intact (more about this here).
Records are implicitly created when calling ds.record.getRecord( someName ) however you can check if a record exists using ds.record.has( someName, exists => {})
Closing this as things have diverged quite a bit.