Question

In: Computer Science

This problem is about query flooding in P2P networks. Here, we explore the reverse-path routing of...

This problem is about query flooding in P2P networks. Here, we explore the reverse-path routing of the QueryHit messages in Gnutella. Suppose that Alice issues a Query message. Furthermore, suppose that Bob receives the Query message (which may have been forwarded by several intermediate peers) and has a file that matches the query.

5.1. As we know when a peer has a matching file, it sends a QueryHit message along the reverse path of the corresponding Query message. An alternative design would be for Bob to establish a direct TCP connection with Alice and send the QueryHit message over this connection. What are the advantages and disadvantages of such an alternative design?

5.2 In the Gnutella protocol, when the peer Alice generates a Query message, it inserts a unique ID in the message’s MessageID field. When the peer Bob has a match, it generates a QueryHit message using the same MessageID as the Query message. Describe how peers can use the MessageID field and local routing tables to accomplish reverse-path routing.

5.3. An alternative approach, which does not use message identifiers, is as follows. When a query message reaches a peer, before forwarding the message, the peer augments the query message with its IP address. Describe how peers can use this mechanism to accomplish reverse-path routing.

Solutions

Expert Solution

5.1.

The Advantage is: The QueryHit message is router by the underlying internet without passing through intermediate peers. Thus the delay in sending the message from Bob to Alice will be less.

The disadvantage is: Each peer that has a match would ask Alice to open a TCP connection. So, Alice may have to open hundreds of TCP connections for a given query.

5.2.

  • When a QueryHit message enters a peer, the peer records the MessageID in a table along with an identifier of the TCP socket from which the message is arrived.
  • When the same peer receives a QueryHit message with the same MessageID , it can index the table and determines the socket to which it should forward the message.

5.3.

  • When the query message reaches Bob, it contains an ordered list of all the IP addresses of the peers the message passed through between Alice and Bob.
  • When Bob sends back a QueryHit message, it will copy the ordered list into the message.
  • When a peer receives the QueryHit message, it can use the list to determine the next peer in reverse path.

Related Solutions

Let’s explore the scientific method. Here is the situation: We are planting a garden. We have...
Let’s explore the scientific method. Here is the situation: We are planting a garden. We have a variety of bulbs and potted plants. We do not have any directions on how or when to plant each of these items. We do not have any gardening books, magazines, or access to the Internet (Oh, the horror!). We need to observe a number of characteristics for these plants. What are some of the characteristics that we want to observe? What might be...
4) In this problem, we will explore how the cardinality of a subset S ⊆ X...
4) In this problem, we will explore how the cardinality of a subset S ⊆ X relates to the cardinality of a finite set X. (i) Explain why |S| ≤ |X| for every subset S ⊆ X when |X| = 1. (ii) Assume we know that if S ⊆ <n>, then |S| ≤ n. Explain why we can show that if T ⊆ <n+ 1>, then |T| ≤ n + 1. (iii) Explain why parts (i) and (ii) imply that...
QUESTION 3 [10] With this problem, we want to explore the idea that, if it were...
QUESTION 3 [10] With this problem, we want to explore the idea that, if it were not for drag, raindrops would attain fantastic speeds near Earth’s surface. Piet observes that the raindrops that are hitting him, have a radius of 2.00 mm and fall from a cloud located 1000 m above the ground he is laying on. Take the drag coefficient of the raindrops to be 0.50 and the ambient temperature to be 20.0 °C. HINT: The area in the...
In this problem, we explore the effect on the mean, median, and mode of multiplying each...
In this problem, we explore the effect on the mean, median, and mode of multiplying each data value by the same number. Consider the following data set. 4, 4, 5, 8, 12 (a) Compute the mode, median, and mean. mode     median     mean     (b) Multiply each data value by 6. Compute the mode, median, and mean. mode     median     mean     (c) Compare the results of parts (a) and (b). In general, how do you think the mode, median, and mean are affected...
In this problem, we explore the effect on the standard deviation of adding the same constant...
In this problem, we explore the effect on the standard deviation of adding the same constant to each data value in a data set. Consider the following data set. 16, 16, 13, 12, 6 (a) Use the defining formula, the computation formula, or a calculator to compute s. (Enter your answer to one decimal place.)    (b) Add 4 to each data value to get the new data set 20, 20, 17, 16, 10. Compute s. (Enter your answer to...
In this problem, we explore the effect on the standard deviation of adding the same constant...
In this problem, we explore the effect on the standard deviation of adding the same constant to each data value in a data set. Consider the following data set. 16, 12, 9, 4, 7 (a) Use the defining formula, the computation formula, or a calculator to compute s. (Enter your answer to one decimal place.) (b) Add 8 to each data value to get the new data set 24, 20, 17, 12, 15. Compute s. (Enter your answer to one...
In this problem, we explore the effect on the standard deviation of adding the same constant...
In this problem, we explore the effect on the standard deviation of adding the same constant to each data value in a data set. Consider the following data set. 10, 16, 15, 4, 6 (a) Compute s. (Enter your answer to one decimal place.) (b) Add 4 to each data value to get the new data set 14, 20, 19, 8, 10. Compute s. (Enter your answer to one decimal place.) (c) Compare the results of parts (a) and (b)....
In this problem, we explore the effect on the standard deviation of adding the same constant...
In this problem, we explore the effect on the standard deviation of adding the same constant to each data value in a data set. Consider the following data set. 7, 13, 6, 11, 11 (a) Use the defining formula, the computation formula, or a calculator to compute s. (Enter your answer to one decimal place.) (b) Add 2 to each data value to get the new data set 9, 15, 8, 13, 13. Compute s. (Enter your answer to one...
In this problem, we explore the effect on the standard deviation of adding the same constant...
In this problem, we explore the effect on the standard deviation of adding the same constant to each data value in a data set. Consider the following data set. 12, 6, 11, 10, 15 (a) Use the defining formula, the computation formula, or a calculator to compute s. (Enter your answer to one decimal place.) (b) Add 3 to each data value to get the new data set 15, 9, 14, 13, 18. Compute s. (Enter your answer to one...
In this problem, we explore the effect on the standard deviation of multiplying each data value...
In this problem, we explore the effect on the standard deviation of multiplying each data value in a data set by the same constant. Consider the data set 8, 7, 16, 8, 16. (a) Use the defining formula, the computation formula, or a calculator to compute s. (Round your answer to one decimal place.) s =   (b) Multiply each data value by 2 to obtain the new data set 16, 14, 32, 16, 32. Compute s. (Round your answer to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT