O'Reilly logo

Building Python Real-Time Applications with Storm by Barry Hart, Kartik Bhatnagar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required