Introducing Trident topologies

To fulfill these requirements, we will need to count the occurrences in our topologies. This can be challenging while using standard Storm topologies because tuples can get replayed, which leads to double counting. As we will see in the next few sections, Trident provides primitives to solve this problem.

We will use the following topology:

Introducing Trident topologies

The code for the preceding topology is as follows:

public class OutbreakDetectionTopology { public static StormTopology buildTopology() { TridentTopology topology = new TridentTopology(); DiagnosisEventSpout spout = new DiagnosisEventSpout(); Stream inputStream = topology.newStream("event", ...

Get Storm Blueprints: Patterns for Distributed Real-time Computation 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.