Sync is the future of mobile data, and the best way to power sync is with an embedded mobile database. In this talk I describe Couchbase Lite and then I get geeky with the data-structures we use for conflict detection and management. If you want to write your own offline capable database, you'll end up using data structures like this.