Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:57
    Aaronontheweb closed #3877
  • 15:57
    Aaronontheweb commented #3877
  • 15:56

    Aaronontheweb on dev

    Persistence TestKit documentati… (compare)

  • 15:56
    Aaronontheweb closed #3889
  • 07:27
    dependabot-preview[bot] labeled #3999
  • 07:27

    dependabot-preview[bot] on nuget

    Bump FluentAssertions from 4.14… (compare)

  • 07:27
    dependabot-preview[bot] opened #3999
  • Oct 20 17:25
    valdisz synchronize #3889
  • Oct 20 17:17
    valdisz synchronize #3889
  • Oct 20 15:44
    valdisz synchronize #3889
  • Oct 20 09:22
    ismaelhamed commented #3863
  • Oct 19 23:39
    valdisz synchronize #3889
  • Oct 19 23:08
    edvinasz commented #2947
  • Oct 19 13:36
    Aaronontheweb commented #3973
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3995
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] edited #3995
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3993
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3991
Bartosz Sypytkowski
@Horusiath
it would be hard to do otherwise.
round robin router will evenly send message to all 10 actors. Each of them can stash a message when in receiving state, and then just unstash all of them when switching back to watingforjob state
Claudio Bernasconi
@claudiobernasconi
Okay seems reasonable. I will try this tomorrow (it's 7pm. here), but conceptually this seems to solve my issue. Thank you very much.
Bartosz Sypytkowski
@Horusiath
no problem ;)
Maxim
@dubrovkinmaxim
Hi guys. I have question about delivery strategy "at-least-once-delivery". As I understand after redeliver-interval all messages (which were not marked as delivered) will be delivered again. What's best practises to configure this behavior? Which redeliver-interval should I use in my cluster when I don't know how many messages will appear in input of this actor?
Maxim
@dubrovkinmaxim
For example: 10 000 messages are processed during 10-20 secs. I have redelivery-interval = 20 secs. What's will happen if in next iteration AtLeastOnceDeliveryReceiveActor receive 50 000 messages? As I undestend it will processed 10 000 messages(20 sec) after that 40 000 will redelivered again (40 000 + 40 000 =80 000 messages in mail box). Is it true? =)
Bartosz Sypytkowski
@Horusiath

@dubrovkinmaxim it won't happen at once, as you're requesting a deliveries one by one. But yes, in general redeliveries can stack up, up to a number specified at akka.persistence.at-least-once-delivery.max-unconfirmed-messages (it's 100 000 by default). When this threshold will be surpassed all calls for Deliver() method will automatically fail fast.

You can also get notified about something wrong happening here, as after several unconfirmed redelivery attempts (value specified at akka.persistence.at-least-once-delivery.warn-after-number-of-unconfirmed-attempts which is 5 by default) AtLeastOnceDeliveryActor will receive UnconfirmedWarning message with all messages that haven't been confirmed more than this number of times.

Claudio Bernasconi
@claudiobernasconi
@Horusiath Thank you very much for your help regarding stashing. I implemented it and it works great. My next question is, how can I make use of clustering? I mean technically I already implemented clustering, but now I want to scale adding a new node to the cluster. The problem is that if i send some work it gets round-robined to the existing 10 instances of the JobCoordinatorActor in Node1. If I add another Node to the system, it does not get any work, because it just starts its new set of JobCoordinatorActors which don't get any work assigned. What am I doing wrong here? How can I setup my system to make use of newly added nodes?
Bartosz Sypytkowski
@Horusiath
@claudiobernasconi you can get more info on cluster routers here. I'm not an expert on these, but AFAIK clustered router should know how to spawn routees on each node (ofc if it's configured as a pool router). You can read config to configure how many routees should be spawned on each node and how many of them could be spawned in total. From what I remember 2 things to remember here are:
  1. Router won't migrate existing routees when new node has been added. It can just spawn more of them. If you need automatic actor rebalancing Akka.Cluster.Sharding is what you need.
  2. Keep in mind that stashing will saturate router mailbox. What I mean here is if you have i.e. 20 messages in router mailbox, and it has 5 routees on a single node, where each one of these routees stashes all messages until some specific message will arrive, then those routees can empty router mailbox even thou they cannot process those messages right away. So if you put another node here, but no new messages arrived, routees spawned on that node won't get any remaining of those 20 messages, since they have been send by the router already to corresponding routees on the first node, where they got stashed.
