Chapter 2. Getting Started
In this chapter, we’ll create a Storm project and our first Storm topology.
The following assumes that you have at least version 1.6 of the Java Runtime Environment (JRE) installed. Our recommendation is to use the JRE provided by Oracle, which can be found at http://www.java.com/downloads/.
Before we start, it’s important to understand Storm operation modes. There are two ways to run Storm.
In Local Mode, Storm topologies run on the local machine in a single JVM. This mode is used for development, testing, and debugging because it’s the easiest way to see all topology components working together. In this mode, we can adjust parameters that enable us to see how our topology runs in different Storm configuration environments. To run topologies in Local Mode, we’ll need to download the Storm development dependencies, which are all the things that we need to develop and test our topologies. We’ll see how soon, when we create our first Storm project.
Running a topology in Local Mode is similar to running it in a Storm cluster. However it’s important to make sure that all components are thread safe, because when they are deployed in Remote Mode they may run in different JVMs or on different physical machines without direct communication or shared memory.
In all of the examples in this chapter, we’ll work in Local Mode.
In Remote Mode, we submit our topology to the Storm cluster, which is composed of many processes, usually ...