24.05.2015 Views

Pastry - Irisa

Pastry - Irisa

Pastry - Irisa

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Given a message, the node first checks to see if the destId falls intherangeof<br />

:thei-thclosestnodeIdinthenamespacetable<br />

1 10233 01 02212102 10233 232<br />

, ,where<br />

negative/positive indices indicate nodeIds smaller/larger than the present nodeId, respectively.<br />

0 02212102 1023312<br />

0<br />

:thedomainofdestId Routing<br />

2<br />

algorithm at level (on . node<br />

02212102<br />

A)<br />

:thelengthoftheprefixsharedamong and ,inlevels.<br />

Namespace set<br />

10233021 10233033 10233120 10233122<br />

(1) if ( )<br />

(2) // is within range of our leaf namespace set set<br />

(3) forward to ,s.th. is minimal;<br />

(4) 4. The top else row of the routing table representsi<br />

level zero.<br />

Rl<br />

(5) // use the routing table<br />

line l, 0 ≤ l ≤ ⎣⎣<br />

(6) Let ;<br />

L<br />

(7) if ( )<br />

(8) forward to ;<br />

(9)<br />

(10) else<br />

(11) // rare case<br />

Fig. 1. State of a hypothetical <strong>Pastry</strong> node with nodeId 10233102,<br />

:entry of the routing table R,<br />

128/b<br />

:ith closest nodeId in the leafset<br />

⎦⎦<br />

0 ≤ i ≤ 2<br />

i<br />

2 We assume throughout this paper that DnodeIds l<br />

: value of are theuniformly l digits of key distributed. D<br />

(12) forward to ,s.th.<br />

(13) ,<br />

(14)<br />

(15)<br />

(16)<br />

.Allnumbersareinbase<br />

SHL(<br />

A,<br />

B) :length of the shared prefix between A and B<br />

b<br />

,

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

Saved successfully!

Ooh no, something went wrong!