These are chat archives for petabridge/akka-bootcamp

24th
Jun 2015
Igor Ziselman
@constructor-igor
Jun 24 2015 06:13
If I need use "temporary folder" in actor, I should create the folder in PreStart() and delete it in PostStop(). But I don't undetstand if PostStop() called during restarting too. If not, PreStart will be called again and new temporary folder will be generated again (but previous will not be deleted). please, could you help me to understand the situation?
it says poststop is not called during restarts
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:16
@thomaslazar ugh! that's wrong! PostStop gets called during PreRestart :\
creating an issue for that now
Thomas Lazar
@thomaslazar
Jun 24 2015 06:17
good to know.
<- goes off to change some code
;)
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:18
hehe if you override PreRestart and don't call base.PreStart then PostStop won't be called
Igor Ziselman
@constructor-igor
Jun 24 2015 06:18
Thomas Lazar
@thomaslazar
Jun 24 2015 06:19
i guess @Aaronontheweb has to change that too then :P
Bartosz Sypytkowski
@Horusiath
Jun 24 2015 06:20
PreRestart calls PostStop internally by default
Thomas Lazar
@thomaslazar
Jun 24 2015 06:21
btw… after your design patterns course and now having done a couple of things with akka.net… there's just one thing… why the hell didn't somebody tell me about akka.net 3 years ago? :P
Igor Ziselman
@constructor-igor
Jun 24 2015 06:21
understood. thank you. please, could you update picture in lesson 1.6?
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:22
yep, doing that now
Thomas Lazar
@thomaslazar
Jun 24 2015 06:23
ok. only had one place where i needed to change stuff
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:27
boom - took care of that
ugh, that was a silly error on my part
@thomaslazar hahaha, took me a while to finally find Akka
my .NET Fringe talk covers that journey in detail - one day hopefully that will be uploaded onto the Internet :p
(they're working on it, last we checked)
@Horusiath FYI, just saved a build server image that can run your Akka.Persistence.SQLServer tests
it was not trivial. Permissions with that stuff was a total pain in the ass.
kept marking the .mdf files that the CI server would clone as read-only
Thomas Lazar
@thomaslazar
Jun 24 2015 06:29
well. i hope you blog about it if it's available. so i can have it sit in my RSS reader for a month until i get to watching it :P
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:30
going to update the image tomorrow with some PostGRES / Cassandra / Mongo installations
also got a Mono image up and running today, but I apparently found a bug in the Mono 4.0.0 garbage collector using FAKE fsharp/fsharp#427
Thomas Lazar
@thomaslazar
Jun 24 2015 06:31
hmm… i like how my backup tape device is called /dev/nsa0… now off to change the tapes
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:31
@thomaslazar will do! It's my favorite talk I've done so far - developers should talk about things they tried and failed at
in this case, all of the stuff I tried to build a marketing automation system before I found Akka
Igor Ziselman
@constructor-igor
Jun 24 2015 06:33
please, also could you explain when a actor will be termintated? for example, my actor recieve message, create "processing actor". The created actor makes work and sends result message. When the created "processing actor" will be terminated and PostStop() will be called?
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:35
so actors can only be terminated under two circumstances:
  1. they are explicitly terminated using any one of a number of termination methods
  1. they are terminated as a result of some failure (throwing an exception) and the parent's supervision strategy issues a stop directive
well, thanks markdown for making both of my bullets number 1s :p
the second case is straightforward - your code has to be screwed up or you have to have a custom SupervisionStrategy set by the parent in order to run into that scenario
but the first case - the actor can either shut itself down or someone else can shut it down
that happens by either sending a PoisonPill to the actor
or using Context.Stop, which is how most actors shut themselves or their children down
but someone has to explicitly do that
otherwise the actor will just hang out and wait for messages to arrive
actors don't garbage collect themselves when there are no messages to process
they're lazy - they sleep instead
I often write actors to use the Context.System.Scheduler, which you will learn about in Unit 2 of bootcamp, to shut themselves down after a period of inactivity
i.e. have gone longer than 60 seconds without receiving a message
or I have actors who will shut themselves down once they complete some task
Context.ReceiveTimeout can also be used instead of the Scheduler
Aaron Stannard
@Aaronontheweb
Jun 24 2015 06:40
in fact it's actually a better tool for the job
Thomas Lazar
@thomaslazar
Jun 24 2015 07:00
@Aaronontheweb wow… that starcraft video is gruesome
Aaron Stannard
@Aaronontheweb
Jun 24 2015 18:02
@thomaslazar yeah, but it's well done!
Thomas Lazar
@thomaslazar
Jun 24 2015 18:06
that it is
still the last moments… with the kid… damn… since i got kids of my own such scenes make me go all… yeah don't know
Rodney S. Foley
@CreepyGnome
Jun 24 2015 18:10
Is the DeathWatchNotification bug in lesson one expected and should be ignored because it will get fixed as the lessons progress or is this a bug that needs to be fixed in the base lesson?
I ask, because the Lesson doc doesn't bring it up and should be hit by everyone following the lesson
Aaron Stannard
@Aaronontheweb
Jun 24 2015 18:14
@CreepyGnome it's been a while since I've looked at the lessons - could you link me directly to the issue you're describing?
@thomaslazar check out Call of Duty Cat by those same guys - that'll cheer you up
Rodney S. Foley
@CreepyGnome
Jun 24 2015 18:17
Following lesson 1 steps will get you there but just go to the completed solution and it occurs as well
https://github.com/petabridge/akka-bootcamp/tree/master/src/Unit-1/lesson1/Completed
Aaron Stannard
@Aaronontheweb
Jun 24 2015 18:17
could you explain the bug to me?
Rodney S. Foley
@CreepyGnome
Jun 24 2015 18:17
@Aaronontheweb just CTRL-F5 the startup project and type in foo enter then type exit enter and you will see it
I created an issue for it as well
@Aaronontheweb the issue is still present in the last lesson of unit 1 as well there you just have to type exit when it starts and it will occur, I would assume this bug exists in all of Unit 1 lessons in one way or another
Rodney S. Foley
@CreepyGnome
Jun 24 2015 18:26
@Aaronontheweb I an new to Akka.net so I will just ignore and a jump to unit 1 lesson 2 and get through the bootcamp units, just thought it odd and wanted to let someone know.. gotta run...
Aaron Stannard
@Aaronontheweb
Jun 24 2015 18:35
I'll take a look at it tonight
thanks for letting us know!
simonpetty
@simonpetty
Jun 24 2015 19:19
hi. signed up to the design patterns training. at least i think i did. will we get emailed any instructions before-hand?
Andrew Skotzko
@skotzko
Jun 24 2015 19:19
@simonpetty yessir!
simonpetty
@simonpetty
Jun 24 2015 19:20
cool!
Andrew Skotzko
@skotzko
Jun 24 2015 19:20
will ping you in a private chat