Book Image

Storm Blueprints: Patterns for Distributed Real-time Computation

Book Image

Storm Blueprints: Patterns for Distributed Real-time Computation

Overview of this book

Table of Contents (17 chapters)
Storm Blueprints: Patterns for Distributed Real-time Computation
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing the sample application


The application component is a simple Java class that uses the Simple Logging Facade for Java (SLF4J) (http://www.slf4j.org) to log messages. We will simulate an application that begins by generating warning messages at a relatively slow rate, then switches to a state where it generates warning messages at a much faster rate, and finally returns to the slow state as follows:

  • Log a warning message every 5 seconds for 30 seconds (slow state)

  • Log a warning message every second for 15 seconds (rapid state)

  • Log a warning message every 5 seconds for 30 seconds (slow state)

The goal of the application is to generate a simple pattern that our storm topology can recognize and react to by sending notifications when certain patterns emerge and state changes occur as shown in the following code snippet:

public class RogueApplication {
    private static final Logger LOG = LoggerFactory.getLogger(RogueApplication.class);
    
    public static void main(String[] args) throws...