These are chat archives for akkadotnet/akka.net

21st
Dec 2016
Aaron Stannard
@Aaronontheweb
Dec 21 2016 01:32
on the latter
I'd have to think about it
on the former, we use Within block generously inside that code
Belén
@belenmorenate
Dec 21 2016 07:58
Hi all! how could I mock the DistributedPubSub mediator in unit tests? When getting it from Sys, it throws a null pointer exception
Arjen Smits
@Danthar
Dec 21 2016 08:31
@philiplaureano the default-dispatcher has an throughput property in the config. If you set that to 1 (its 30 by default) the dispatcher would basically behave more in an pre-emptive way. Although it wont be perfect :P. https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka/Configuration/Pigeon.conf
Bartosz Sypytkowski
@Horusiath
Dec 21 2016 08:33
@Danthar not quite the case - message still needs to be processed before going back to the dispatcher ;) True preemptive scheduler should be able to intercept executed code in non-fixed points.
that's the difference:
  • cooperative - the task/process says when it's ready to release control back to the scheduler
  • preemptive - scheduler is able to intercept task/process and take control back, when it "think" it's right
Arjen Smits
@Danthar
Dec 21 2016 09:27
@Horusiath that is true. However with preemptive the result is generally that each task gets a certain time-slice in which work can be done. Also to prevent misbehaving code from constantly claiming alot of resources.
If you reduce the throughput in the scheduler to 1, it can be a way to try and simulate that behavior, although it would be most apparent in an saturated env. But then again, it would not be perfect. Because like you say: it wont be able to aggressively take back control of a certain task.
So it would basically become an very-poor-mans-preemptive scheduler :P
Aaron Stannard
@Aaronontheweb
Dec 21 2016 16:08
@belenmorenate saw your SO issue! I'll take a look at that this morning
Belén
@belenmorenate
Dec 21 2016 16:45
Great! thanks
Alex Michel
@amichel
Dec 21 2016 20:30
@Horusiath I see. That could possibly lead to race condition and lead to out of order messages being sent from both stash and clients
Alex Michel
@amichel
Dec 21 2016 20:38
When creating a cluster shard proxy can I use interface as type name? I want to avoid referencing and deployment of actual actor implementation in client side applications.
Bartosz Sypytkowski
@Horusiath
Dec 21 2016 21:43
@amichel type name is used only as identifier of a segment within actor path. This can be any URI-compatible string