Closed benedekh closed 7 years ago
I think it's too specific and I think that the architechture has to be reworked. It's not generic enough to be in the common package that way. The exponential stuff should not be in your packetresender cause if we want to use a exponential backoff interval somewhere else like in the ecs I'll have to recode an exponential interval computation that's bad. I persist in saying that we should have a BackoffIntervalComputer indenpendently of the retryer. Another thing, what happen if we want to send a packet without waiting for a response ? How can I send a packet and resend if there is a send Exception without waiting for a response ? That's not possible with the actual design as far as I understand the code.
@banctilrobitaille, coud you explain what you mean by BackoffIntervalComputer
? Because in my implementation it already waits for that amount of time according to the number of attempts made so far. And the next attempt is enforced by the NetworkPacketResender
class which uses this strategy now..
Edit: after our talk, now I understand what you thought. :-)
Changes are pushed. However, the NetworkPacketResender is not included everywhere in the CommunicationApi yet. (Only in those cases when we expect for a reply. E.g. KVCommunicationApiV1.sendMessage
, and MoveDataToDestination.transferBunchOverTheNetwork
.
Known issue #156. Don't merge this branch before the issue was fixed and tested.
@banctilrobitaille IMO, this PR is mergeable into master.
fixes #127