Hello,
Regarding the retrieveMetaFile method, should we save the downloaded metafile in the gossiper or just rteurn the value ?
Thanks,
Bastien
Hi,
In this method, we expect you to only download the metafile and return its content, without indexing or saving. If you are using it in DownloadFile(), you should do the indexing outside RetrieveMetaFile().
Kirill
Great thank you.
One last question about this function, should we do the exponential request to download this file in this function or not ?
Best regards,
Bastien
Yes, treat the metafile like any other chunk in terms of downloading.
Kirill
Hello,
I have another question about the RetrieveMetaFile method. Does the node that requests the file broadcast the request or does it choose the next hop based on his routing table ?
I ask this because the test "TestGossiper_Download_Metafile_Seq" fails due to the fact that routing messages don't have enough time to propagate and when the test reaches "nA.gossiper.RetrieveMetaFile(nB.id, metaHashHexB)", nA does not have nB in its routing table yet.
Adding a time.Sleep before calling RetrieveMetaFile works fine though.
Thanks!
Hi,
It should choose the next hop based on its routing table.
In this test, the route timer is set to one second so all the routing information will eventually propagate (as you point out). Remember that retrieving metafile should have the same logic as retrieving any file chunk. Thus, your gossiper needs to retry the metafile retrieval in the back-off manner: eventually it will have the required routing information for sending the gossip packet with the data request. Obviously, it requires your gossiper not to crash if it does not have a destination in its routing table; dropping the packet is fine in this case.
Kirill
Thanks, it's all clear now!
Cheers!
Follow the pulses of EPFL on social networks
© 2023 EPFL, all rights reserved