Claudio Bernasconi
@claudiobernasconi
@Horusiath Thank you very much. You helped me again a lot. I will dive deep into this. One question regarding your 2nd point: Seems like my design is not ideal considering the bahaviour of the system you describe. Is there a possibility to design the system in a way that the messages are kept in the queue of the (Cluster)router so that they will be routed only if a JobCoordinatorActor is ready to process it? This way the system could scale if I add a new node to the cluster. In my understanding the system cannot scale if I'm using the stashing as I do it right now.
The reason why I (have to) stash is that I want to keep track of the progress of the child actors of the JobCoordinatorActor. So the JobCoordinatorActor basically receives two kind of messages. Those with the workload and those with the progress information of its child. As long as not all of the children have completed, it cannot work on a new workload. If you do not understand my case here I am willing to draw a diagram to express clearly what I am talking about. Just ask, please.
Bartosz Sypytkowski
@Horusiath
If you need to track a completion, maybe put it into a separate actor? I've created a simple sample on that back on SO - it's called aggregator pattern.
you basically create an actor and say it how much of the work is there to be done. then all of the workers will notify their completion not to JobCoordinatorActor but to Aggregator instead. Once everyone have completed their job, aggregator will notify someone about completion, partial completion or failure.
Horusiath @Horusiath afk
Claudio Bernasconi
@claudiobernasconi
Thanks I'll dig into this as well.
Claudio Bernasconi
@claudiobernasconi
Okay, instead of instantiating a pool-router in code, I make use of the creation in the config file. This way I should be able to use a clustered router, right? So I replace var jobCoordinatorRouter = actorSystem.ActorOf(actorSystem.DI().Props<JobCoordinatorActor>().WithRouter(new RoundRobinPool(5)), "JobCoordinator"); with the following snippet in the HOCON file:
deployment {
/JobCoordinator {
router = round-robin-pool
nr-of-instances = 20
cluster {
enabled = on
allow-local-routees = on
use-role = prototype
max-nr-of-instances-per-node = 5
}
}
}
How can I specify in the HOCON file which underlaying routee actor should be used? In the code line above I was selecting the JobCoordinatorActor as routee. In the HOCON file I am not specifing which routee to be used. Therefore my application does not process any work any more :-/.
Andrey Leskov
@andreyleskov
Hi all, is their any guide how to diagnose performance issues with akka.net ?
Classic performance monitors like DotTrace or Ants Profilers shows tons of threads and it is hard to understand anything
Bartosz Sypytkowski
@Horusiath
@claudiobernasconi Props.Create<JobCoordinatorActor>().WithRouter(FromConfig.Instance)
Maxim
@dubrovkinmaxim
@Horusiath Thank you!
Maxim
@dubrovkinmaxim
Sergey Prytkov
@Rattenkrieg
Hi guys, can I run only tests that are in specific project with provided FAKE script?
Bartosz Sypytkowski
@Horusiath
@Rattenkrieg you can alter FAKE script to contain specific path only - !! is used to create path filter and AFAIK it can be used with ++ or -- to include/exclude other filters
Sergey Prytkov
@Rattenkrieg
@Horusiath but there is no option to pass desired project(assembly) name as argument to that script?
Bartosz Sypytkowski
@Horusiath
I don't think so
Sergey Prytkov
@Rattenkrieg
ok, thanks
Bartosz Sypytkowski
@Horusiath
usually we make use of R# for running specific tests
Sergey Prytkov
@Rattenkrieg
there are some weird issues with my VS/R# - it can't locate any tests, so I felt lazy to investigate and tried to figure out another way to run tests
but seems there is no easier way than to fix VS/R#
Bartosz Sypytkowski
@Horusiath
R# sometimes has problems with detecting tests that are defined in abstract base classes but inherited higher in the inheritance hierarchy
Sergey Prytkov
@Rattenkrieg
Seems it's related with xunit
Sergey Prytkov
@Rattenkrieg
that was r# issue, VS test explorer works fine
Daniel Little
@lavinski_twitter
Testing akka, or better yet debugging akka can be a little painful because of timeouts. Something like this http://haacked.com/archive/2014/03/10/master-time-with-reactive-extensions/ (aka explicit time jumps) could be helpful as it would make tests more deterministic and debug-able. Would something like this be possible with akka?
Bartosz Sypytkowski
@Horusiath
@lavinski_twitter there is a notion of virtual time used for TestScheduler. However this works only with scheduling events. I'm not sure how this would work with timeouts. Akka.net has more complex, non linear execution model. But if someone would propose a solution for this, I'd love to see it.
Daniel Little
@lavinski_twitter
@Horusiath sure, thanks
to11mtm
@to11mtm
weird, Gitter built the history all out of order.
to11mtm
@to11mtm
@Aaronontheweb TY for the feedback! I got another Project team at work to start using Akka.NET, I spent an afternoon talking to their lead dev... next morning he had a whole bunch of whiteboard marked up and asked for my help to start rearch =D. Really can't overstate how the proj has done more to re-invigorate us about developing for .NET than anything Microsoft has attempted to do the last 3 years.
@Horusiath @lavinski_twitter Sorry to jump in, but I wonder if the Single-thread-debugging in visual studio would be useful? May keep the threads running remoting/etc from timing out when debugging, admittedly haven't tried.
Bartosz Sypytkowski
@Horusiath
@to11mtm AFAIK testkit actor system is using a single thread execution anyway
Daniel Little
@lavinski_twitter
@to11mtm @Horusiath the real pain point is Ask timout out as soon as you resume
Daniel Little
@lavinski_twitter
@Horusiath I'm also looking at Akkling and my actor takes obj, however if I send a type that I don't cast to obj first it doesn't get handled
Daniel Little
@lavinski_twitter
That's with sharding (shard, id, must be obj)
Daniel Little
@lavinski_twitter
It also seems to be causing a problem with Persist, which is proving difficult to debug
Aaron Stannard
@Aaronontheweb
would anyone here find an FsCheck + Akka.TestKit integration useful?
currently using one I rolled for a project internally, hadn't thought about OSSing it
destroys and recreates the ActorSystem between each setup of the FsCheck state machine model
Aaron Stannard
@Aaronontheweb
@to11mtm > Really can't overstate how the proj has done more to re-invigorate us about developing for .NET than anything Microsoft has attempted to do the last 3 years.
this is the highest praise I can imagine for those of us who've worked on the project