20.01.2015 Views

Performance Modeling and Benchmarking of Event-Based ... - DVS

Performance Modeling and Benchmarking of Event-Based ... - DVS

Performance Modeling and Benchmarking of Event-Based ... - DVS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

54 CHAPTER 4. PERFORMANCE ENGINEERING OF EVENT-BASED SYSTEMS<br />

Pattern 4: Time Controlled Pull I<br />

Timer<br />

1‘<strong>Event</strong> 1‘<strong>Event</strong> 1‘<strong>Event</strong> 1‘<strong>Event</strong><br />

Producer<br />

T1<br />

Broker<br />

T2<br />

Consumer<br />

T2-I: Pull <strong>Event</strong><br />

T2-II: Go back to sleep<br />

Broker<br />

<strong>Event</strong><br />

Timer<br />

Trigger<br />

1<br />

1<br />

1<br />

1<br />

Consumer<br />

<strong>Event</strong><br />

Timer<br />

Trigger<br />

Timer<br />

Trigger<br />

1<br />

1<br />

Timer<br />

Trigger<br />

Figure 4.12: Time-Controlled Pull Pattern<br />

Characteristics<br />

• Pull-based communication<br />

• Time controlled behavior: the consumer connects frequently to the broker to pull one event<br />

after a certain time interval.<br />

Example<br />

An event consumer connects frequently to a broker to check whether notifications are waiting.<br />

If yes, he downloads exactly one <strong>of</strong> them to process it. Afterwards, the consumer closes the<br />

connection <strong>and</strong> waits a specified period <strong>of</strong> time before reconnecting.<br />

A real world scenario represented by this pattern are Wireless-Sensor Networks (WSN). To<br />

save battery, the nodes are mostly disconnected. However, they connect frequently for a short<br />

moment to other nodes to exchange events <strong>and</strong> data.<br />

Description<br />

In modeling techniques such as QPNs, events are pushed by transitions from one place to another,<br />

e.g., after an event was served at one place, it is pushed to the next place. However, in scenarios<br />

like our example we are facing pull-based communication behavior <strong>and</strong> an approach is needed to<br />

reflect this in our models. Therefore we introduce a methodology how pull-based communication<br />

can be modeled using, e.g., QPNs. To model all aspects <strong>of</strong> our scenario, we presents additionally<br />

a way to implement time-controlled behavior.<br />

In our scenario the Consumer connects frequently to the Broker, tries to pull, if available,<br />

exactly one event <strong>and</strong> disconnect. To model this behavior, we need a timer which is responsible<br />

for establishing the connection. As shown in Figure 4.12 we implement the timer by adding a<br />

queuing place Timer (scheduling strategy: infinite server) <strong>and</strong> a new token color named Trigger,<br />

which triggers the establishment <strong>of</strong> the connections <strong>and</strong> the pull attempt after a certain time

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!