Event producers and consumers

advertisement
Event Processing
Course
Producers and consumers
(relates to chapters 4 + 5)
Lecture outline
• Event producer – concept and definition element
• Event consumer – concept and definition element
• Type of event producers
• Type of event consumers
• Event consumers and producers in the Fast
Flower Delivery example
Copyright ©2009 Opher Etzion
2
Event Producer
Building Block describing
event Producer
Icon:
Producer Details:
Output Terminals:
Event Producer Category
Definition Element Type
Event Producer Identifier
Annotation
Query Capability
Event Types
Targets
Relationship to other producers
Generalization / Specialization
Copyright ©2009 Opher Etzion
3
Output terminals
Channel
Producer
Event types: A collection of event
type identifiers showing the types of
events that can be emitted through
this output terminal. An output
terminal can have one or more event
types associated with it. This
association is not exclusive (an
event producer can have the same
event type associated with multiple
o u t p u t
t e r m i n a l s )
Targets: The identifier of the
channel or other EPN which serves
as a sink of the output terminal.
Each output terminal can have zero
o r
m o r e
t a r g e t s .
Copyright ©2009 Opher Etzion
4
Producers types
Sensing
producers
Reporting
producers
Push
Hardware
Physical Sensors
Embedded Sensors
Detectors
Cameras, Microphones
Human interaction
Application programs
Verification and payment
Location and Presence
Social communications
Surveillance
Pull /
queriable
Copyright ©2009 Opher Etzion
5
Software
Simulated Sensors
Applications
Instrumentation
Adaptors
Data Feeds
Producer – State Observer in workflows
State observer
Push:
Instrumentation points;
Pull:
Query the state
Copyright ©2009 Opher Etzion
6
Producer – active database
after
before
insert
modify
Retrieve
Database
delete
transaction
Copyright ©2009 Opher Etzion
7
Producer – Code instrumentation
Copyright ©2009 Opher Etzion
8
Producer – syndication
Copyright ©2009 Opher Etzion
9
Producer – sensors
Copyright ©2009 Opher Etzion
10
Producers – streams to events
Copyright ©2009 Opher Etzion
11
Producers – meters
Copyright ©2009 Opher Etzion
12
Producer – monitors
Copyright ©2009 Opher Etzion
13
Producer – simulators
Copyright ©2009 Opher Etzion
14
Event Consumer
Building Block describing
event consumer
Icon:
Consumer Details:
Input Terminals:
Event Consumer Category
Definition Element Type
Event Consumer Identifier
Annotation
Event Types
Filters
Sources
Relationship to other consumers
Generalization / Specialization
Copyright ©2009 Opher Etzion
15
Input terminals
Channel
Consumer
Event types:
A
collection of event type
identifiers showing the
types of events that can
be accepted by this
input terminal. An input
terminal can have one
or more event types
associated with it.
Sources: Identifiers of
channels or other EPN
entities which can send
e ve n t s t o th e in p u t
terminal. Each input
terminal can have zero
or more sources.
Copyright ©2009 Opher Etzion
16
Event consumers types
Hardware
Physical Actuators
Industrial control
Lighting systems
HVAC
Home automation
Human interaction
Alarm systems
eMail, SMS, telephony
Computer User Interfaces
News feeds
Social Networking
Software
Event Logs
Business applications
Business Processes
State Machines
Copyright ©2009 Opher Etzion
17
Performance monitoring dashboard
Copyright ©2009 Opher Etzion
18
Additional dashboard
Copyright ©2009 Opher Etzion
19
Ambient Orb
Copyright ©2009 Opher Etzion
20
Sixth sense
Copyright ©2009 Opher Etzion
21
Tracking map
Copyright ©2009 Opher Etzion
22
Twitter as a consumer
Copyright ©2009 Opher Etzion
23
Business Process Management system as a consumer
Copyright ©2009 Opher Etzion
24
Copyright ©2009 Opher Etzion
25
FFD Producer - Store
THE STORE EVENT PRODUCER
We start with the definition element for the Store producer. Its definition element type is
producer class since the application treats all the participating flower stores in a similar
manner, so we can have a single event producer definition that represents them all.
Its event producer category is Human Interaction, as its delivery requests are
entered by personnel in the flower store, and it has four output terminals, as shown in table
B.40.
Table B.40 The output terminals for the Store event producer
Identifier
Event Types
Targets
Request
Delivery Request
Request enrichment EPA
Assignment
Manual Assignment
Assignment Channel
Confirm Pick-up
Pick-up Confirmation
Pick-up alert EPA
Cancelation
Delivery Request cancellation
Delivery Cancellation channel
Copyright ©2009 Opher Etzion
26
Driver as producer
THE DRIVER EVENT PRODUCER
The Driver event producer definition element represents all the drivers using the
application, so it too has a definition element type which has the value producer class.
Although the driver uses a handheld device to submit events, we still give the definition
element an event producer category of Human Interaction, since it is the driver that we
are modeling not the device (we are assuming here that there's a one-one association of
drivers to devices). The event producer's output terminals are shown in table B.41.
Table B.41 The output terminals for the Driver event producer
Identifier
Event Types
Targets
Bid
Delivery Bid
Delivery Bid Channel
Confirm
Delivery Confirmation
Delivery Alert EPA
Copyright ©2009 Opher Etzion
27
GPS Sensor as producer
THE GPS SENSOR EVENT PRODUCER
We have included the GPS Sensor event producer to illustrate producer specialization. This
event producer is abstract so, naturally, its definition element type is abstract type,
and, as you might expect, its event producer category is Sensor. The type has just
one output terminal, as shown in table B.42.
Table B.42 The output terminal for the GPS sensor abstract event producer
Identifier
Event Types
Targets
Report
GPS location
-
THE VEHICLE EVENT PRODUCER
Our final definition element is the Vehicle event producer. Its definition element type is
producer class as it represents all the vehicles that are being used for flower delivery. It
is a specialization of the GPS Sensor type, reflecting the fact that there is a physical GPS
sensor in each vehicle, and the events are actually produced by that sensor. Its event
producer category is therefore Sensor, just like the GPS Sensor type and, as you can see
from table B.43, it has the same output terminal.
Table B.43 The output terminal for the Vehicle event producer
Output Terminal
Event Type
Targets
Report Location
GPS Location
Location service EPA
Copyright ©2009 Opher Etzion
28
The Driver event consumer
THE DRIVER EVENT CONSUMER
The Driver definition element represents the class of all drivers and so it has a definition
element type of consumer class.
Its event consumer category is Human Interaction, and it has two input terminals as
shown in table B.44.
Table B.44 The input terminals for the Driver class
Input Terminal
Event Types
Source
Bids
Bid Request
Delivery request channel
Assignments
Assignment
Assignment channel
Copyright ©2009 Opher Etzion
29
The Store event consumer
Table B.45 The input terminals for the Store class
Input Terminal
Event Types
Source
Bids
Delivery Bid
Assignment request channel
Alerts
No Bidders Alert
Manual Assignment Timeout Alert
Pick-up Alert
Delivery Alert
Alerts channel
A store that has elected to do manual assignment will receive Delivery Bid requests from
drivers bidding for work on its Bids input terminal. Stores also receive alert events if
something goes wrong in the process, and we have chosen to have all alerts handled by a
single input terminal.
Copyright ©2009 Opher Etzion
30
The Drivers Guild event consumer
THE DRIVERS' GUILD EVENT CONSUMER
The Drivers' Guild event consumer feeds evaluation reports to the guild. Its definition
element type is consumer instance, as there is only one guild.
Its event consumer category is Human Interaction, and it a single input terminal as
shown in table B.46.
Table B.46 The input terminals for the Drivers' Guild.
Input Terminal
Event Types
Evaluation
Improvement Note
Driver Report
Copyright ©2009 Opher Etzion
31
Lecture Summary
• In this lecture
we have discussed the following
topics:
– The concept of event producer and consumer;
– Types of consumers and producers
– Their interaction with the event processing system
– The "Fast Flower Delivery" use case the accompanies
this book
Copyright ©2009 Opher Etzion
32
Download