EventProcessing » History » Version 1

J. Moringen, 06/20/2011 08:09 PM
initial version

1 1 J. Moringen
h1. EventProcessing
2 1 J. Moringen
3 1 J. Moringen
h2. Introduction
4 1 J. Moringen
5 1 J. Moringen
This page describes three event-processing pipelines used by RSB:
6 1 J. Moringen
# Event receiving pipeline for @Reader@ (pull-style) participants
7 1 J. Moringen
# Event receiving pipeline for @Listener@ (push-style) participants
8 1 J. Moringen
# Event sending pipeline for @Informer@ participants
9 1 J. Moringen
10 1 J. Moringen
_Note: the descriptions on this page do not cover error handling. Error handling is described [[ErrorHandling|here]]._
11 1 J. Moringen
12 1 J. Moringen
h2. Pull-style Event Receiving
13 1 J. Moringen
14 1 J. Moringen
_The following processing happens in thread of execution that begins with a method call by the client._
15 1 J. Moringen
16 1 J. Moringen
# A [[Glossary|connector]] is asked to emit an event
17 1 J. Moringen
# The connector receives a notification from its "wire" (this may block the execution until a notification arrives)
18 1 J. Moringen
# The connector applies [[Transport-level_Filtering|transport-level filtering]] and potentially discards the notification
19 1 J. Moringen
# The connector selects a [[Glossary|converter]] based on the [[Glossary|wire-schema]] stored in the notification
20 1 J. Moringen
# The converter converts the payload portion of the notification into a domain-object (which will become the event [[Glossary|payload]])
21 1 J. Moringen
# An event object is created and its fields are filled based on the content of the notification
22 1 J. Moringen
# The "receive" timestamp of the event is set to the current time
23 1 J. Moringen
# Event-level filters are applied and may lead to the event being discarded
24 1 J. Moringen
# The "deliver" timestamp of the event is set to the current time
25 1 J. Moringen
# The event object is returned to the calling client (a @Reader@ participant)
26 1 J. Moringen
27 1 J. Moringen
h2. Push-style Event Receiving
28 1 J. Moringen
29 1 J. Moringen
_The following processing happens in a dedicated thread of execution._
30 1 J. Moringen
31 1 J. Moringen
# A [[Glossary|connector]] receives a notification from its "wire"
32 1 J. Moringen
# The connector applies [[Transport-level_Filtering|transport-level filtering]] and potentially discards the notification
33 1 J. Moringen
# The connector selects a [[Glossary|converter]] based on the [[Glossary|wire-schema]] stored in the notification
34 1 J. Moringen
# The converter converts the payload portion of the notification into a domain-object (which will become the event [[Glossary|payload]])
35 1 J. Moringen
# An event object is created and its fields are filled based on the content of the notification
36 1 J. Moringen
# The "receive" timestamp of the event is set to the current time
37 1 J. Moringen
# Event-level filters are applied and may lead to the event being discarded
38 1 J. Moringen
# The "deliver" timestamp of the event is set to the current time
39 1 J. Moringen
# The event object is delivered to client-supplied (via a @Listener@ participant) handlers
40 1 J. Moringen
41 1 J. Moringen
h2. Event Sending
42 1 J. Moringen
43 1 J. Moringen
# [[Glossary|Scope]] and [[Glossary|type]] of the [[Events|event]] are checked against the scope and type of the @Informer@ object
44 1 J. Moringen
# The "send" timestamp of the event is set to the current time
45 1 J. Moringen
# For each [[Glossary|connector]]:
46 1 J. Moringen
## A [[Glossary|converter]] is selected based on the type and the [[Glossary|payload]] is converted to a suitable form for the connector
47 1 J. Moringen
## A [[Glossary|notification]] is created and converted payload and fields of the event are stored in the notification
48 1 J. Moringen
## The notification is sent over the respective "wire" by the connector