These are chat archives for akkadotnet/akka.net

2nd
Dec 2016
Lejdholt
@Lejdholt
Dec 02 2016 09:22 UTC
HI! Who is responsible for the testkit development? I've asked questions that I find it's behavior unreliable but haven't got a satisfactory answer. See: http://stackoverflow.com/questions/40767924/testing-behavior-not-consistent-when-watching-actor-for-termination
Arjen Smits
@Danthar
Dec 02 2016 09:28 UTC
@MickyMcKay_twitter There is some talk going on regarding SSL support, but nothings been decided yet.
Michael McKay
@MickyMcKay_twitter
Dec 02 2016 09:59 UTC
Thanks @Danthar !
Arjen Smits
@Danthar
Dec 02 2016 10:12 UTC
@Lejdholt I posted an answer on your SO question
With a fix to your problem
Arjen Smits
@Danthar
Dec 02 2016 10:18 UTC
@Horusiath Regarding https://github.com/akkadotnet/akka.net/pull/2389#issuecomment-264398758 How do you reconcile the Persist behavior with the batching behavior ?
I mean by that, if you send 1 message to the persistent actor
The batch being saved/executed, besides reaching its threshold. Is there also some timer running? To take into account when you only ever recieve less messages then the batch threshold ?
disclaimer: i have not looked in depth at your TestSpecs yet ;)
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 10:24 UTC
@Danthar it's only batching if you have surpassed maximum number of concurrent operations (it's a configurable value). So it won't wait until there are enough operations to fill the batch, if it's possible to execute it right away
@Lejdholt I've taken a look at your example, but this looks like some internal bug of akka.net event filters
I know that sometimes R# test runner shows failing tests, while running them through i.e. xunit console runner will pass them. In other situtations, I've found that setting xunit tests to execute in sync instead of concurrently also can solve an issue, but I've tried both techniques on your code, and both failed. So I guess it's probably some nasty bug.
Arjen Smits
@Danthar
Dec 02 2016 10:25 UTC
@Horusiath cool. I decided to read the code and find out. Its pretty neatly done actually.
In regards to @Lejdholt its definitely some timing issue between how tests are run in parallel by the test framework. Once i moved his 'SetUp' code inside the test itself. It fixed his problem
Lejdholt
@Lejdholt
Dec 02 2016 11:11 UTC
@Horusiath @Danthar Thank you both for looking at it :smile:
I will try to move the setup code inside the tests and try it out.
Lejdholt
@Lejdholt
Dec 02 2016 11:28 UTC
Will one of you post a bug or should I?
Arjen Smits
@Danthar
Dec 02 2016 12:23 UTC
@Lejdholt you can post it. And for more info on what i did, you can check your SO question.
Kris Schepers
@schepersk
Dec 02 2016 14:29 UTC
Hmmpf, starting to loose faith a little bit here..
Q: Is it possible that, due to some failure (network disruption, DB outage, ...) a cluster router's connection(s) get corrupted?
Kris Schepers
@schepersk
Dec 02 2016 14:37 UTC

In our situation, one node (with a specific roleA) in the cluster connects to an actor on another node (with another specific roleB) through cluster routing. The router is configured in the HOCON of roleA:

deployment {
/recipientdataclusterrouter {
router = round-robin-group
routees.paths = ["/user/recipientdataquery"]
nr-of-instances = 3
cluster {
enabled = on
allow-local-routees = off
use-role = recipientdata
}
}
}

For the moment there is only 1 instance in the cluster for roleA and roleB.

The work is being done in roleA and during that process, messages are being sent to roleB over the mentioned cluster router. When roleB has processed such a message, it sends a message back to the Sender actor in roleA. Things may work perfectly for days, but after some persistence failures, or network interruptions, the router seems to not deliver every message anymore.
Does someone have an idea about this?
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 14:45 UTC
@schepersk you mean every, so it sometimes delivers messages, but sometimes it's loosing them?
Kris Schepers
@schepersk
Dec 02 2016 14:46 UTC
yep, exactly.. some get through, some don't
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 14:46 UTC
do you have any info inside dead letters?
Kris Schepers
@schepersk
Dec 02 2016 14:47 UTC
that's the weird part, nothing in the log whatsoever
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 14:48 UTC
dead letters don't have to appear in logs
Kris Schepers
@schepersk
Dec 02 2016 14:50 UTC
where can you seen them then?
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 14:52 UTC
you'll have most control, if you'll subscribe to them directly Context.Syste.EventStream.Subscribe(Self, typeof(DeadLetter))
Kris Schepers
@schepersk
Dec 02 2016 14:55 UTC
which kind of extra info could show up besides the "from" and the "to"?
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 14:55 UTC
also the message itself if I'm right
Kris Schepers
@schepersk
Dec 02 2016 14:56 UTC
owkay.. looks like an easy enough addition and log it that way..
but that won't solve anything :-)
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 14:57 UTC
it would be good to know if message is swallowed on the sender or receiver side
if you didn't get any logs, I suspect that message send from router never reaches actor system of the receiver (which could possibly happen i.e. when actor system is dead, but that fact has not been yet acknowledged by the sender)
but without seeing reproducible example I can't say much more
Kris Schepers
@schepersk
Dec 02 2016 14:59 UTC
yes, I understand.. But it's really hard to reproduce. Never had any problems like this in dev/test/uat environments..
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 15:08 UTC

