yapapi icon indicating copy to clipboard operation
yapapi copied to clipboard

Fix the offer-recycling logic

Open johny-b opened this issue 3 years ago • 1 comments

Problem is explained in #979.

Idea: add a delay to offer recycling, e.g. 60s, so that we'll have enough time to try other offers first instead.

Also: this is not really a bug. If the strategy ignores AgreementRejected event then this is their problem, as such event is important and should not be ignored.

BUT

We should expect many strategy-implementers to forget about this detail (at least I forgot :P). So I guess if we can implement some mico-fix for such cases, as the Idea mentioned above, we probably should.

johny-b avatar Jun 09 '22 13:06 johny-b

OK, so we have a situation, where Provider rejects a proposed Agreement (most often because they found another "job" in the meantime, so their offer became "invalid"). In such a case, the heuristic suggests, the Offer may again become "valid" after some time.

So, as requestors, we may not want to discard the Offer, but rather give it another chance. So we put it on "a bench" for arbitrary amount of time, hoping it becomes "valid" again.

This seems a better approach than simply "put it at the end of the queue", as the time factor (ie. waiting for some time) is crucial here. And I can't think of any better heuristic.

I would only consider the following:

  • Allow the Offer to be recycled a selected, constant number of times.
  • Is there an Offer expiry date property implemented? If yes, it should be validated.

stranger80 avatar Jun 13 '22 21:06 stranger80