1. Q: If a client and a server are placed far apart, we may see network
latency dominating overall performance. How can we tackle this problem?
A: It really depends on how the client is organized. It may be possible to divide the client-side code into smaller parts that can run separately. In that case, when one part is waiting for the server to respond, we can schedule another part. Alternatively, we may be able to rearrange the client so that it can do other work work after having sent a request to the server. This last solution effectively replaces the synchronous client-server communication with asynchronous one-way communication.
2. Q: What is a three-tiered client-server architecture?
A: A three-tiered client-server architecture consists of three logical layers, where each layer is, in principle, implemented at separate machine. The highest layer consists of a client user interface, the middle layer contains the actual application, and the the lowest layer implements the data that are being used.
3. Q: What is the difference between a vertical distribution and a horizontal distribution?
A: Vertical distribution refers to the distribution of the different layers in a multitiered architectures across multiple machines. In principle, each layer is implemented on a different machine. Horizontal distribution deals with the distribution of a single layer across multiple machines, such as distributing a single database.
4. Q: Consider a chain of processes P1 , P2 , ..., P n implementing
a multitiered client-server architecture. Process P i is client of
process P i+1 , and P i will return a reply to P i−1 only after
receiving a reply from P i+1 . What are the main problems with this
organization when taking a look at the request-reply performance at
process P1 ?
A: Performance can be expected to be bad for large n. The problem is that each communication between two successive layers is, in principle, between two different machines. consequently, the performance between P1 and P2 may also be determined by n-2 request-replay interactions between the other layers. Another problem is that if one machine in the chain performs badly or is even temporarily unreachable, then this will immediately degrade the performance at the highest level.
5. Q: In a structured overlay network, messages are routed
according to the topology of the overlay. What is an important
disadvantage of this approach?
A: The problem is that we are dealing only with logical paths. It may very well be the case that two nodes A and B which are neighbors in the overlay network are physically placed far apart. As a consequence, the logically short path between A and B may require routing a message along a very long path in the underlying physical network.
6. Q: Consider the CAN network
from Fig. 2-8. How would you route a message from the node with
coordinates (0.2,0.3) to the one with coordinates (0.9,0.6)?
A: There are several possiblities, but if we want to follow the shortest path according to a Euclidean distance, we should follow the route (0.2,0.3) -> (0.6,0.7) -> (0.9,0.6), which has a distance of 0.882. The alternative route 90.2,0.3) -> (0.7,0.2) -> (0.9,0.6) has a distance of 0.957.
7. Q: Considering that a node in CAN knows the coordinates of its
immediate neighbors, a reasonable routing policy would be to forward a
message to the closest node toward the destination. How good is this policy?
A: In our example from the previous question, it can already be seen that it need not lead to the best route. If node (0.2,0.3) follows this policy for the message destined for node (0.9,0.6), it would send it off to node (0.7,0.2).
8. Q: Consider an unstructured overlay network in which each node
randomly chooses c neighbours. If P and Q are both neighbours of R, what
is the probability that they are also neighbours of each other?
A: Consider a network of N nodes. If each node chooses c neighbours at random, then the probability that P will choose Q, or Q chooses P is roughly 2c/(N-1).
10.
Q: Not every node in a peer-to-peer network should become superpeer.
What are reasonable requirements that a superpeer should meet?
A: In the first place, the node should be highly available, as many other nodes rely on it. Also, it should have enough capacity to process requests. Most important perhaps is that fat that it can be trusted to do its job well.