Chord Systems-Parallel and Distributed Data Management-Assignment, Exercises of Distributed Database Management Systems

This assignment is related to Parallel and Distributed Data Management course. It was submitted to Prof. Naresh Bhatt at All India Institute of Medical Sciences. Its main points are: Chord, System, Address, Space, Nodes, Periodic, Stabilization, Hash, Table, Lookup

Typology: Exercises

2011/2012

Uploaded on 07/16/2012

samit
samit 🇮🇳

5

(1)

27 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS347 Last Homework
Peer to Peer Systems, Open-Source Systems
Due: Wednesday June 6, 2012
Problem 1
---------
Consider a Chord system with m=7 (address space goes from 0 to 127).
Nodes whose ids hash to the following values have joined: 15, 35, 55,
75, 95, 115. Show the finger table for node 35. Use a table
analogous to the one in Slide 23 (in P2P Notes).
Problem 2
---------
Consider a Chord system with nodes with ids that hash to 1 and to 10.
At the same instant of time, three nodes join: one has id that hashes
to 2, another one hashes to 4 and the third hashes to 7.
(a) Assume that after the three nodes join, they execute their
periodic stabilization (slide 36, P2P Notes) in the order: 7, 4, 2, 1.
Assume that after each stabilize call, the corresponding notify call
is made and completed before the next stabilized call is made. Show
the resulting pred and succ links for each node (after the 4
stabilize calls complete, and before any other calls) in a diagram
like the one in slide 40 (P2P Notes). Use solid arrows for the succ
links, dashed arrows for the pred links.
(b) Same question as part (a) except that the stabilize calls are in
the order: 2, 4, 7, 1. Again, show the resulting links in a diagram.
Problem 3
---------
(a) Slides 74-80 (P2P Notes) show the seven steps executed when a node
joins a replicated hash table. For each of these steps (slides),
state what happens to lookups for keys with hash 0 executed at N0,
when the state is as shown. (In particular, is the lookup executed
locally? Is it forwarded to some other node?) Then state what happens
to lookups (again for keys with hash 0) executed at N1. Finally,
explain what happens to N2 lookups.
(b) Same question as part (b) except that you should now state what
happens to inserts.
Problem 4
----------
In class we discussed a map-reduce strategy for sorting a set of
numbers, using an example (Slide 21, MapReduce Notes). In that
example, the input was a set of 3 unsorted files, each containing
(key, value) pairs. The output was two files sorted on the key field.
docsity.com
pf3

Partial preview of the text

Download Chord Systems-Parallel and Distributed Data Management-Assignment and more Exercises Distributed Database Management Systems in PDF only on Docsity!

CS347 Last Homework Peer to Peer Systems, Open-Source Systems

Due: Wednesday June 6, 2012

Problem 1

Consider a Chord system with m=7 (address space goes from 0 to 127). Nodes whose ids hash to the following values have joined: 15, 35, 55, 75, 95, 115. Show the finger table for node 35. Use a table analogous to the one in Slide 23 (in P2P Notes).

Problem 2

Consider a Chord system with nodes with ids that hash to 1 and to 10. At the same instant of time, three nodes join: one has id that hashes to 2, another one hashes to 4 and the third hashes to 7.

(a) Assume that after the three nodes join, they execute their periodic stabilization (slide 36, P2P Notes) in the order: 7, 4, 2, 1. Assume that after each stabilize call, the corresponding notify call is made and completed before the next stabilized call is made. Show the resulting pred and succ links for each node (after the 4 stabilize calls complete, and before any other calls) in a diagram like the one in slide 40 (P2P Notes). Use solid arrows for the succ links, dashed arrows for the pred links.

(b) Same question as part (a) except that the stabilize calls are in the order: 2, 4, 7, 1. Again, show the resulting links in a diagram.

Problem 3

(a) Slides 74-80 (P2P Notes) show the seven steps executed when a node joins a replicated hash table. For each of these steps (slides), state what happens to lookups for keys with hash 0 executed at N0, when the state is as shown. (In particular, is the lookup executed locally? Is it forwarded to some other node?) Then state what happens to lookups (again for keys with hash 0) executed at N1. Finally, explain what happens to N2 lookups.

(b) Same question as part (b) except that you should now state what happens to inserts.

Problem 4

In class we discussed a map-reduce strategy for sorting a set of numbers, using an example (Slide 21, MapReduce Notes). In that example, the input was a set of 3 unsorted files, each containing (key, value) pairs. The output was two files sorted on the key field.

Say we are not happy with this output because the sorted files need to be merged. Instead, say we want the output to be two sorted files, where the first one contains all keys less than or equal to 5, and the second one contains all keys larger than 5. Thus, for this example input data, one file should contain (in key order) the pairs (1,a), (2,b), (3,c), (4,d) and (5,e), and the other should contain (6,f),(6,f*), (7,g), (8,h) and (9,i).

Write the map and reduce functions that will produce these two sorted files. You can use pseudo-code.

Problem 5

In class we have surveyed open-source data processing systems. Please state if the following statements are true or false.

(a) In MemCacheD, caches on different servers to not interact with each other.

(b) Client data is ZooKeeper is organized as a key-value store.

(c) ZooKeeper operates as long as a majority of its clients are available.

(d) A Kestrel server writes a log to ensure its queue is persistent.

(e) In Cassandra/HBase, horizontal partitioning can be done automatically, but vertical partitioning (of a multi-attribute table) must be done manually as schema design time.

(f) S4 is a stream data processing system.

(g) Hyracks makes available a library of operators and connectors for use by application writers.

(h) Map-reduce (or Hadoop) can easily run of top of Pregel.

(i) In Hyracks, an operator can be defined in terms of activities.

(j) In Pregel, the master node can periodically checkpoint the state of the worker computers.

Problem 6

In class, we discussed how the maximum node value in a graph can be computed in Pregel (Slide 46).

Write a similar procedure to count the total number of nodes in a graph. Assume the graph is connected. Do not worry about efficiency