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 ...

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.