Homework 1 forum

Callback clarification

 
Picture of Pasindu Nivanthaka Tennage
Re: Callback clarification
by Pasindu Nivanthaka Tennage - Thursday, 8 October 2020, 11:43
 

Hey Adrian,

Thank you for your question, and please find the explanation below.

1. For the private messages, the call back should only be called when the destination node receives the message. And you should make a gossip packet which contains a rumor message to pass it to the controller via callback 

2. For rumor messages, the callback is called only after it has been delivered (meaning that if the conditions for delivering the messages depending on the sequence numbers are held). Here you call the callback with the initially received rumor message (not after processing). In first principals if we think, what we need to send to the client is; from whom we got this message, and who is the originator + message content.

Hope this is clear