Chapter 5. Persistence Using Redis and MongoDB

It is often necessary to store tuples in a persistent data store, such as a NoSQL database or a fast key-value cache, in order to perform additional analysis. In this chapter, we will revisit the Twitter trending analysis topology from Chapter 4, Example Topology – Twitter with the help of two popular persistence media: Redis and MongoDB.

Redis (http://redis.io/) is an open source and BSD-licensed advanced key-value cache and store. MongoDB is a cross-platform, document-oriented database (https://www.mongodb.org/).

Here are the two problems that we will solve in this chapter:

  • Finding the top trending tweet topics using Redis
  • Computing hourly aggregates of city mentions using MongoDB

Finding the top n ranked ...

Get Building Python Real-Time Applications with Storm now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.