15.01.2015 Views

4th International Conference on Principles and Practices ... - MADOC

4th International Conference on Principles and Practices ... - MADOC

4th International Conference on Principles and Practices ... - MADOC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 10: UML diagram of the Juxta-CAT Outbox<br />

manager.<br />

a timeout limit. We have defined a time interval, in<br />

a way that any failed c<strong>on</strong>necti<strong>on</strong> retries the delivery<br />

with an increased timeout. We give in Table 1 the<br />

values for the timeout window used in Juxta-CAT.<br />

Table 1: Timeout Window for sending <strong>and</strong> receiving.<br />

Tries 1 2 3 4 5 > 5<br />

Broker’s<br />

Sending 1750 2500 4000 6000 12000 18000<br />

Window<br />

(millisec)<br />

Client<br />

Sending 2000 3500 6000 12000 18000 30000<br />

Window<br />

(millisec)<br />

During the testing phase of Juxta-CAT we observed that<br />

the number of lost messages ranges in 0% - 1% of the total<br />

number of sent messages, which requires sending them again.<br />

4.2 The allocati<strong>on</strong> of jobs to resources<br />

Allocati<strong>on</strong> of jobs to resources is a key issue in order to<br />

assure a high performance of applicati<strong>on</strong>s running <strong>on</strong> the<br />

Juxta-CAT. In this secti<strong>on</strong> we show the algorithm implemented<br />

by brokers to allocate requests to the resources (see<br />

Fig. 11 for an UML diagram representati<strong>on</strong>.)<br />

The algorithm can be seen as a simple price-based model<br />

<strong>and</strong> uses historical informati<strong>on</strong> maintained by Juxta-Cat<br />

brokers. Therefore, it is fundamental for any broker to maintain<br />

updated informati<strong>on</strong> about the state of the network <strong>and</strong><br />

statistics <strong>on</strong> the performance of the nodes of the grid.<br />

When a broker receives an executi<strong>on</strong> request, it will c<strong>on</strong>sult<br />

its own historical informati<strong>on</strong> <strong>and</strong> use it (according to<br />

the price-model) to determine the price of the allocati<strong>on</strong> to<br />

different nodes <strong>and</strong> finally will decide which is the “cheapest”<br />

c<strong>and</strong>idate to execute this request. This policy of task<br />

allocati<strong>on</strong> is comm<strong>on</strong> for all brokers in Juxta-CAT.<br />

The allocati<strong>on</strong> algorithm works as follows. Based <strong>on</strong> the<br />

historical informati<strong>on</strong> <strong>on</strong> the nodes, the broker uses a set of<br />

criteria to compute a score for each c<strong>and</strong>idate node. These<br />

Figure 11: UML diagram of the allocati<strong>on</strong> model<br />

used by brokers of Juxta-CAT.<br />

criteria are quantitative <strong>and</strong> can be independent am<strong>on</strong>g them.<br />

Altogether, these criteria must c<strong>on</strong>tribute to bring knowledge<br />

to the broker about the “ec<strong>on</strong>omic saving” that would<br />

report any c<strong>and</strong>idate node for the given task resoluti<strong>on</strong>. The<br />

score for any node is computed according to the following<br />

criteria:<br />

1. Total amount of resolved jobs: the larger is this number<br />

the better is the node <strong>and</strong> vice-versa.<br />

2. Number of enqueued jobs waiting for executi<strong>on</strong>: the<br />

larger is this number the worse is the node <strong>and</strong> viceversa.<br />

3. Number of enqueued JXTA messages waiting to be<br />

sent: the larger is this number the worse is the node<br />

<strong>and</strong> vice-versa.<br />

4. Average number of resolved versus failed jobs: the<br />

larger is the number of successfully resolved jobs <strong>and</strong><br />

smaller the number of uncompleted jobs, the better is<br />

the node <strong>and</strong> vice-versa.<br />

5. Average number of successfully sent messages to the<br />

P2P network: the larger is this number the better is<br />

the node <strong>and</strong> vice-versa.<br />

We use a simple scoring system. The c<strong>and</strong>idate which<br />

receives the best score in a criteri<strong>on</strong> will receive a fixed value<br />

of 10 points. The sec<strong>on</strong>d best node has the sec<strong>on</strong>d better<br />

score, 8 points. The rest of scores are 6, 5, 4, 3, 2 <strong>and</strong> 1<br />

respectively. Furthermore, the scores of the c<strong>and</strong>idates are<br />

weighted according to the user’s priority, that is, the user<br />

of the applicati<strong>on</strong> can indicate to the Juxta-CAT which is<br />

the most important criteri<strong>on</strong>, the sec<strong>on</strong>d most important<br />

criteri<strong>on</strong> <strong>and</strong> so <strong>on</strong>.<br />

Thus, by letting N the number of c<strong>and</strong>idate nodes for<br />

the task resoluti<strong>on</strong>, K the total number of criteria, w i the<br />

weight or priority of criteri<strong>on</strong> i <strong>and</strong> S(i, j) the score of the<br />

ith c<strong>and</strong>idate under criteri<strong>on</strong> j, then the total score S i of<br />

the ith c<strong>and</strong>idate node is:<br />

S i =<br />

K∑<br />

w i · S(i, j).<br />

j=1<br />

77

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

Saved successfully!

Ooh no, something went wrong!