Clean stop of gossiper

Clean stop of gossiper

par Bastien Wermeille,
Nombre de réponses : 1

Hello,

Regarding the homework 0 you gave us the following constraint regarding the Stop method:

> The logic is that the gossiper should finish processing the messages received *before* its Stop method is called. That's why "Stop" sends a message to the gossiper's listener, which identifies the "Stop" message by comparing it to the "stopMsg" constant.

However if I respect this, I'm not able to stop fast enough to pass the test due to the number of messages I receive. I had a version where I was stopping the listener then once all messages where processed completly fnally stopped the sender but this takes so much time that my tests do not pass !

Is it OK, if we do not process the remaining messages ? Thanks in advance for your response.

Best regards,

Bastien

En réponse à Bastien Wermeille

Re: Clean stop of gossiper

par Pasindu Nivanthaka Tennage,

Hello,

Thanks for the question.

Can you let us know which particular test is failing? Or is it the entire test set?

We did not observe this behavior in our reference implementation, which we used to implement tests. So I suggest that your gossiper should use more parallelism and improve the speed at which it processes messages.

So the next step I can suggest you is, do a profiling in your code in performance sense, and try to identify bottlenecks. Then try to parallelize things and see if you get good enough speed.

Regards