Book Image

Learning Apache Cassandra

By : Matthew Brown
4 (1)
Book Image

Learning Apache Cassandra

4 (1)
By: Matthew Brown

Overview of this book

Table of Contents (19 chapters)
Learning Apache Cassandra
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we explored three different approaches to displaying a user's home timeline. The first approach had the advantage of requiring no additional tables in our database; it was fully normalized. The downside was that reading all the data to display a user's home timeline was prohibitively expensive. The next approach, partial denormalization, kept references to the status updates in each user's home timeline, and allowed us to avoid the worst performance characteristics of the normalized approach. Partial denormalization did not, however, allow us to get to the point where a home timeline could be displayed with only a single query to a single partition.

By storing a full copy of every status update in the home timeline of every follower of the update's author—a fully denormalized approach—we achieved the ideal read-time access pattern—namely, selecting a slice of a single partition in a single table. While read performance increased as we denormalized, write complexity...