Coder Social home page Coder Social logo

Comments (4)

tsurdilo avatar tsurdilo commented on July 29, 2024

@jorgenj
Re "exponential backoff" - I think that is a valid use case. Could you provide an example json/yaml def the way you would like to see it and we can discuss details? Would just make it easier to see it as an example that can be used also for examples and docs.

Re: "max backoff duration" - again would be possible to see an example of how you would like this to be? Current impl can handle similar cases with the event-based switch state and the callback states for example, where the amount of time waiting for event can be expressed via a timeout value.

from specification.

jorgenj avatar jorgenj commented on July 29, 2024

For exponential backoff, I'm partial to the idea of renaming the current 'multiplier' field which accepts a duration to 'increment' instead, and adding a new 'multiplicatier' field that accepts a numeric value. For example:

{ "expression": ...,
"interval": "PT2S",
"increment": "PT2S",
"multiplier": 1.5
}

This example would result in the following series of backoff durations between retries:

  • 2s
  • 6s ((2s + 2s) * 1.5)
  • 12s ((6s + 2s) * 1.5)
  • ...

For max backoff, something like the following (using multiplier redefinition from above):

{ "expression": ...,
"interval": "PT2S",
"maxDuration": "PT15S",
"multiplier": 2
}

This example would result in the following series of backoff durations between retries:

  • 2s ( min(2s, 15s) )
  • 4s ( min(2s * 2, 15s) )
  • 8s ( min(4s * 2, 15s) )
  • 15s ( min(8s * 2, 15s) )
  • 15s ( min(15s * 2, 15s) )
  • ...

from specification.

tsurdilo avatar tsurdilo commented on July 29, 2024

depends on pr #175

from specification.

github-actions avatar github-actions commented on July 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from specification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.