Many of the most popular web applications today deal with highly organized and structured data that represent entities, and the relationships between these entities. LinkedIn can tell you how many degrees of separation there are between yourself and the CEO of Samsung, Facebook can figure out people that you might already know, Digg can recommend article submissions that you might like, and LastFM suggests music based on your current listening habits.
We’ll take a look at the basic theory behind how some of these features can be implemented (no computer science degree required!), and then dig in to a few practical implementations using PHP & and a relational database, as well as with Redis. Lastly, we’ll take a quick look at the current landscape of graph-based datastores that simplify many of these operations.