Meteor's editing operations are quite different from what we use in
livedb (and hence derby). Livedb supports operations like "Insert at
this position in this list", and concurrent edits to the same list
will be resolved naturally and correctly. We don't talk about it
enough, but derby supports realtime collaborative editing out of the
box as a natural result. (With almost no special code in derby).
If two users try to edit the same document at the same time with
meteor, as I understand it only one user's edits will be reflected in
the final document.
If you want to resolve things correctly, the mongo operation ("Replace
{x:[1,2,3]} with {x:[1,2,2,3]}") simply doesn't contain enough
information to resolve concurrent edits. We could use the mongo oplog
to do multiserver concurrency (ie, replace redis's pubsub system), but
that wouldn't solve your problem anyway. It would also be slower...
To resolve the change, we also need to know the list of concurrent
changes (semantic changes, not just the new data) which have been made
to the document. To do that we need to rewind the oplog a little and
look at some of the old data in it. As I understand it, mongo's oplog
is just a feed. You can't rewind it.
Unlike meteor, livedb (and hence derby) has no hard dependancy on
mongo. At lever I'd like to replace mongo & redis with postgresql &
foundationdb because I think they're better fits for what we're doing.
And thats something we can quite reasonably do due to livedb's
architecture.
-J
> > email to derbyjs+unsubscrib