EventProcessing¶
Introduction¶
This page describes three event-processing pipelines used by RSB:- Event receiving pipeline for
Reader
(pull-style) participants - Event receiving pipeline for
Listener
(push-style) participants - Event sending pipeline for
Informer
participants
Note: the descriptions on this page do not cover error handling. Error handling is described here.
Pull-style Event Receiving¶
The following processing happens in thread of execution that begins with a method call by the client.
- A connector is asked to emit an event
- The connector receives a notification from its "wire" (this may block the execution until a notification arrives)
- The connector applies transport-level filtering and potentially discards the notification
- Based on envelope information and meta-data of the notification
- Based on the (serialized) payload portion of the notification
- The connector selects a converter based on the wire-schema stored in the notification
- The converter converts the payload portion of the notification into a domain-object (which will become the event payload)
- An event object is created and its fields are filled based on the content of the notification
- The "receive" timestamp of the event is set to the current time
- Event-level filters are applied and may lead to the event being discarded
- The "deliver" timestamp of the event is set to the current time
- The event object is returned to the calling client (a
Reader
participant)
Push-style Event Receiving¶
The following processing happens in a dedicated thread of execution.
- A connector receives a notification from its "wire"
- The connector applies transport-level filtering and potentially discards the notification
- Based on envelope information and meta-data of the notification
- Based on the (serialized) payload portion of the notification
- The connector selects a converter based on the wire-schema stored in the notification
- The converter converts the payload portion of the notification into a domain-object (which will become the event payload)
- An event object is created and its fields are filled based on the content of the notification
- The "receive" timestamp of the event is set to the current time
- Event-level filters are applied and may lead to the event being discarded
- The "deliver" timestamp of the event is set to the current time
- The event object is delivered to client-supplied (via a
Listener
participant) handlers
Event Sending¶
- Scope and type of the event are checked against the scope and type of the
Informer
object - The "send" timestamp of the event is set to the current time
- For each connector:
- A converter is selected based on the type and the payload is converted to a suitable form for the connector
- A notification is created and converted payload and fields of the event are stored in the notification
- The notification is sent over the respective "wire" by the connector
Implementations¶
Language | File(s) |
---|---|
C++ | source:trunk/cpp/core/src/rsb/eventprocessing |
Java | source:trunk/java/core/src/rsb/eventprocessing |
Python | source:trunk/python/core/rsb/eventprocessing.py |
Common Lisp | source:trunk/cl/cl-rsb/src/event-processing |