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)

Installing Petrel


Let's set up our Python development environment. We assume here that you have already followed the instructions in Chapter 1, Getting Acquainted with Storm, to install Storm 0.9.3:

  1. First, we need to install virtualenv, a tool for managing Python libraries. On Ubuntu, simply run this command:

    sudo apt-get install python-virtualenv
  2. Next, we create a Python virtual environment. This provides a way to install Python libraries without requiring root access to the machine and without interfering with the system's Python packages:

    virtualenv petrel

    You will see something like the following output:

    New python executable in petrel/bin/python
    Installing distribute.............................................................................................................................................................................................done
  3. Next, run this command to activate the virtual environment. Your shell prompt will change to include the virtualenv name, indicating that...