@schepersk so, as I said it's possible that some messages send from router will never reach their target (situation when cluster state is in flux, as we need few seconds to acknowledge that node has died/become unreachable), but after that fact, router should get Terminated confirmation about routees living on dead node, and stop sending messages there.

Also I don't know how it will behave if i.e. all nodes, where the routees lived, had died (so when there are no remote routees and i.e. routees are not allowed to live on the same node as router itself) - it's possible that in that case router will send those messages to void, but I'm not sure about that.

Kris Schepers
@schepersk
Dec 02 2016 15:18 UTC
so, routees are not allowed to live on node of router itself, configured that way (see hocon part above). There is only 1 instance of every role in the cluster (exept for lighthouses, there are 3 of those)
Andrey Leskov
@andreyleskov
Dec 02 2016 16:03 UTC
Hi all, I'm using EventBus to deliver messages to subscribers. Sometimes (randomly) published messages are not delivered. How I can debug it?
I see EventStream debug flag in constructor, but how can I set it to true?
Garrard Kitchen
@garrardkitchen
Dec 02 2016 16:36 UTC
What's the best way to confirm that an end point exists (ip:port) with akka remote?
John Nicholas
@MrTortoise
Dec 02 2016 16:45 UTC
is it possible to use akka.io to communicate with an actor system from say node?
Aaron Stannard
@Aaronontheweb
Dec 02 2016 16:54 UTC
@MrTortoise yep, totally
via socket
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 16:56 UTC
@MrTortoise akka.io is actor abstraction over raw sockets. You basically can do every network I/O you want.
Aaron Stannard
@Aaronontheweb
Dec 02 2016 17:01 UTC
@andreyleskov I think the debug flag is there for unit testing the EventBus itself
like inside Akka.NET's own internal tests
don't think there's a way to pass that in from the outside although I could be wrong
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 17:04 UTC
@garrardkitchen from the process itself, when actor system starts, you'll see logs which will tell you which on which ip:port actor system is listening. It's you want to build a cluster of connected actor systems, all you need is to know an address of single node that is already part of the cluster.
  • Common patters, is to havea 1-3 stub nodes with static well-known address, that other nodes will use to communicate.
  • Another approach is to use 3rd party service as rendezvous point for all nodes. This can be even a database table where nodes write down their own addresses to be easier to discover. I've created a very simplistic example of this using sqlite, however it's missing a case of hard system shutdown (registered addresses are never cleaned then).
@andreyleskov it would be hard to get debug logs about missing messages send from event bus, as event bus itself is a medium used to send log messages
John Nicholas
@MrTortoise
Dec 02 2016 17:10 UTC
@Aaronontheweb @Horusiath thanks
Rajiv Mounguengue
@Rajivhost
Dec 02 2016 17:14 UTC
Hi @Aaronontheweb @Horusiath, I don't see any plan for Akka.Http on the road map (https://petabridge.com/blog/akkadotnet-2015-roadmap/), nothing is coming for this?
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 17:17 UTC
@Rajivhost this has a low priority, as it's immense amount of work (it's been 2 years of work for 4 people), and even more work to maintain it. Since you can use akka.net with existing web frameworks, we want more to work on maturing existing plugins.
Rajiv Mounguengue
@Rajivhost
Dec 02 2016 17:18 UTC
@Horusiath ok, understood!
Andrey Leskov
@andreyleskov
Dec 02 2016 17:20 UTC
@Aaronontheweb @Horusiath I've found from code that flag is set from actor.debug.event-stream = on
Aaron Stannard
@Aaronontheweb
Dec 02 2016 17:21 UTC
heyo
nice job @andreyleskov
Andrey Leskov
@andreyleskov
Dec 02 2016 17:21 UTC
and have it configured, but did not get any logs 8(
now thinking about reasons and possibility how subscribers can miss messages, or die before it
btw event-stream setting is not described in documentation
Garrard Kitchen
@garrardkitchen
Dec 02 2016 18:57 UTC
Thanks @Horusiath. This is my scenario (over simplified)....I've 2 ActorSystems; 1 website & 1 win service. I want the website to check if win service is extant (has started up and listening on an address). I've been using ActorSelection().ResolveOne but that comms with actual actor and seems a little heavy for what I want to do at that particular point in my workflow. I'm not using akka.cluster.
Bartosz Sypytkowski
@Horusiath
Dec 02 2016 19:17 UTC
@garrardkitchen you probably need some third party to initialize connection. This can be database or queue i.e. actor system writing it's init endpoint in table or in messge bus.
Garrard Kitchen
@garrardkitchen
Dec 02 2016 19:24 UTC
@Horusiath Ok, thanks.