EventProcessing » History » Version 4

J. Moringen, 06/23/2011 09:34 PM
added event sending diagram

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 3 J. Moringen
#* Based on envelope information and meta-data of the notification
20 3 J. Moringen
#* Based on the (serialized) payload portion of the notification
21 1 J. Moringen
# The connector selects a [[Glossary|converter]] based on the [[Glossary|wire-schema]] stored in the notification
22 1 J. Moringen
# The converter converts the payload portion of the notification into a domain-object (which will become the event [[Glossary|payload]])
23 2 J. Moringen
# An [[Events|event]] object is created and its fields are filled based on the content of the notification
24 1 J. Moringen
# The "receive" timestamp of the event is set to the current time
25 1 J. Moringen
# Event-level filters are applied and may lead to the event being discarded
26 1 J. Moringen
# The "deliver" timestamp of the event is set to the current time
27 1 J. Moringen
# The event object is returned to the calling client (a @Reader@ participant)
28 1 J. Moringen
29 1 J. Moringen
h2. Push-style Event Receiving
30 1 J. Moringen
31 1 J. Moringen
_The following processing happens in a dedicated thread of execution._
32 1 J. Moringen
33 1 J. Moringen
# A [[Glossary|connector]] receives a notification from its "wire"
34 1 J. Moringen
# The connector applies [[Transport-level_Filtering|transport-level filtering]] and potentially discards the notification
35 3 J. Moringen
#* Based on envelope information and meta-data of the notification
36 3 J. Moringen
#* Based on the (serialized) payload portion of the notification
37 1 J. Moringen
# The connector selects a [[Glossary|converter]] based on the [[Glossary|wire-schema]] stored in the notification
38 1 J. Moringen
# The converter converts the payload portion of the notification into a domain-object (which will become the event [[Glossary|payload]])
39 2 J. Moringen
# An [[Events|event]] object is created and its fields are filled based on the content of the notification
40 1 J. Moringen
# The "receive" timestamp of the event is set to the current time
41 1 J. Moringen
# Event-level filters are applied and may lead to the event being discarded
42 1 J. Moringen
# The "deliver" timestamp of the event is set to the current time
43 1 J. Moringen
# The event object is delivered to client-supplied (via a @Listener@ participant) handlers
44 1 J. Moringen
45 1 J. Moringen
h2. Event Sending
46 1 J. Moringen
47 4 J. Moringen
!>event-sending.png!
48 1 J. Moringen
# [[Glossary|Scope]] and [[Glossary|type]] of the [[Events|event]] are checked against the scope and type of the @Informer@ object
49 1 J. Moringen
# The "send" timestamp of the event is set to the current time
50 1 J. Moringen
# For each [[Glossary|connector]]:
51 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
52 1 J. Moringen
## A [[Glossary|notification]] is created and converted payload and fields of the event are stored in the notification
53 1 J. Moringen
## The notification is sent over the respective "wire" by the connector