Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Handling / Supervision #10

Open
christoph-fricke opened this issue Oct 19, 2021 · 0 comments
Open

Error Handling / Supervision #10

christoph-fricke opened this issue Oct 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@christoph-fricke
Copy link
Owner

Elixir's and Akka actor system follows a "let it crash" mentality and use supervisors to create actors trees, which are partly restarted if an actor in the tree crashes12. XState is currently not really concerned with proper error handling and it is handled rather inconsistently, although errors in the system are inevitable. There have been a few discussions on the Discord3 and in the RFCs4, which can inspire a solution.

We might try to tackle the problem in XSystem first, before forces changes in XState, since XSystem is smaller and easier to change. A solution probably requires our own spawning implementation and potential extensions to the Behavior and ActorRef interface.

An initial thought is to wrap any behavior transition in a spawn function in a try/catch block and "restart" the behavior in case the catch block is reached.

I am open for ideas and suggestions regarding this topic. 😄

Footnotes

  1. https://elixir-lang.org/getting-started/mix-otp/supervisor-and-application.html

  2. https://doc.akka.io/docs/akka/current/typed/fault-tolerance.html

  3. https://discord.com/channels/795785288994652170/877478623202906132/895041466538266704

  4. https://github.com/statelyai/rfcs/blob/0001-errors/text/0001-errors.md

@christoph-fricke christoph-fricke added enhancement New feature or request help wanted Extra attention is needed labels Oct 19, 2021
@christoph-fricke christoph-fricke pinned this issue Oct 19, 2021
@christoph-fricke christoph-fricke removed the help wanted Extra attention is needed label Apr 2, 2022
@christoph-fricke christoph-fricke unpinned this issue Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant