You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. 😄
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
andActorRef
interface.An initial thought is to wrap any behavior transition in a
spawn
function in atry/catch
block and "restart" the behavior in case thecatch
block is reached.I am open for ideas and suggestions regarding this topic. 😄
Footnotes
https://elixir-lang.org/getting-started/mix-otp/supervisor-and-application.html ↩
https://doc.akka.io/docs/akka/current/typed/fault-tolerance.html ↩
https://discord.com/channels/795785288994652170/877478623202906132/895041466538266704 ↩
https://github.com/statelyai/rfcs/blob/0001-errors/text/0001-errors.md ↩
The text was updated successfully, but these errors were encountered: