Clarification AddSearchMessage

Clarification AddSearchMessage

by Dorian Ros -
Number of replies: 4

Hi,

I had a question regarding the implementation of AddSearchMessage which is not clear to me from the handout:

Do this method also implement the division of budget among peers or does it simply broadcast the search request with the original budget to all peers ?

Thanks in advance!

In reply to Dorian Ros

Re: Clarification AddSearchMessage

by Kirill Nikitin -

Hi,

It should indeed divide the budget among the peers to whom the request is broadcast. It should not though subtract 1 from the budget at the origin gossiper, only relays do that.

Kirill

In reply to Kirill Nikitin

Re: Clarification AddSearchMessage

by Francesco Intoci -

Hello,

I have also a question about this method: when we receive a number of total matches that satisfies the threshold, should we start downloading such files inside the method itself?

Regards

In reply to Francesco Intoci

Re: Clarification AddSearchMessage

by Kirill Nikitin -

Hi,

No, the AddSearchMeesage method should have only the search logic. When your gossiper receives enough matches, you simply stop waiting for replies to the given search. Obviously, you still can receive more replies afterwards but you don't need to match them to anything.

Kirill