Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How did FaceBook use Cassandra for inbox search, if Caasandra has no search capabilities?

If you want to search in Cassandra, I've been told that you need to use something like ElasticSearch or Solr.

How can that be true if Cassandra was originally built to power FaceBook's inbox search?

"Apache Cassandra was initially developed at Facebook to power their Inbox Search feature by Avinash Lakshman (one of the authors of Amazon's Dynamo) and Prashant Malik."

http://en.wikipedia.org/wiki/Apache_Cassandra

like image 684
Dan Alvizu Avatar asked Jan 24 '15 22:01

Dan Alvizu


1 Answers

The basic idea is that you use the user id as the partition key, and then all the information you need for an inbox search will be clustered as rows in that partition. You can then set up multiple tables like this with different types of data clustered in the partition to support different types of searches. Since Cassandra can access a partition in essentially constant time even with millions of users, the system can scale and remain fast as you add nodes and users.

You can read a description of the initial system here in section 6.1 Facebook Inbox Search: Facebook's Cassandra Paper.

The description uses older Cassandra terminology like super columns, etc.

like image 119
Jim Meyer Avatar answered Nov 16 '22 02:11

Jim Meyer