EventProcessing

Introduction

This page describes three event-processing pipelines used by RSB:
  1. Event receiving pipeline for Reader (pull-style) participants
  2. Event receiving pipeline for Listener (push-style) participants
  3. 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.

  1. A connector is asked to emit an event
  2. The connector receives a notification from its "wire" (this may block the execution until a notification arrives)
  3. 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
  4. The connector selects a converter based on the wire-schema stored in the notification
  5. The converter converts the payload portion of the notification into a domain-object (which will become the event payload)
  6. An event object is created and its fields are filled based on the content of the notification
  7. The "receive" timestamp of the event is set to the current time
  8. Event-level filters are applied and may lead to the event being discarded
  9. The "deliver" timestamp of the event is set to the current time
  10. 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.

  1. A connector receives a notification from its "wire"
  2. 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
  3. The connector selects a converter based on the wire-schema stored in the notification
  4. The converter converts the payload portion of the notification into a domain-object (which will become the event payload)
  5. An event object is created and its fields are filled based on the content of the notification
  6. The "receive" timestamp of the event is set to the current time
  7. Event-level filters are applied and may lead to the event being discarded
  8. The "deliver" timestamp of the event is set to the current time
  9. The event object is delivered to client-supplied (via a Listener participant) handlers

Event Sending

  1. Scope and type of the event are checked against the scope and type of the Informer object
  2. The "send" timestamp of the event is set to the current time
  3. For each connector:
    1. A converter is selected based on the type and the payload is converted to a suitable form for the connector
    2. A notification is created and converted payload and fields of the event are stored in the notification
    3. 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

event-sending.png (21.8 KB) J. Moringen, 06/23/2011 09:36 PM