Storm simple patterns

While we work with Storm, there are a variety of patterns you can recognize. In the segment here, without using Trident, we are attempting to capture some common patterns with Storm topologies.

Joins

As the name suggests, this is the most common pattern. The output from two or more different streams is joined on some common field and is emitted as a single tuple. In Storm, that's effectively achieved using fields grouping, which ensures that all the tuples with same field value are emitted to the same task. The following figure and code snippet captures its essence:

 TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("gender", genderSpout); builder.setSpout("age", ageSpout); builder.setBolt("join", new SingleJoinBolt(new ...

Get Real-Time Big Data 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.