22. The overlay network in a P2P file sharing system consists of the nodes
participating in the file sharing system and the logical links between the nodes.
There is a logical link (an “edge” in graph theory terms) from node A to node B if
there is a semi-permanent TCP connection between A and B. An overlay network
does not include routers. With Gnutella, when a node wants to join the Gnutella
network, it first discovers (“out of band”) the IP address of one or more nodes
already in the network. It then sends join messages to these nodes. When the node
receives confirmations, it becomes a member of the of Gnutella network. Nodes
maintain their logical links with periodic refresh messages.
23. It is a hybrid of client server and P2P architectures:
a) There is a centralized component (the index) like in the case of a client
server system.
b) Other functions (except the indexing) do not use any kind of central server.
This is similar to what exists in a P2P system.
24. Whenever a user, say Alice wants to locate another user in the instant messaging
system, say Bob, her node would send out a query message asking for the (unique)
username (Bob) into the overlay network, which would be flooded into the
network in the same manner a query requesting the location of a resource (eg: a
file in Gnutella network) is flooded. If the user with the username (Bob) is online,
as the query reaches the node where the user is online from, the node sends back
the query response to the original query source (Alice). In this way, Alice locates
the IP address of the node Bob is currently at in the instant messaging system.
The advantage of such a design is that there is no centralized component in the
system and hence no single point of failure. The disadvantage however, is that the
flooding of each such request into the overlay network results in huge traffic in
the network. One option is to have limited scope query as in Gnutella. However,
with this approach, the user might not be located even if she is online.
25. a) User location
b) NAT traversal
26. a) File Distribution
b) Instant Messaging
c) Video Streaming
d) Distributed Computing
27. With the UDP server, there is no welcoming socket, and all data from different
clients enters the server through this one socket. With the TCP server, there is a
welcoming socket, and each time a client initiates a connection to the server, a
new socket is created. Thus, to support n simultaneous connections, the server
would need n+1 sockets.
28. For the TCP application, as soon as the client is executed, it attempts to initiate a
TCP connection with the server. If the TCP server is not running, then the client