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.

4.2. PERFORMANCE MODELING PATTERN 49<br />

Subscriber<br />

1‘Sub.<br />

State State A A<br />

1‘Sub. A A<br />

1‘Sub. 1‘Sub.<br />

Subscriber Subscriber A A<br />

1‘Sub. 1‘Sub. A A<br />

Init<br />

Controller Init Init<br />

(a) Initialization<br />

Controller Controller<br />

State A<br />

State A<br />

Controller<br />

Controller<br />

Broker<br />

Broker<br />

Subscriber A<br />

Subscriber A<br />

State B<br />

1‘State A<br />

State B<br />

1‘State A<br />

1‘State B<br />

1‘State B<br />

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

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

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

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

Controller<br />

Controller<br />

1‘State B<br />

1‘State B<br />

1‘State B<br />

1‘State B 1‘Sub. B<br />

1‘Sub. B<br />

1‘Sub. A<br />

1‘Sub. A<br />

Controller<br />

Controller<br />

Subscriber B<br />

Subscriber B<br />

1‘Not.<br />

1‘Not.<br />

Notification<br />

Notification<br />

Controller<br />

Controller<br />

Broker<br />

Broker<br />

1‘State B<br />

1‘State B<br />

1‘State B<br />

1‘State B<br />

1‘Sub. B<br />

1‘State B<br />

1‘State B<br />

1‘Sub. Controller<br />

1‘Sub. 1‘State A B 1‘Sub. B<br />

1‘Sub. 1‘State A B 1‘Sub. B<br />

Controller<br />

1‘Sub. A 1‘Not.<br />

1‘Sub. A<br />

1‘Not.<br />

Controller<br />

Controller<br />

1‘Not.<br />

1‘Not.<br />

Broker<br />

Broker<br />

Broker<br />

Broker<br />

(b) Generate Notifications<br />

Figure 4.10: Example for Pattern 3<br />

cardinality <strong>of</strong> the transitions. The number <strong>of</strong> Subscriber tokens can be set either by modifying<br />

the number <strong>of</strong> initial tokens in the system or by adjusting them dynamically at simulation time.<br />

The idea is that for an incoming event a notification is created for each Subscriber token <strong>and</strong><br />

forwarded to the consumers.<br />

For this purpose we introduce an ordinary place Controller <strong>and</strong> define two colors, State A<br />

<strong>and</strong> State B, in QPNs. These colors are used to represent whether the Controller is either in<br />

state A or B, depending on the token stored in its depository. Further, for each subscriber, a<br />

token Subscriber A or Subscriber B depending on the state exists.<br />

An incoming <strong>Event</strong> triggers a state change from state A to B (or vice versa). As a response<br />

to an incoming <strong>Event</strong> the configured number <strong>of</strong> event notifications is generated. This is implemented<br />

by Transition 2-III / 2-IV (see Figure 4.9). As a reaction to a state change from A (B)<br />

to B (A), all n Subscriber A (B) tokens are transformed to n Subscriber B (A) tokens stored in<br />

the Controller <strong>and</strong> to n Notification tokens forwarded to the consumer.<br />

For a better underst<strong>and</strong>ing, we provide a detailed description <strong>of</strong> the different steps <strong>and</strong> states.<br />

The underlying transitions are illustrated in Figure 4.9.<br />

1. System Initialization<br />

First, we configure the number <strong>of</strong> subscribers by setting the initialization number <strong>of</strong> Subscriber<br />

tokens n. These n tokens are then transformed by transition T0 to n Subscriber A<br />

tokens stored in the Controller place. This step is illustrated in Figure 4.10(a). Transition<br />

T0 is only fired once at system initialization time.

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

Saved successfully!

Ooh no, something went wrong!