3 ms·
Wow, thank you. So from my little perspective, couchdb does replication over network, you are leveraging that to create apps that can queue network events loca
by lifeisstillgood 14y ago
Wow, thank you.
So from my little perspective, couchdb does replication over network, you are leveraging that to create apps that can queue network events locally and get on with other work, and that one definition of a record can easily be used in JS, local store and remote.
Seems nice. I remember another thread recently with a discussion on replacing the standby icon. At some point someone drew up a series of dynamic I ins showing network state - fully synched, uploading, fetching etc.
Your project is addressing a new and previously unknown need for users to have a mental model of - remote synch.
Always be working in growth areas :-)
My homework (along with everything else !)
1. How does couchdb replicate and what are its failure points (nothing is magic but you seem to like it - I will have to have a look. I assume erlang is not running in IOS - I will read up
Thank you for taking the time to cudgel new knowledge into an old brain
Cheers
- Lazare 14y agoCouchDB's replication is nifty because, in a sense, there is no replication. Or rather, not in the sense that MySQL or MongoDB might talk about replication as a separate process or separate protocol. I spent a while typing of descriptions of how it works, but honestly I think you're best served by these two answers: http://stackoverflow.com/a/4766398/17086 http://stackoverflow.com/a/4766398/17086 https://github.com/couchbaselabs/TouchDB-iOS/wiki/Replication-Algorithm https://github.com/couchbaselabs/TouchDB-iOS/wiki/Replicatio... It's not magic, no. It does, however, work a lot like git (a good thing!). The biggest downside is that it pushes some of the work to the client; you really do have to figure out how to handle conflicts in some cases. For example, if you edit the same field on the same doc in different ways on two different clients and then try to sync, there is no automatic way to resolve that other than throwing one edit away (which you can totally do if that works for your problem space). Luckily, that's not a very common situation. :) And, again, how else are you going to solve something like that? It all comes back to the CAP theorem - you can have at most two of consistency, availability, and partition tolerance. Rich mobile apps can work around a lack of consistency if they must, but a lack of availability and partition tolerance undermines the "mobile" part; for some projects (like mine) that is unacceptable. As for TouchDB, if memory serves it actually was running an erlang VM at one point, but has long since been rewritten into native Objective C (for the iOS version) and Java (for the Android version). The PouchDB version is written purely in Javascript. Again, all that matters in the end is that it speaks the protocol. As @caolan put it, CouchDB is not a database: http://caolanmcmahon.com/posts/couchdb_is_not_a_database/ http://caolanmcmahon.com/posts/couchdb_is_not_a_database/ It's a protocol. :)
- lifeisstillgood 14y agoThank you.