Performance for HW0

Performance for HW0

by Aaron Joos Lippeveldts -
Number of replies: 1

Hi,

I was wondering to what extent performance is important for HW0.

For example, is it okay if processing of messages is not yet parallelized,
or if you resolve peer addresses and connect to the socket again for every message?

Or should these things already be optimized as much as possible?


Thanks

In reply to Aaron Joos Lippeveldts

Re: Performance for HW0

by Cristina Basescu -

Hi Aaron,

is it okay if processing of messages is not yet parallelized

I wouldn't recommend designing your gossiper that way. You might pass all tests for homework 0, but you definitely need parallel processing for later homeworks - and in general when designing a server.

or if you resolve peer addresses and connect to the socket again for every message?

That seems acceptable, because inter-peer communication is over UDP, thus there's no connection state or handshake overhead. However, it's not easier or more practical than the alternative. Instead, you could use the same UDP connection object that the gossiper listens on also for sending UDP packets, which would likely make it more convenient to close just one object (when the gossiper exits) instead of multiple ones.  

Cristina