These are chat archives for akkadotnet/akka.net

10th
Nov 2015
"When should I use ActorSelection?"
"With an ActorSelection, you have no such guarantee. It's kind of like UDP"
When it happen?
it does not exist URI that DeadLetter catch some messages.
DeadLetter also fail to catch some messages
how to understand?
Thomas Lazar
@thomaslazar
Nov 10 2015 07:21
@Aaronontheweb @rogeralsing @Danthar so i asked on the nhusers google group and they said that the universe might collapse if you access the ISession from another thread. and also there might be some inconsistencies in tracked entities. so i guess you shouldn't do that in general but it might not be problematic in my case because i don't use entities in my scenario. https://groups.google.com/forum/#!msg/nhusers/ihKjDrOvvXc/RaNVrTnoBAAJ
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 08:13
I have an idea for an extension to simplify akka.cluster creation. Right now we need some discovery service - either dedicated seed node or lighthouse - with well known address. My idea was to use shared datastore (Azure Tables, SQL database and so on) instead - each cluster node will be configured on start to register it's own address in data store and ask it for a list of available cluster nodes. If it's alone, it starts as a seed node, otherwise it will join to first node available.
Roger Johansson
@rogeralsing
Nov 10 2015 08:19
@Horusiath that is exactly what we do in the akka service fabric integration
we register each akka node in the SF service discovery store
and then ask for a list of all other existing nodes
the same could easily be done with Consul, Zookeeper etc
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 08:29
I think, this should be more general, without need to install consul, zookeeper or use service fabric
it's good to have them, but it should be possible to work without need to instal them
btw. @rogeralsing do you have a binary formatter serializer somwhere? ;) I think I'll need it until we solve our serialization problems
mph911
@mph911
Nov 10 2015 09:41
HI folks, I am starting new and implement an applicatino which has security concerns. My question is how to I verify that the sender of a message is authorized to send. I want to check the sender identify with a list authorized senders. I tried to utilize
Sender == Context.ActorSelection ("...")
ups - sorry hit enter too soon.
the state fails miserably as well as all of the other ideas I had. So - Is there a way to achieve that easy or only by extracting the information needed from those objects?
Any help is - btw - greatly appreciated! :smile:
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 09:48
@mph911 you can assert on path like Sender.Path == ActorPath.Parse("...") . But keep in mind that this is not secure from third-party perspective - if somebody has access to your internal network, he/she could craft it's own message with right sender
MartinNiemandt
@MartinNiemandt
Nov 10 2015 09:50
Hi can you use the state on an actor system, e.g. to create a initializing state and set it to online state when it is done?
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 09:53
@MartinNiemandt you could create a similar behavior by using akka extensions. All you need is to create extension with state or actor field initialized and register it in actor system when it starts.
MartinNiemandt
@MartinNiemandt
Nov 10 2015 09:59
@Horusiath thanks I will give it a shot. :shipit:
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 10:00
general boilerplate for extensions looks like that:
public class MyExtension : IExtension
{
    public static MyExtension Get(ActorSystem system)
    {
        return system.WithExtension<MyExtension, MyExtensionProvider>();
    }

    public MyExtension(ExtendedActorSystem system)
    {
    }
}

