These are chat archives for akkadotnet/akka.net

2nd
Mar 2018
Laimonas Simutis
@laimis
Mar 02 2018 03:51

Read it and re-read it the documentation, ran samples and running some akka.net in prod, and I am still quite confused about the whole supervision strategy concept. Maybe somebody has some pointers.

I will start with a simple question first: when I do Context.Watch(actor), is my understand that I will get Terminated message when that actor is stopped correct? I can confirm that's the case if I explicitly stop the actor inside of its receive (Context.Stop(Self)). But I do not get Terminated in case there was an exception while handling the message. Is Watch only for watching when the actor stopped cleanly?

Laimonas Simutis
@laimis
Mar 02 2018 04:02
I guess I just had a breakthrough of sorts. When a child actor threw the exception, the actor was restarted and not stopped, thus no Terminated message. Overrding SupervisorStrategy and returning Stop directive did the trick where after exception actor was stopped and terminated message arrived.
Still not clear how I would use this behavior for error handling but at least getting something that matches the exceptations
Al Dyachkov
@serpentthegreen
Mar 02 2018 10:00
Hello again. I would like to add case-specific optimization to my software, that will require better knowledge of akka internals. I have messages that contain about 1k byte array, that are processed by the actors. I would like to introduce System.Buffers.ArrayPool to rent the arrays to reduce memory traffic. In case of single-process execution you can just rent and release, buit in case of remoting, i need serializer to rent an array and release it when it
it's sent to another process. First part can be achieved via custom serializer. But how can I release the array safely ?
Aaron Stannard
@Aaronontheweb
Mar 02 2018 13:30
Hi everyone, could you suggest anything to speed up TestKit initialization?
I don't have this issue?
why is it taking your testkit seconds to start up?
are you doing anything special there?
Viachaslau Anufryiuk
@vanufryiuk
Mar 02 2018 13:56
@Aaronontheweb, sorry to bother you, I've already found the reason of such a behavior. It was not TestKit, it were extra ExpectNoMsg calls.
Bartosz Sypytkowski
@Horusiath
Mar 02 2018 19:29
@vanufryiuk tbh, I wouldn't call TestKit driven tests unit tests ;) They are establishing actual actor system with infrastructure, they're more integration in nature