News for hackers. Stuff that matters.
Re:The Abandoned Facebook Tech That Now Helps Power Apple by meepmorp on Monday August 04, 2014 @04:55PM (#8133975)
For the ignorant and lazy (I, if nobody else), could someone explain why Facebook ditched Cassandra?
Re:The Abandoned Facebook Tech That Now Helps Power Apple by dlg on Monday August 04, 2014 @05:08PM (#8134032)
At the time Facebook was building messages, Cassandra was still pretty immature/buggy (it's very solid in my experience nowadays).

Moreover, FB needed a lot of people who knew the tools. They acqui-hired a team of HBase experts. In 2010 I would have chosen HBase over Cassandra for what they were doing. In 2014, I'd choose C*. But as always, it depends on your application and what you know (or can hire for).

Cassandra has tunable consistency. A lot of people just think "eventually consistent" but it really lets you make tradeoffs yourself about performance, consistency, etc. Plus, the way they do read repair, etc even at CL==ONE makes it a lot better for messaging systems than you'd guess. I'm using it successfully with most stuff at One.

Re:The Abandoned Facebook Tech That Now Helps Power Apple by lclarkmichalek on Monday August 04, 2014 @06:28PM (#8134425)
C*?
Re:The Abandoned Facebook Tech That Now Helps Power Apple by bdeggleston on Monday August 04, 2014 @06:52PM (#8134515)
C* is short for Cassandra
Re:The Abandoned Facebook Tech That Now Helps Power Apple by nogridbag on Monday August 04, 2014 @05:11PM (#8134053)
Re:The Abandoned Facebook Tech That Now Helps Power Apple by threeseed on Monday August 04, 2014 @04:59PM (#8133997)
Because Facebook built a whole new Messages feature that was supposed to be email and internal messaging. Because Cassandra is designed to be eventually consistent it really wasn't suited for this use case.
Re:The Abandoned Facebook Tech That Now Helps Power Apple by sigy on Monday August 04, 2014 @06:41PM (#8134471)
Actually, it is designed to have tunable consistency. You can have immediate (full) consistency if you choose. This is a common misconception. In practice, CAP is about trade-offs, as in any design of scale.
Re:The Abandoned Facebook Tech That Now Helps Power Apple by mallipeddi on Tuesday August 05, 2014 @12:06AM (#8135454)
Tuning consistency levels for your requests (R/W/N values) can only guarantee read-after-write consistency at best. It doesn't guarantee strong consistency like what HBase provides.
Re:The Abandoned Facebook Tech That Now Helps Power Apple by cbsmith on Tuesday August 05, 2014 @02:01AM (#8135753)
Huh? Can you describe a scenario that you couldn't implement with tunable consistency levels?

Mostly the limitations people come up with with Cassandra are around cross-row ACID, which if you really need it you can do with LWT, though in practice the better solution tends to be to just denormalize in to one row and/or NOT actually require cross-row ACID. It generally isn't what you really need anyway. Most businesses don't really shut down just because they can't achieve consistency.

Re:The Abandoned Facebook Tech That Now Helps Power Apple by mallipeddi on Friday August 08, 2014 @09:23PM (#8155936)
Simple use-case: you want to maintain a counter. In Cassandra even if you tune the consistency levels (set R+W>N), there's no way to correctly implement a conditional update. To elaborate further, you could successfully increment the counter in some nodes but fail on others and don't reach quorum (partial write). The next time you do read-repair, it's going to do LWW and propagate that update everywhere else. Meanwhile you think it has failed, and reissue the increment once again and so you've incremented twice. Alternatively you could have 2 competing increments racing each other and one of them wins and the other loses due to LWW (and you've missed 1 count). This is trivial to implement correctly in HBase since it offers strong consistency.

In practice, Cassandra gets around this issue by implementing a custom CRDT for counters. But CRDTs don't exist for everything and in general it's not trivial to get things right. I'm not arguing Cassandra is bad, but it's a misconception that you can tune the consistency levels and somehow get Cassandra to behave like a strongly consistent store.