These are chat archives for akkadotnet/akka.net

12th
Apr 2016
Corneliu
@corneliutusnea
Apr 12 2016 00:55
guys, is there an easy way to "look" forward in the queue and batch a bunch of messages ?
e.g. I have a component that sends orders to another system, but when we have bursts we want to send batches of up to 20
I could "read & store" them and post then when I have 20 in the batch or a timer kicks in but that creates an unneeded delay with the timer
Malte Baden Hansen
@Moulde
Apr 12 2016 07:11
I have a bunch of actors running using the built in scheduler. Some of them suddenly just stops receiving messages. Is there a timeout i can extend if the job takes to long? Also, can i log when the scheduler sends the message to the actors? Thanks :)
John Nicholas
@MrTortoise
Apr 12 2016 07:29
@corneliutusnea it would be easier to just introduce a batch actor that recieves the messages and wraps them into a batch message to forward on if a certain rate is exceeded, if not just forward them. However you seem to of constructed your own problem by deciding to block until a timer is exceeded? You have a rate problem not a period problem imo.
@Moulde a timeout imples you think the job is getting terminated by something you wrote due to the length of time it takes to run .... thats your problem. The other to do with actors 'just stopping receiving messages' is probably due to some kind of exception in them causing them to blow up. I'd start to put logging into that area.
Kris Schepers
@schepersk
Apr 12 2016 07:35
@Horusiath Are you saying that the TCP transport can/should be replaced by a queue in that scenario?
Malte Baden Hansen
@Moulde
Apr 12 2016 07:38
@MrTortoise Correct, thats what i suspect is happening. I have quite a lot of logging already, but i'l go through it again and see what i missed. Regarding the long running job (a few minutes). Is that bad practice?
John Nicholas
@MrTortoise
Apr 12 2016 08:26
@Moulde not necessarily. If you have a pool of actors that only do one job at a time and have sufficient number of actors for capacity it could be ok. However you may also have one actor that processes many jobs by using some kind of continuation to free itself up (it would probably have no state). I think the general desire is to have availability - there are several ways to achieve that.
@Moulde the recommended way though is to have the method that recieves to return as soon as you can - so wrap something long running in a task is the preferred option - or at least that works well for me!
Zetanova
@Zetanova
Apr 12 2016 09:35
How to count the messages that surfived an Gen0 GC?
I am a little bit conserned of fragmentation
Arjen Smits
@Danthar
Apr 12 2016 09:40
@Zetanova I am not aware of any method you can simply call the BCL to get that information. But you could monitor performance counters
I know NBench has support for that
And you could probably check out its code to see how it collects that kind of information for its output.
But i think GC generations are in the standard output for NBench. (you might have to set some options though, not sure).
Zetanova
@Zetanova
Apr 12 2016 09:42
@Danthar I know a method with WeekReference but that should be build into the Mailbox to work generic.
The rest of methods that i know, are memory scanners/parsers, that ultimatly pause the process to do so
Arjen Smits
@Danthar
Apr 12 2016 09:44
Well if you want to know the characteristics of a specific piece of code. You can write an nbench test for that.
If you want to know the overall behavior of your application. Just use a memory profiler.
Zetanova
@Zetanova
Apr 12 2016 09:45
Will do, I want only to check that no fragmentation happens.
Bartosz Sypytkowski
@Horusiath
Apr 12 2016 10:16
@schepersk it has nothing to do with TCP, you'll probably need an indempotent processing + at-least-once delivery semantics for your messages, so they can be redelivered in case of node crash
Sherry Ummen
@sherry-ummen
Apr 12 2016 11:23
Hi guys, is it so that akka.net has to no plans to support .net 4.0 ?
Davydov Denis
@Inkp
Apr 12 2016 12:03
Sorry, but I'd like to ask again. What happens with stashed messages on an actor which received a poison pill by default? My tests show that akka yields INFO message Message StashedMessage from akka://Sys/deadLetters to akka://Sys/user/actor was not delivered. 1 dead letters encountered after actor's termination. That might indicate that all stashed messages are dumped into deadLetters. Is that right?
Arjen Smits
@Danthar
Apr 12 2016 12:06
@sherry-ummen Its not that there are specific plans against it. Its just that the issue has lost focus since other things became more important. If you want you can "stir the pot" here. akkadotnet/akka.net#1313
@Inkp yes. When an actor dies. Its state is reset, this also means that any stashed messages are gone.
Davydov Denis
@Inkp
Apr 12 2016 12:07
@Danthar, are they completely gone without a trace or are they dumped into deadLetters?
Arjen Smits
@Danthar
Apr 12 2016 12:08
which 99.9999999999% of actors that use stashes do
then you won't see any messages
however, if you unstash on stop / restart
all of those unstashed messages will be dumped into deadletters
and DeadLetter events will be published onto the EventStream
containing each of those messages
s> o someone could theoretically grab them
To quote @Aaronontheweb a scroll's up
Davydov Denis
@Inkp
Apr 12 2016 12:09
Well that explanation did not clear this question for me, that is why I am asking again.
What I understood from that, is that you have to manually unstash messages before termination for them to go into deadLetters
But my tests indicate that INFO messages regarding "deadLetters" and "StashedMessage" still appear even if I do not unstash my messages manually.
Arjen Smits
@Danthar
Apr 12 2016 12:22
@Inkp you are right.
When you have messages on the stash, and the actor is killed, by poisonpill or otherwise.
So not restarted.
The stashed messages are automatically deadlettered
Also when you have stashed messages, and the actor restarts, it automatically unstashes
Davydov Denis
@Inkp
Apr 12 2016 12:28
Okay, thanks for clearing this for me! How do I handle stashed messages in case I want them discarded if actor stops/restarts? Do I Stash.ClearStash() on PostStop()?
This message was deleted
And more philosophical question. What is the reasoning behind unstahing messages on actor restart? Isn't stash a part of actor's state? Thus it should be discarded like any other actor's non-persistent state.
Arjen Smits
@Danthar
Apr 12 2016 12:47
@Inkp you would have to try it out, never used ClearStash(). But on PostStop() seems reasonable.
Arjen Smits
@Danthar
Apr 12 2016 12:52
As to the philosophical question. Not sure. I just know its really handy in most cases :P
Ralf
@Ralf1108
Apr 12 2016 14:01
hi, when unit testing actors via Testkit... is it still required in latest version to tear down the test actor system?
or is this handled by the base class "Testkit"?
Marc Piechura
@marcpiechura
Apr 12 2016 14:17
@Ralf1108 that's handled by the Teskit
Ralf
@Ralf1108
Apr 12 2016 14:18
ok thx
but is it normal that after test completes there are so much debug log entries like
DeadLetter from [akka://test/user] to [akka://test/user]: <<DeathWatchNotification>: [akka://test/user/TestProbe_DetailPageVersion_9c57b66d-5cc9-4b73-8ad4-d4bdef0ad324], ExistenceConfirmed=True, AddressTerminated=False>
do I have to collect these DeathWatchNotifications by myself?
or can I suppress them?
Arjen Smits
@Danthar
Apr 12 2016 14:50
@Ralf1108 its normal. What is happening is that as the ActorSystem is being shutdown. Various actors are sending DeathWatchNotifications (which is a system level message), to Actors that are already gone.
Thus the deadletter logs
nothing to worry about.
Ralf
@Ralf1108
Apr 12 2016 14:51
is it possible to suppress them as they pollute the test log :-)
Arjen Smits
@Danthar
Apr 12 2016 14:51
There is currently some work being done to suppress deadletter notifications for system messages, but it needs more work.
So not at this time
Ralf
@Ralf1108
Apr 12 2016 14:51
ok good to know. thx!
Aaron Stannard
@Aaronontheweb
Apr 12 2016 17:17
off-topic, but I just switched to using this yesterday: http://cmder.net/
much nicer commandline experience for Windows
John Nicholas
@MrTortoise
Apr 12 2016 17:33
ive used conemu for a while it is v good, noticed that is based off it. v cool
Jordan S. Jones
@jordansjones
Apr 12 2016 17:50
heh.. I use Git-bash
Artur Karbone
@ArturKarbone
Apr 12 2016 18:58
Have anyone used app/web config transformations for HOCON? Any sample?
Aaron Stannard
@Aaronontheweb
Apr 12 2016 18:58
I have
I just replace the entire HOCON section full stop
Artur Karbone
@ArturKarbone
Apr 12 2016 19:00
Yeah I suspected that replace of the whole section required
cfjames
@cfjames
Apr 12 2016 21:11
Question on Cluster Sharding: Can you have more than one instance of a given type of entity on a single Node? The only statement I could find of this issue was "One entity instance may live only at one node at the time" in the documentation, but I'm not really sure what that is supposed to mean.
Bartosz Sypytkowski
@Horusiath
Apr 12 2016 21:17
@cfjames yes you can. This statement means, that if you have for example actor representing User with id=1, you may be sure that as long as cluster is not partitioned, no more than one actor representing that user will be present at the same time, keeping your user state consistent
cfjames
@cfjames
Apr 12 2016 21:50
@Horusiath got it thanks.