benedekh / WeLoveClouds

Repository for submissions on the CloudDB course.
0 stars 1 forks source link

Feature/request auto repeat with exponential backoff #142

Closed benedekh closed 7 years ago

benedekh commented 7 years ago

fixes #127

banctilrobitaille commented 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.

benedekh commented 7 years ago

@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. :-)

benedekh commented 7 years ago

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.

benedekh commented 7 years ago

Known issue #156. Don't merge this branch before the issue was fixed and tested.

benedekh commented 7 years ago

@banctilrobitaille IMO, this PR is mergeable into master.