2 ms·
the thing you're missing is that these single writes can be a "bulk" write of a large number of documents. More over, the single threaded (semantically) writing
by carterschonwald 16y ago
the thing you're missing is that these single writes can be a "bulk" write of a large number of documents. More over, the single threaded (semantically) writing is an artifact of having append only writing to the db.
there are 2 majors wins when you have this approach to a db.
1) append only memory allocation is FAST. If we were talking about writing to ram, its as simple as allocating the interval from i to i + (amount of memory needed), where i is the heap pointer
2) you don't have to deal with locks! Locks are not bad per se, but in many cases lock based data structures can lead to pain later on (just look at home much work has been done on python and linux over time in this matter).
Also, I believe that in the case that here aren't conflicting versions of the same doc in two couchdb nodes, replication is essentially bandwidth rate limited.
take the time to read up on couchdb. it may not be perfect or appropriate for everything, but it is a very very nice piece of software. And whats really awesome is that as a consequence of the append only semantics, the data loss bug they recently had was totally recoverable for those who hadn't compacted their db's! (how many db's can say that for their data loss bugs?)