Giter Site home page Giter Site logo

Comments (8)

Papipo avatar Papipo commented on April 28, 2024 1

Maybe skipping the event is not always a viable option depending on the domain. I guess that failing is a must in many scenarios. Maybe there is a bug that has to be fixed and skipping some events leads to inconsistent state.

from commanded.

slashdotdash avatar slashdotdash commented on April 28, 2024 1

@Papipo Skip event on error could be made configurable, either per event handler or globally.

from commanded.

slashdotdash avatar slashdotdash commented on April 28, 2024

Could use tarearbol to provide retry logic.

from commanded.

drozzy avatar drozzy commented on April 28, 2024

I see no need for this.

  1. Crash the app.
  2. App restarts as defined pre restart policy.
  3. Event gets delivered again.
  4. App may crash again. After erlang-defined crash semantics exceed the threshold the BEAM shuts down.
  5. Upper level machinery (e.g. docker) may restart the server.

This works great for my own cases (where I hand-built my process managers). Can't see why commanded would not succeed with this simple approach as well.

from commanded.

astery avatar astery commented on April 28, 2024

@drozzy, I think you talking about scenario when process manager generally fails (all process manager instances are failed), it's definitely should result app crash.

And I think proposal about - why crash the whole application if only one specific process manager instance fails? Just submit log, and stop executing bad process manager instance, or try another restart policy (like dropping state or skip event).

from commanded.

slashdotdash avatar slashdotdash commented on April 28, 2024

@drozzy Providing an extension point allows consumers of Commanded finer control over how they deal with errors on a case by case basis. So you could decide that for a certain event handler, or particular event, it should retry X times with exponential back-off between retries. Another handler could simply skip any problematic events. You could do this yourself inside an event handler, I'm proposing that Commanded provides a convenient interface for you to use.

I don't know exactly what the best strategy is for each use case, therefore make it user configurable.

from commanded.

drozzy avatar drozzy commented on April 28, 2024

Seems like this can be done with some external dependency in client code. Is there any actual use cases for this?

P.S.: I quite like Gregg's approach to features.

from commanded.

slashdotdash avatar slashdotdash commented on April 28, 2024

Closing this issue. Replaced by #93 to support error handling for process manager command dispatch only.

from commanded.

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.