concept point in category storm

This is an excerpt from Manning's book Storm Applied: Strategies for real-time event processing.
The point is that you can plug Storm into your existing architecture, and this book will provide use cases illustrating how you can do so. Figure 1.3 shows a hypothetical scenario for analyzing a stream of tweets.
We have the end goal of building a heat map with the latest activity at bars. So we need to end up with data points representing timely coordinates on a map. We can attach a time interval (say 9:00:00 PM to 9:00:15 PM, if we want 15-second increments) to a set of coordinates that occurred within that interval. Then at the point of display within the heat map, we can pick the latest available time interval. Coordinates on a map can be expressed by way of latitude and longitude (say, 40.7142° N, 74.0064° W for New York, NY). It’s standard form to represent 40.7142° N, 74.0064° W as (40.7142, -74.0064). But there might be multiple coordinates representing multiple check-ins within a time window. So we need a list of coordinates for a time interval. Then our end data point starts to look like this:
There’s a slightly different approach to breaking down a problem into its constituent parts. It provides a marked improvement in terms of performance over the approach of breaking down into functional components discussed earlier. With this pattern, instead of decomposing the problem into its simplest possible functional components, we think in terms of separation points (or join points) between the different components. In other words, we think of the points of connection between the different bolts. In Storm, the different stream groupings are markers between different bolts (as the groupings define how the outgoing tuples from one bolt are distributed to the next).
At these points, the stream of tuples flowing through the topology gets repartitioned. During a stream repartition, the way tuples are distributed changes. That is in fact the functionality of a stream grouping. Figure 3.19 illustrates our design by points of repartition.
Listing 9.20. Specifying parallelism at the points of repartition
public static StormTopology build() { TridentTopology topology = new TridentTopology(); Stream playStream = topology.newStream("play-spout", buildSpout()) .each(new Fields("play-log"), new LogDeserializer(), new Fields("artist", "title", "tags")) .each(new Fields("artist", "title"), new Sanitizer(new Fields("artist", "title"))) .name("LogDeserializerSanitizer"); TridentState countByArtist = playStream .project(new Fields("artist")) .groupBy(new Fields("artist")) .name("ArtistCounts") .persistentAggregate(new MemoryMapState.Factory(), new Count(), new Fields("artist-count")) .parallelismHint(4); TridentState countsByTitle = playStream .project(new Fields("title")) .groupBy(new Fields("title")) .name("TitleCounts") .persistentAggregate(new MemoryMapState.Factory(), new Count(), new Fields("title-count")) .parallelismHint(4); TridentState countsByTag = playStream .each(new Fields("tags"), new ListSplitter(), new Fields("tag")) .project(new Fields("tag")) .groupBy(new Fields("tag")) .name("TagCounts") .persistentAggregate(new MemoryMapState.Factory(), new Count(), new Fields("tag-count")) .parallelismHint(4); topology.newDRPCStream("count-request-by-tag") .name("RequestForTagCounts") .each(new Fields("args"), new SplitOnDelimiter(","), new Fields("tag")) .groupBy(new Fields("tag")) .name("QueryForRequest") .stateQuery(countsByTag, new Fields("tag"), new MapGet(), new Fields("count")); return topology.build(); }