These are chat archives for akkadotnet/akka.net

29th
Aug 2018
Alex Michel
@amichel
Aug 29 2018 08:18
Hi,
Is there any recommended way to establish pub sub across several different clusters? Do I have to use external means like RabbitMq for it or can be achieved with Akka remoting?
Vagif Abilov
@object
Aug 29 2018 10:52
@amichel Akka supports distributed pub-sub.
If messages are to be consumed by an Akka application, then built-in pub-sub should work fine. External queues fit in a scenario with non-Akka consumers of such messages.
Alex Michel
@amichel
Aug 29 2018 14:42
@object As far as I see, distributed pub-sub is only available within actor system. How do I communicate between separate actor systems running in their own clusters?
Vagif Abilov
@object
Aug 29 2018 15:47
@amichel I didn't check this specifically but I don't expect that you can use Akka message transport for distributed pub-sub between different Akka clusters.
Alex Michel
@amichel
Aug 29 2018 15:49
@object I see. Thanks. Just wanted to confirm. I could still use ClusterClient on both ends to send messages to other cluster, but that's hard to maintain
Bartosz Sypytkowski
@Horusiath
Aug 29 2018 16:55
@amichel there's a cluster client feature, that can be used to connect to cluster of akka systems without being part of the cluster itself
and it works in very similar manner to distributed pub-sub
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:34
@pshrosbree I'll update Lighthouse
and have it do dual builds for Docker on both Windows and Linux
needed to upgrade Petabridge's build farm to automate that
which I finally have
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:35
Great!
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:35
also, we should use the new public-port feature
so we can allow for port mapping
Lealand Vettleson
@spankr
Aug 29 2018 17:35
woot!
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:35
added to Akka.NET in 1.3.6 I think
so yeah, I have some work to do there
should probably just upgrade to .NET Core 2.0 while I'm at it
since literally no one uses .NET Core 1.1
according to our survey of ~350 active Akka.NET users
tons of different versions of .NET Framework from 4.5 and up being used
lots of .NET Core 2.0 and probably 2.1 now
big fat 0 for .NET Core 1.0 and 1.1 :p
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:37
What is the public-port feature?
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:37
works the same way as public-hostname
Lealand Vettleson
@spankr
Aug 29 2018 17:37
we just bumped to 2.1
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:37
you can advertise your actor system as being hosted on a different hostname than to which the socket is actually bound
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:37
OK
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:37
public-port does that for port mapping
it was added specifically for docker
i.e. the socket can always listen on a static port
but advertise itself to other nodes using whatever port docker assigned to it
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:42
That will be very useful.
We could definitely use that.
We run a mix of Linux (.NET Core) and Windows (.NET Core and .NET Framework) containers in Service Fabric and Kubernetes, as well straight up Service Fabric services in Service Fabric.
Right now I am implementing a stateless Service Fabric seed node service that uses the Service Fabric endpoint resources from the service manifest as the cluster and Petabridge.Cmd endpoints.
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:43
I'll go ahead and update this library first: https://github.com/petabridge/akkadotnet-bootstrap/tree/dev/src/Akka.Bootstrap.Docker - and then apply those changes onto Lighthouse
I should add a generic base image for Windows docker containers there too
since I think the only Dockerfile we have right now is Linux
We run a mix of Linux (.NET Core) and Windows (.NET Core and .NET Framework) containers in Service Fabric and Kubernetes, as well straight up Service Fabric services in Service Fabric.
Right now I am implementing a stateless Service Fabric seed node service that uses the Service Fabric endpoint resources from the service manifest as the cluster and Petabridge.Cmd endpoints.
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:44
I did not know about that repository, so thanks or the pointer. :)
Aaron Stannard
@Aaronontheweb
Aug 29 2018 17:44
that is bad ass
I haven't advertised that library so much because it still needs some work
was hoping to add K8s and Service Fabric flavors to it also
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:49
I am happy to share what I do, but I'd have to drop some of the dependencies I have in what I have written on in-house telemetry. This is easy to do because everything is injected with Autofac, but at the same time I use Autofac extensively to allow simple replacements of all sorts of Autofac services, right down to ports and hosts. This may be more indirection and DI than people are comfortable with, but it makes it extremely decoupled and easy to configure and test.
Peter Shrosbree
@pshrosbree
Aug 29 2018 17:59
I like Akka.Bootstrap.Docker. I have a similar idea, albeit more granular, for Service Fabric, in which I inject the Service Fabric manifest config overrides into the HOCON for the Config.
The trouble with using HOCON directly in the Service Fabric manifest is that the values for different environment are in parameters XML files that use XML attributes rather than XML elements. It is extremely messy to write HOCON directly in XML attributes, so I build HOCON from service config sections like:
<Section Name="HOCON">
    <Parameter Name="akka.cluster.roles" Value="[cluster-seed-node]" />
    <Parameter Name="akka.cluster.seed-nodes" Value="[]" />
    <Parameter Name="akka.loglevel" Value="INFO" />
    <Parameter Name="akka.remote.log-remote-lifecycle-events" Value="DEBUG" />
    <Parameter Name="seed-node.actorsystem" Value="appcenter" />
</Section>
This makes it easy to configure the Service Fabric service idiomatically.
@Aaronontheweb For the Service Fabric flavor you have these convenient environment variables: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-environment-variables-reference
Peter Shrosbree
@pshrosbree
Aug 29 2018 18:05
@Aaronontheweb Would you accept PRs on Akka.Bootstrap.Docker?
Well, an Akka.Bootstrap.ServiceFabric, actually.
Aaron Stannard
@Aaronontheweb
Aug 29 2018 18:53
I will!
it'd save me a ton of trouble ;p