These are chat archives for petabridge/akka-bootcamp

9th
Sep 2018
Nick Polyderopoulos
@NickPolyder
Sep 09 2018 17:38

@progunnerr Hello mate.
1) The file observer has a OnError event that will return the events to the actor and let it decide what to do with those errors. Also if there is any problem on initialization then the exception will be handled by the corresponding actor which will restart or do something related about that. Now this is a bootcamp the objective of the exercise is not to be production ready code so some validations and things to consider have not reached the code you are looking at. Merely because they trying to stay on course and not to overwhelm with information and code not needed for the exercise.

2) Again as i described above the SRP is violated because they are not coding for production code. It would not benefit the lesson needed to be taught and some students would not get the idea which is trying to pass.
Now SRP can co-exist with Actor Model but its not always ideal to do it. Just because its good to write your code following the SRP qualities does not mean that you should every single time. Sometimes it creates more problems than it solves.