Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When WSO2 CEP is run is a distributed set up with Apache Storm, Siddhi queries are executed inside Siddhi engines embedded in the bolts of the Apache Storm topology (for detailed information about Apache Storm topology, see Apache Storm Tutorial).

...

AnnotationDescriptionExample
@dist (parallel='<number of Storm tasks>)The number of storm tasks in which the query should be run parallel.@dist(parallel='4')
@dist(execGroup='name of the group')

All the Siddhi queries in a particular execGroup will be executed in a single Siddhi bolt.

@dist(execGroup='Filtering')
@Plan:dist(receiverParallelism='number of receiver spouts') The number of event receiver spouts to be spawned for the Storm topology.@Plan:dist(receiverParallelism='1')
@Plan:dist(receiverParallelismpublisherParallelism='number of publisher bolts') The number of event publisher bolts to be spawned for the Storm topology.@Plan:dist(publisherParallelism='4')

The following is an example of an execution plan populated with the annotations mentioned above.

Info

Once an execution plan is created as saved, it's configuration in WSO2 Siddhi Query Language format is saved in the <CEP_HOME>/repository/deployment/server/executionplans directory.

Note
Note:
Every Siddhi query in a particular execGroup should have the same number of tasks as shown in the execution plan above ( e.g., parallel = '4' ). If the queries need to be distributed across different siddhi bolts, the execGroup names of the queries should differ from each other.

...