public class MyExtensionProvider : ExtensionIdProvider<MyExtension>
{
    public override MyExtension CreateExtension(ExtendedActorSystem system)
    {
        return new MyExtension(system);
    }
}
and you create it with: var myExtension = MyExtension.Get(actorSystem)
this is thread safe operation, and you'll always have only one instance at the moment
this is how Cluster extension works too
MartinNiemandt
@MartinNiemandt
Nov 10 2015 10:12
Thank you sir, for going that extra step. I am going to give it a go and see how well I do. Hopefully my noobness does not interfere with my plans. :P
mph911
@mph911
Nov 10 2015 10:19
@Horusiath Thank you for the advise. Is there a secure way to verify a sender?
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 10:20
@mph911 encrypt messages using asymmetric cryptography?
Zetanova
@Zetanova
Nov 10 2015 10:32
@mph911 @Horusiath SSL/TSL TCP connections with server and client certificates
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 11:18
@Zetanova yeah, but it's not so easy to do so in current shape of Akka.Remoting , until we switch to DotNetty. This is why I haven't say so ;)
mph911
@mph911
Nov 10 2015 11:35
@Horusiath @Zetanova I though about that as well, but was hoping to get around that. How long does it take 'til DotNetty will be usable?#
Bartosz Sypytkowski
@Horusiath
Nov 10 2015 11:57
@Aaronontheweb some update on DotNetty adoption?
Anthony Brown
@bruinbrown
Nov 10 2015 13:26
@mph911 if you don't want to go the whole way with asymmetric crypto, if you use SSL when available, and don't mind the internal data of the message being visible, you could always use a shared key and HMAC the message, that'd at least allow you to guarantee the message sender
mggillen
@mggillen
Nov 10 2015 13:40
Wrestling with an Actor shutdown issue. When I attempt to use the Stop or GracefulStop I get this warning and the system does not shutdown. The AwaitTermination call never returns. Here's the warning I'm getting which makes not sense and it's truncated by the system not by me: "[WARNING][11/10/2015 1:37:45 PM][Thread 0014][LocalActorRefProvider(akka://LoadG
eneratorAppTwo)] akka://LoadGeneratorAppTwo/temp trying to remove non-child c"
mph911
@mph911
Nov 10 2015 13:44
@Horusiath That is a good idea! :smile: Thank you! On a seperate note can you tell me what the parameter in Identity is for, i.e.
` var actorIdentity = Context.ActorSelection (...).Ask (new Identity ("WHAT")).Result;
ohh dam' I meant to write new Identify ("WHAT") - that's the problem with fingers faster than brain :smile:
Chris G. Stevens
@cgstevens
Nov 10 2015 15:24
@Aaronontheweb Currently I am just using the default settings. I have played with them a few times but just made me wait longer for the problem to occur.
I have tried the auto-down which to me should work and makes sense but yeah.. it causes weird issues.
I also did find that when I have DEBUG logging, I am using Log4Net, that I get the OutOfMemory exceptions on the transport as I posted earlier.
For some reason when I connect my member on my system to the other environment something happens (still working on that part)...
But my Tester member become Unreachable by a member of the existing cluster. In this morning case it was my Worker. It reports that it is unreachable.
When the Worker member marks the Tester as Unreachable everything goes down hill from there in my cluster - [[akka://CommissionsService/system/cluster/core/daemon]] - Cluster Node [akka.tcp://CommissionsService@1.1.9.2:59310] - Marking node(s) as UNREACHABLE [Member(address = akka.tcp://CommissionsService@1.9.2.8:64329, status = Up]
This Worker was being SeenBy 6 members but then 4 members drop off that list so it is only being seen by 1 of 2 Lighthouses and itself when this occurs.
I did a wireshark and the only thing I am seeing that is (Header checksum: 0x0000 [incorrect, should be 0x6261 (may be caused by "IP checksum offload"?)]) which I am going to investigate next.
Right now I am feeling like when any member of the cluster becomes unreachable each member almost acts differently.
I can have a member that is "Joining" but is considered a RoleLeader which is confusing.
I am feeling like if my Cluster works... it works well. But if ANY member becomes unreachable for any reason.... weird things start to happen.
Aaron Stannard
@Aaronontheweb
Nov 10 2015 16:34
@Horusiath going to ask if they can do a new NuGet release soon
still working on my perf testing stuff
want to do a DotNetty integration into Akka.Remote once I'm able to get data from that
apples to apples against Helios
Aaron Stannard
@Aaronontheweb
Nov 10 2015 16:46
@mph911 are you using Akka.Remote or Akka.Cluster? There's a setting you can enable to only allow incoming messages to a select number of paths
mph911
@mph911
Nov 10 2015 17:11
@Aaronontheweb I'm not useing Akka.Remote yet but that will come sooner or later.