Open Facebook and look at your feed. Behind each post is a web of small facts: who wrote it, who liked it, who commented, who is friends with whom. Showing one page means reading hundreds of these facts, and doing it for over a billion people at once. The data changes all the time, but it is read far more often than it is written.
TAO is the system Facebook built to serve this social graph. Its 2013 paper describes a simple data model, an API for it, and a layered cache that favors availability and efficiency over strong consistency. It is a classic example of a read-heavy system design.
TAO stores a graph of typed objects and typed associations in MySQL, and puts a two layer cache in front of it. Web servers read from follower caches, which fall back to leader caches and then to the database. Writes go through the leader, which sends invalidations to other caches. Reads are fast and always available, at the price of data that can be briefly out of date in another region.
Two kinds of things
TAO's data model has objects and associations. An object is a typed node with a unique id, such as a user, a post or a place. An association is a typed, directed edge between two objects, such as friend or authored, with a time.
Queries start from an object and an association type. Because the same question is asked constantly, such as "the latest 50 comments on this post", TAO organizes edges into association lists: all associations with the same starting object and type, sorted by time with the newest first. That makes "newest first" reads cheap.
