14.03.2015 Views

Department Computer Science Distributed Systems VU University ...

Department Computer Science Distributed Systems VU University ...

Department Computer Science Distributed Systems VU University ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

3b The figure below shows how an RPC system works in practice. Explain what is in the runtime library.<br />

5pt<br />

Uuidgen<br />

Interface<br />

definition file<br />

IDL compiler<br />

Client code Client stub Header Server stub<br />

Server code<br />

#include<br />

#include<br />

C compiler<br />

C compiler<br />

C compiler<br />

C compiler<br />

Client<br />

object file<br />

Client stub<br />

object file<br />

Server stub<br />

object file<br />

Server<br />

object file<br />

Linker<br />

Runtime<br />

library<br />

Runtime<br />

library<br />

Linker<br />

Client<br />

binary<br />

Server<br />

binary<br />

Typically parameterizable calls to the underlying transport-level interface, but notably also library<br />

routines for converting data structures to host-independent representations.<br />

3c In RPC, a client needs to bind to a server. What does this mean and how can it be realized?<br />

Binding in this case means that the client makes all the necessary preparations to allow it to call<br />

procedures maintained by the server. It is accomplished by first having the server register, one way<br />

or the other, to which network-level and transport-level address it is accepting incoming requests.<br />

This can be done through a separate, well-known directory server. A client asks for this contact<br />

information, after which it can, for example, set up a TCP connection to the appropriate server.<br />

5pt<br />

4a Explain how name resolution works in Chord by resolving k = 30 starting from node 21 in the<br />

following example. Do the same for k = 19 from 21.<br />

5pt<br />

28<br />

27<br />

26<br />

25<br />

29<br />

30<br />

1 1<br />

2 1<br />

3 1<br />

4 4<br />

5 14<br />

31<br />

0 1<br />

1 4<br />

2 4<br />

3 9<br />

4 9<br />

5 18<br />

Finger table<br />

2<br />

3<br />

4<br />

5<br />

6<br />

1 9<br />

2 9<br />

3 9<br />

4 14<br />

5 20<br />

7<br />

1 28<br />

2 28<br />

3 28<br />

4 1<br />

5 9<br />

24<br />

23<br />

22<br />

21<br />

20<br />

1 21<br />

2 28<br />

3 28<br />

4 28<br />

5 4<br />

19<br />

18<br />

1 20<br />

2 20<br />

3 28<br />

4 28<br />

5 4<br />

17<br />

16<br />

15<br />

1 18<br />

2 18<br />

3 18<br />

4 28<br />

5 1<br />

14<br />

13<br />

12<br />

11<br />

10<br />

8<br />

9<br />

1 14<br />

2 14<br />

3 18<br />

4 20<br />

5 28<br />

1 11<br />

2 11<br />

3 14<br />

4 18<br />

5 28<br />

(1) 21 → 28 → 1. (2) 21 → 9 → 18 → 20.<br />

4b In Chord, the finger table entry FT p [i] of peer p is equal to succ(p + 2 i−1 ). Explain how Chord’s<br />

finger tables can be extended to incorporate proximity routing.<br />

There is no reason why p can’t just keep a whole number of references to nodes in the range [p +<br />

2 i−1 , p+2 i −1]. In that case, when it is required to look up a key k, it can decide to route that request<br />

to the peer with the smallest id ≥ k that it knows, but which is also closest to itself.<br />

5pt<br />

2

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

Saved successfully!

Ooh no, something went wrong!