Performance Modeling and Benchmarking of Event-Based ... - DVS
Performance Modeling and Benchmarking of Event-Based ... - DVS
Performance Modeling and Benchmarking of Event-Based ... - DVS
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
58 CHAPTER 4. PERFORMANCE ENGINEERING OF EVENT-BASED SYSTEMS<br />
underlying scenario <strong>of</strong> this scenario, the consumer wants to pull all existing <strong>Event</strong> tokens. Since<br />
the number <strong>of</strong> existing <strong>Event</strong> tokens is changing, our model has to dynamically adjust itself to<br />
pull all tokens.<br />
As illustrated in Figure 4.13 we model Phase I similar to Pattern 4 by defining a Timer<br />
place <strong>and</strong> a token named Disconnected. While the Timer is processing the Disconnected token<br />
(<strong>and</strong> the Disconnected exists), the consumer is disconnected. In Phase II the connection is<br />
established: the Disconnected token is transformed by transition T3 to a Trigger token. This<br />
token is stored in an ordinary place named Trigger Store. While the Trigger token exists, the<br />
consumer is connected to the broker. When the connection is established, the consumer tries<br />
to pull all waiting event notifications (Phase III ). The number <strong>of</strong> notifications are waiting for<br />
the consumer is unknown. Therefore, we pull them one by one by firing transition T2-I for<br />
each <strong>Event</strong> notification. If no further <strong>Event</strong> exists in the depository <strong>of</strong> the broker, the consumer<br />
closes the connection. In our model this is performed by transition T2-II which transforms the<br />
Trigger token back to a Disconnected token. It has to be guaranteed that T2-II is only fired if<br />
no further <strong>Event</strong> tokens exist (→ transition priorities).<br />
QPN Definition<br />
Places:<br />
Place Type Description<br />
Producer S Publishes events.<br />
Broker Q Stores all incoming events.<br />
Timer Q Timer queue (scheduling strategy: Infinite Server). If the<br />
Timer is empty, the consumer is connected to the broker.<br />
Trigger Store O Stores Trigger token. If the consumer is disconnected, it is<br />
empty.<br />
Consumer S Pulls events from broker.<br />
Colors:<br />
Color<br />
<strong>Event</strong><br />
Trigger<br />
Disconnected<br />
Description<br />
Represents the published event.<br />
Triggers pull comm<strong>and</strong>s.<br />
Represents disconnected state.<br />
Init No. <strong>of</strong> Colors:<br />
Color Place Count<br />
Trigger Trigger Store 1<br />
Transitions:<br />
Id Input Output FW Description<br />
T1 1 <strong>Event</strong> (P roducer) 1 <strong>Event</strong> (Broker) 1 Producer publishes<br />
event.<br />
T2-I 1 <strong>Event</strong> (Broker) 1 <strong>Event</strong> (Consumer) ∞ Pull one event.<br />
1 Trigger (Trigger 1 Trigger (Trigger<br />
Store)<br />
T2-II 1 Trigger (Trigger<br />
Store)<br />
T3<br />
1 Disconnected (Trigger<br />
Store)<br />
Store)<br />
1 Disconnected<br />
(T imer)<br />
1 If no event is available<br />
→ go back to sleep.<br />
1 <strong>Event</strong> (Broker) 1 Establishes a connection.