CouchDB, and Achieving Consistency
This happens automatically and consistently, so both databases will make exactly the same choice.
Every application that does syncing should support some notion of “revisions”.
It takes only one sync algorithm mistake or a bad conflict resolution approach to suffer data loss. As more apps become “revision-aware”, like Dropbox does so well, there’s many more novel things to be achieved with it, and this is one of them.