Homework 1 forum

Rumormongering & status messages

Picture of Peter Krcmar
Rumormongering & status messages
by Peter Krcmar - Wednesday, 7 October 2020, 21:45

Hi, I have a couple of questions! 

First one is about the handling of status messages. When it is an ack, S "sends the same rumor to another peer with probability 0.5" if the statuses are the same. But for a status message from the anti-entropy, there is no same rumor. Do we send the latest rumor ? A random one ? Or should we have some sort of mechanism to distinguish acks from other status messages ?

Second question is about the different cases when comparing statuses: from the description it seems like either R has more rumors xor S has more rumors, but can't they both have rumors that the other one doesn't have ? In that case do we do both actions "R sends messages one by one" and "R sends a status" ?

Last one is about picking random peers: when you say "picks a new random peer" or "picks another peer" can we simply take a random peer (and maybe resend to the same one) or should we sample from all peers except the one we already sent to ?

Thanks in advance for your answers :)

Picture of Pasindu Nivanthaka Tennage
Re: Rumormongering & status messages
by Pasindu Nivanthaka Tennage - Thursday, 8 October 2020, 12:37

Hey Peter,

Thanks for the question and please find the answers below.

1. In anti-entropy, the node only sends a status message periodically. Upon receiving a status, it should be processed in the same way as mentioned in Rumormongering section of HW1. However there should be functionality in your code for a node to distinguish a status message resulting from a rumor and anti entropy (a trivial implementation is to check whether for each rumor sent it received a status in return)

2.  In this case, only the sender can initiate an action. Sender can either help the receiver to catch up or send a status asking for help for catch up. The receiver does not initiate anything. 

So in your point, if there is a case that "both have rumors that the other one doesn't have", the sender will first finish sending what receiver is missing, and after that it will send a status asking for R to send its messages.

It should be new random peer: sample from all peers except the one we already sent to 

Hope this helps.


Picture of Peter Krcmar
Re: Rumormongering & status messages
by Peter Krcmar - Tuesday, 13 October 2020, 13:57
Hi Pasindu, thanks for the answers they helped me a lot !