News for hackers. Stuff that matters.
Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by kchodorow on Wednesday May 11, 2011 @06:17PM (#2538640)
MongoDB is partition tolerant and consistent.

You can never have multi-master with MongoDB, which is required for "always writable." However, it can be readable. Our CEO did a series of posts on distributed consistency, see http://blog.mongodb.org/post/475279604/on-distributed-consis....

Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by benblack on Wednesday May 11, 2011 @06:44PM (#2538707)
If a slave can continue serving reads whilst partitioned from a master that continues to accept writes then you cannot guarantee consistency. If a slave cannot serve reads when partitioned then you aren't available. If a master cannot accept writes when partitioned then you aren't available. See this excellent post from Coda Hale on why it is meaningless to claim a system is partition tolerant http://codahale.com/you-cant-sacrifice-partition-tolerance/.

One love.

- Lil' B

Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by kchodorow on Thursday May 12, 2011 @10:14AM (#2540638)
I interpreted "what is sacrificed?" as asking which letter of CAP MongoDB was giving up. Coda's article actually explains exactly the tradeoffs MongoDB makes for CP:

-------------------

Choosing Consistency Over Availability

If a system chooses to provide Consistency over Availability in the presence of partitions (again, read: failures), it will preserve the guarantees of its atomic reads and writes by refusing to respond to some requests. It may decide to shut down entirely (like the clients of a single-node data store), refuse writes (like Two-Phase Commit), or only respond to reads and writes for pieces of data whose "master" node is inside the partition component (like Membase).

This is perfectly reasonable. There are plenty of things (atomic counters, for one) which are made much easier (or even possible) by strongly consistent systems. They are a perfectly valid type of tool for satisfying a particular set of business requirements.

-------------------

Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by jorgeortiz85 on Wednesday May 11, 2011 @07:28PM (#2538848)
In a replica set configuration, all reads and writes are routed to the master by default. In this scenario, consistency is guaranteed. (You can optionally mark reads as "slaveOk", but then you admit inconsistency.)

This does sacrifice availability (in the CAP sense), but I haven't heard anyone claim otherwise.

Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by benblack on Wednesday May 11, 2011 @10:12PM (#2539246)
"In a replica set configuration, all reads and writes are routed to the master by default. In this scenario, consistency is guaranteed."

One would hope that reading and writing a single node database was consistent. This is table stakes for something calling itself a persistent store. Claiming partition tolerance in the above is the same as claiming availability. The former claim has been made. Rest left as exercise for the reader.

Namasté.

- Lil' B

Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by jorgeortiz85 on Thursday May 12, 2011 @11:06AM (#2540797)
If a slave is partitioned from its master, it won't be able to serve requests. (Unless the request is a read query marked as "slaveOk", in which case you admit inconsistency.) I highly doubt anyone would claim otherwise.
Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by tuna on Wednesday May 11, 2011 @09:14PM (#2539144)
Which C is lying ? CEO or CAP ? I let to the heart of pure and to the late night sysadmin to decide.
Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by aguynamedben on Wednesday May 11, 2011 @08:07PM (#2538974)
Lil' B, stop trying to outsmart us all, MongoDB works, supports JSON, and autoshards.
Re:It's Time to Drop the "F" Bomb - or "Lies, Damn Lies, and... by jdefarge on Wednesday May 11, 2011 @10:22PM (#2539266)
Thanks God. At least it's not Cassandra. :)