Database Reference
In-Depth Information
The alert bolt : This bolt is the actor that informs the external systems, such as
the air controller in our case, about the anomaly or deviation detected in the flight
path.
Owing to the nature of real-time use cases, such as the one depicted in the preceding fig-
ure, speed and accuracy of computation is of utmost importance, and that's the reason that
makes Storm a strong technological choice for the implementation of such solutions.
The total processing logic gets broken down into smaller tasks that are executed in bolts;
configuring tasks and parallelism in bolts lets the engineers attain the right kind of per-
formance for the solution.
One bolt can listen to multiple streams and it can emit to multiple other bolts on different
streams. As depicted in the figure in the Sprouts section:
• Bolt-A emits to Bolt-B and Bolt-C
• Bolt-D subscribes to streams from Bolt-C and Bolt-B
The common interfaces provided by Storm to be implemented by user-defined bolts are as
follows:
• IRichBolt
• IBasicBolt
The difference in these two interfaces depends upon whether reliable messaging and trans-
actional support are required or not.
The main methods used by the bolts are as follows:
prepare() : This is the method that is called when the bolt is initialized. Funda-
mentally, the Storm topology runs forever and the bolt once initialized will not
terminate till the topology is killed. This method is generally used to initialize
connections and read other static information, which is required during the entire
life cycle of the bolt.
execute() : This is the method that performs the functioning and processing lo-
gic defined on the bolt. It is executed for every tuple.
Search WWH ::




Custom Search