Appendix C. Real Life Example Setup

First, clone the GitHub repository for the example from:

> git clone git://github.com/storm-book/examples-ch06-real-life-app.git
src/main

Contains the Topology souce code

src/test

Has the tests for the Topology

webapps directory h

Has the Node.Js WebApp to play with the Topology

.
├── pom.xml
├── src
│   ├── main
│   │   └── java
│   └── test
│       └── groovy
└── webapp

Installing Redis

Installing Redis is very easy:

  1. Download the latest stable version from the Redis website (at the time of this writing, 2.4.14).

  2. Extract the file.

  3. Run make, followed by make install.

This will compile Redis and leave executable files in your PATH so you can start using Redis.

You’ll find more information on the Redis website as well as documentation on commands and design considerations.

Installing Node.js

Installing Node.js is pretty straightforward. Download the latest Node.js source from http://www.nodejs.org/#download.

At the time of this writing, the latest version of NodeJS is 0.6.19. Extract the content of the file and run ./configure, make, and make install.

You’ll find more information on the official site, as well as documentation on how to install Node.js on different platforms.

Building and Testing

In order to build the example, you should start the redis-server on your machine.

>nohup redis-server &

After that, run the mvn command to effectively compile and test the application.

>mvn package ... [INFO] ------------------------------------------------------------------------ ...

Get Getting Started 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.