Performance Modeling and Benchmarking of Event-Based ... - DVS
Performance Modeling and Benchmarking of Event-Based ... - DVS
Performance Modeling and Benchmarking of Event-Based ... - DVS
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
4.2. PERFORMANCE MODELING PATTERN 69<br />
Pattern 10: Round-robin Load Balancer<br />
Load Balancer<br />
T1: Round Robin<br />
Consumer 1<br />
<strong>Event</strong><br />
Consumer 1<br />
Load Balancer<br />
<strong>Event</strong><br />
Consumer 2<br />
<strong>Event</strong><br />
...<br />
...<br />
...<br />
Load<br />
Balancer<br />
T1<br />
...<br />
Consumer 2<br />
Consumer n<br />
NextIsC1<br />
NextIsC2<br />
...<br />
NextIsCn<br />
Consumer n<br />
<strong>Event</strong><br />
Load Balancer<br />
NextIsC1<br />
...<br />
NextIsC2<br />
Figure 4.19: Load Balancer - Round Robin<br />
Characteristics<br />
• Load balancing<br />
• Round-robin<br />
Example<br />
Incoming events are processed by a load balancer <strong>and</strong> afterwards distributed among event consumers<br />
in a round robin manner. Each event is forwarded to exactly one consumer.<br />
Description<br />
Incoming events are arriving at the place Load Balancer <strong>and</strong> forwarded to the Consumer by<br />
transition T1. For each Consumer exists an own mode in transition T1. Further, a token named<br />
NextIsC i is defined. i is the unique id <strong>of</strong> the consumer, e.g. for Consumer 1 the color name is<br />
NextIsC1. To implement a round robin behavior the load balancer needs to keep track which<br />
Consumer is next. We model this knowledge by storing a NextIsC i token in the Load Balancer.<br />
This token identifies the Consumer i who should receive the next <strong>Event</strong>. As illustrated in Figure<br />
4.19, the modes <strong>of</strong> transition T1 takes into account, which consumer is next <strong>and</strong> update the<br />
state <strong>of</strong> the Load Balancer by replacing the NextIsC i token with a NextIsC i+1 token.<br />
For example, if an <strong>Event</strong> token <strong>and</strong> a NextIsC1 token are stored in the depository place<br />
<strong>of</strong> the load balancer, the corresponding mode <strong>of</strong> transition T1 is fired. The <strong>Event</strong> token is<br />
forwarded to Consumer 1 <strong>and</strong> the NextIsC1 token is replaced by a NextIsC2 token.<br />
To initialize the model we have to specify the consumer that should receive the first <strong>Event</strong><br />
token. This is done by initializing the corresponding NextIsC i token.