Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Implementing Parallel Processing | Introduction to contexts | Comparison of a correlator and a context
 
Comparison of a correlator and a context
Upon injection, each monitor's initial instance runs in the main context. You must explicitly create additional contexts. Conceptually, a context is like a correlator but with the following differences:
*All contexts share the same namespace, and thus share all monitor and event definitions that have been injected.
*A monitor instance must have a context reference to pass an event to that context.
*There is one enqueued events queue for all contexts. When you specify the enqueue statement (not the enqueue event to context statement), the enqueued event goes to the special queue for enqueued events. The correlator then places the event on the input queue of each public context. The correlator ensures that an enqueued event always arrives on the appropriate input queue(s). An enqueue operation never blocks. However, if the input queue of a context is full and the enqueued events queue gets very large, the result can be an unbounded memory usage error.
*Execution of Java is allowed in only the main context.
*The engine_receive tool receives events from all contexts or it can be configured to receive events from only specified channels.
*The engine_send tool sends events to all public contexts or to the contexts that are subscribed to the channels it is configured to send events on.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.