Hi Guys, What makes an Actor crash ? Is it in the developer's code where the developer may have forgotten to handle an Exception ?
I am trying to understand Akka supervision and previously I always used the Try catch blocks for the following situations - Critical IO failure situations - Exceptions on establishing connections with external APIs (databases or other services) - Or if I'm using an external library and it expects me to catch some Exception. In all the other cases I always try to validate requests and wrap invalid Request in Error message objects to send the response back to the client. Unknown Exceptions occurs if I had forgotten to write code to validate some error condition which will always get logged to fix the code later. Is it the same in Akka? ... What situations will make an Actor crash ? Is it like above, due to unhandled/unexpected Exception in code ? What if my supervision strategy for every child was to just to log the unexpected error and *Resume* without stopping and restarting that Actor, does this guarantee that the Actor will always be available in memory ones created until I explicitly send it a "*Stop*" message ? And I can do what I have always done- log the exception and fix it later without changing the Actor hierarchy structure of my application in memory ? What I'm trying to do is build a simple in-memory database with Akka where each Akka actor holds small bits of data *Made up example*: Every UserActor's state will be User(id:String, name:String, address:Address). If I had 10,000 UserActors in memory and if I wanted to aggregate the results of all UserActors with name starting with the string "*Jo*", In situations like this I would just to have the guarantee that ones an Actor is created, it will always be available in memory. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
