These are chat archives for petabridge/akka-bootcamp

8th
Jun 2015
Andrew Skotzko
@skotzko
Jun 08 2015 00:11
@mmisztal1980 we make them using the hideously named yet effective LICEcap: http://www.cockos.com/licecap/
Nicolas ERNY
@nicolaserny
Jun 08 2015 15:09
@Aaronontheweb thanks for your answer and the youtube link
Andrey Leskov
@andreyleskov
Jun 08 2015 19:17
Hello guys! I'm just finished Unit1. Akka bootcamp looks pretty cool! Thank you so much for free lessons ) I have two questions:
1) When it is best to utilize dangerios logic (can throw exception) in separate actor, and when - in try \catch block?
2) Why in lesson 1.6 in overriden PostStop() there is a call to base.PostStop(), but in PreStart() - no call to base.PreStart() ?
Aaron Stannard
@Aaronontheweb
Jun 08 2015 19:35
@linkelf that's probably an oversight on our part, point 2 - base.PreStart and base.PostStop are both blank implementations underneath
as for point 1, it's best to push dangerous work to a separate actor if it's doing stuff like calling the network / etc
the only time you want to throw an unhandled exception within an actor is if the Exception that's thrown indicates that the entire state of the actor is corrupt and it needs to be restarted or shutdown by its parent
i.e. if the SQL Server connection the actor is holding onto got disconnected - might want to reboot that actor and give it a fresh connection
otherwise you might want to try...catch and handle your exceptions within the actor, if the error that occurs isn't something that merits a restart