Book Image

Building Python Real time Applications with Storm

Book Image

Building Python Real time Applications with Storm

Overview of this book

Big data is a trending concept that everyone wants to learn about. With its ability to process all kinds of data in real time, Storm is an important addition to your big data “bag of tricks.” At the same time, Python is one of the fastest-growing programming languages today. It has become a top choice for both data science and everyday application development. Together, Storm and Python enable you to build and deploy real-time big data applications quickly and easily. You will begin with some basic command tutorials to set up storm and learn about its configurations in detail. You will then go through the requirement scenarios to create a Storm cluster. Next, you’ll be provided with an overview of Petrel, followed by an example of Twitter topology and persistence using Redis and MongoDB. Finally, you will build a production-quality Storm topology using development best practices.
Table of Contents (14 chapters)

Twitter's Streaming API


Twitter's public API is both powerful and flexible. It has many features for both posting and consuming tweets. Our application needs to receive and process tweets in real time. Twitter's streaming API was designed to solve this problem. In computer science, a stream is a sequence of data elements (in this case, tweets) made available over time.

The streaming API is explained in detail at https://dev.twitter.com/streaming/overview. To use it, an application first creates a connection to Twitter. The connection remains open indefinitely to receive tweets.

The Streaming API offers several ways to choose which tweets your application receives. Our topology uses the so-called sample stream, which provides a small subset of all tweets arbitrarily chosen by Twitter. The sample stream is intended for demos and testing. Production applications generally use one of the other stream types. For more information about the available streams, refer to https://dev.twitter.com/streaming...