Homework 1 forum

RumorMessage missing identifier field ?

 
Picture of Bastien Wermeille
RumorMessage missing identifier field ?
by Bastien Wermeille - Tuesday, 13 October 2020, 21:40
 

Hello,

Shouldn't the RumorMessage also contains the Identifier of the sender ? For the StatusMessage we have a field Identifier but as written in assignement, the identifier is given to the host when launched. How can we know the identifier if it is not in the RumorMessage ? Should we instead use the IP address as the identifier ?

Best regards,

Bastien

Picture of Bastien Wermeille
Re: RumorMessage missing identifier field ?
by Bastien Wermeille - Wednesday, 14 October 2020, 11:56
 
After some digging, I found out the Origin field of RumorMessage might contain the identifier in the Origin field.
However, how are we suppose to known the identifier of the sender of a StatusPacket to see if he has some unknown message of us. Don't we need to know the identifier of the sender of this StatusPacket.

If we create a structure to store the messages received from the different nodes and we index those using their identifier("Origin field") as stated in the handout we won't be able to know the host identifier when we receive it's StatusMessage. Therefore I do not see how I could use the identifier to keep track of the messages I receive. Should we instead keep track of the messages received using the IP address instead of the Identifiers ?
Picture of Pasindu Nivanthaka Tennage
Re: RumorMessage missing identifier field ?
by Pasindu Nivanthaka Tennage - Wednesday, 14 October 2020, 11:57
 

Hello

Thank you for the question

The rumor message is defined as follows, 

type RumorMessage struct {
Origin string `json:"origin"`
ID uint32 `json:"id"`
Text string `json:"text"`
}

It indeed contains the identifier of the origin node, and that is all needed for keeping track of number of messages originated.


Regards

Picture of Bastien Wermeille
Re: RumorMessage missing identifier field ?
by Bastien Wermeille - Wednesday, 14 October 2020, 12:27
 

Yes, I saw that and in my reply, I then speak about the StatusPacket !

Picture of Pasindu Nivanthaka Tennage
Re: RumorMessage missing identifier field ?
by Pasindu Nivanthaka Tennage - Tuesday, 20 October 2020, 13:48
 

Hello,

Thanks for the question.

Status messages do not need to have an identifier field.

As we have mentioned in the recent Moodle announcement, the status message will have the set of messages sent by the node who originates the status message. This information is sufficient for the receiving node to see which messages are missing and act accordingly.


Hope this helps

Regards