These are chat archives for akkadotnet/akka.net

30th
Aug 2018
John Haigh
@haighis
Aug 30 2018 00:27
does Petabridge.Cmd only run on windows?
hectorcaban
@hectorcaban
Aug 30 2018 03:04
I have a Web API dot net kicking off to actors on remote machines. I am using Lighthouse for the seeds. I am trying to maintain the cluster. If one of the remote actors crashes , i see the the bad messages logs. but when I run the remote actor to join the cluster it does not seem it joins or again.. the goal is to have the microservices for the solution.
Vagif Abilov
@object
Aug 30 2018 04:49
I am trying to recall what I read here about remoting between Akka.NET installations on different platforms. Is it so at the moment that Akka remoting between .NET FX and .NET Core won't work due to incompatibilities in a transport layer while remoting between Akka.NET apps deployed on .NET Core on Windows and Linux will be OK?
alberk8
@alberk8
Aug 30 2018 05:32
Does anyone have example of AKKA.Net clustering with round-robin-pool. I am confused with the https://github.com/petabridge/akkadotnet-code-samples example (this example uses group)
Bartosz Sypytkowski
@Horusiath
Aug 30 2018 05:46
@object I know company that has cluster where half of the machines is .net core and half is .net fx. I don't see why remoting would be an issue?
@alberk8 the major difference is that for group routers only join actors that you are expected to create and manage by yourself, while pool gives that control to a router itself - in case of a cluster routee actors are created on remote nodes using akka.net remote deployment.
Bartosz Sypytkowski
@Horusiath
Aug 30 2018 05:52
you can configure them either from HOCON config or directly from code
alberk8
@alberk8
Aug 30 2018 05:55
@Horusiath , What I am trying to achieve is like this. The main program consists of .Net Core Web API, and standalone microservices (.net core with AKKA cluster). I have lighthouse and the mircoservice and the main program joins to the same actor-system but the mirocservice never gets to do work where as the Web API actor is the one doing work.
alberk8
@alberk8
Aug 30 2018 06:00

WebAPI HOCON

akka {
actor {
provider = cluster
deployment {
/xiot {
router = round-robin-pool
nr-of-instances = 4
cluster {
enabled = on
max-nr-instances-per-node = 1
allow-local-routee = off
use-role = xiot
}
}
}
}
remote {
dot-netty.tcp {
hostname="0.0.0.0"
port = 4050
public-hostname ="192.168.18.51"
public-port = 4050
}
}
cluster {
auto-down-unreachable-after = 10s
seed-nodes = ["akka.tcp://system@192.168.18.53:4053"]
roles = ["xiot"]
}
}

Bartosz Sypytkowski
@Horusiath
Aug 30 2018 06:00
@alberk8 I'm not sure if cluster router will be exactly what you want - I mean yes, you can configure it in a way, where routees will live on microservices and do the job, but they will still be managed by router actor, that lives inside web api actor system
alberk8
@alberk8
Aug 30 2018 06:02
What i want to achieve is to be able to scale the microservice (across multiple machine) independent of the main Web API.
Bartosz Sypytkowski
@Horusiath
Aug 30 2018 06:07
you can do this from code:
Context.ActorOf(new ClusteredRoundRobinPool(
    new RoundRobinPool(
        nrOfInstances:4, 
        resizer: null, 
        supervisionStrategy: null, 
        routerDispatcher:Dispatchers.DefaultDispatcherId),
    new ClusterRouterPoolSettings(1, 1, false)
).Props(Props.Create<MyWorker>()), "my-router")
alberk8
@alberk8
Aug 30 2018 06:08
@Horusiath How does that look like in HOCON ?
Bartosz Sypytkowski
@Horusiath
Aug 30 2018 06:09

@alberk8

What i want to achieve is to be able to scale the microservice (across multiple machine) independent of the main Web API.

Then probably using routers is not a good idea . Distributed pub-sub/cluster client is probably something more aligned to your case.

routee actors will live as long as their router parent lives, and if you initialize a new router pool somewhere else, it will have it's own pool of actors (router pools don't share their actors)
alberk8
@alberk8
Aug 30 2018 06:10
Where can I get more information on the Distributed pub-sub/cluster? Thanks.
Bartosz Sypytkowski
@Horusiath
Aug 30 2018 06:11
I've wrote a blog post some time ago on petabridge site: https://petabridge.com/blog/distributed-pub-sub-intro-akkadotnet/
also there's a cluster client: it uses distributed pub-sub, but it allows you do connect i.e. 2 clusters together or actor system to cluster without being its part
Vagif Abilov
@object
Aug 30 2018 10:19
@Horusiath I meant this comment from @Aaronontheweb: "Akka.NET on .NET 4.5 is not wire compatible with Akka.NET on .NET Core; this is due to fundamental changes made to the base types in the CLR on .NET Core. It's a common problem facing many different serializers and networking libraries in .NET at the moment. You can use a X-plat serializer we've developed here: #2947 - please comment on that thread if you're considering building hybrid .NET and .NET Core clusters."
Is this only related to .NET 4.5 and not later versions of .NET FX, so there is no wire compatibility issues between .NET 4.6/4.7 and .NET Core (and .NET Core on Linux)?
stevemesser
@stevemesser
Aug 30 2018 14:35
Is anyone maintaining Akka.Quartz.Actor? Haven't been able to update to the latest version for a while.
Aaron Stannard
@Aaronontheweb
Aug 30 2018 16:25
@object I'm not sure
haven't tested that myself
I'd imagine the issue is persistent there
the problem is that they changed the namespaces of the core base types
so System.String isn't in the same place on .NET Framework and .NET Core
that's what that serializer accounts for
it knows how to translate between the two
@haighis >does Petabridge.Cmd only run on windows?
no, it should be cross-platform
I guess I need a way of distributing the commandline app on Linux though
because right now it depends on Mono
guess I'll just rewrite that to ship as a stand-alone .NET Core application
shouldn't actually be that big of a change to be honest
but all of the back-end stuff, Petabridge.Cmd.Host et al
that all definitely works on both platforms
John Haigh
@haighis
Aug 30 2018 17:48

I am wondering if it's possible with SignalR to have a RecieveActor to Send a message from an Actor to the client browser with SignalR?
I have a remote actor system running in a console application - server in Remote Actor system
I have a asp.net mvc web application with signalr - client to Remote Actor System

To add more context I would prefer to not create Actor's in the asp.net mvc web app, where it's a client to the remote actor system

Chandra Sekhar Manginipalli
@leo12chandu
Aug 30 2018 18:30
anyone know if there is a way to set a role of poolrouter programmatically as a fallback? so i have router config defined in HOCON, but role is the only element I want to derive within the code, rest of the router config I want it to use whatever is defined in the config. Curious if anyone knows of a way to do that.
Aaron Stannard
@Aaronontheweb
Aug 30 2018 22:12
@bobanco FYI, pushing updated versions of our beta packages with that fix
should make that NuGet warning go away