Real-time processing job on Storm

After discussing setup and configuration, let's look at an example of a real-time processing job. Here, we will discuss a very basic example of Storm, that is, word count. To implement word count in Storm, we need one spout that should emit sentences at regular intervals, one bolt to split the sentence into words based on space, one bolt that collects all the words and finds the count, and finally, we need one bolt to display the output on the console.

Let's discuss them one by one as follows:

  • Sentence spout: To create a custom spout, first you must extend the BaseRichSpout class in which you can provide implementation of that required methods. To create a fixed spout, which means that it emits the same ...

Get Practical Real-time Data Processing and Analytics 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.