O'Reilly logo

Storm Blueprints: Patterns for Distributed Real-time Computation by Brian O'Neill, P. Taylor Goetz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing the Trident state

Now that we have the counts for each aggregation, we want to persist with that information for further analysis. In Trident, persistence first starts with state management. Trident has a first-level primitive for state, but like the Storm API, it makes a few assumptions about what is being stored as state or how that state is persisted. At the highest level, Trident exposes a State interface as follows:

public interface State {
   void beginCommit(Long transactionId); 
   void commit(Long transactionId);
}

As mentioned previously, Trident groups tuples into batches. Each batch has its own transaction identifier. In the preceding interface, Trident informs the State object when the state is being committed and when the commit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required