These are chat archives for akkadotnet/akka.net

25th
Apr 2016
Hyungho Ko
@hhko
Apr 25 2016 02:42
Hi. I want to use Akka.Hocon nuget package for my project's config.
My project is also using Akka.NET nuget package.
Akka.Hocon is using the same namespaces and class names with Akka.NET.
so, Compiler generates ambiguous reference errors.
How to solve it? ]
Marc Piechura
@marcpiechura
Apr 25 2016 06:36
@hhko if you use Akka you don't need the hocon package yet, we have an issue for this #1419
Hyungho Ko
@hhko
Apr 25 2016 06:55
@Silv3rcircl3 Thank you for good information.
Section name is fixed on 'akka' in both Akka.NET and Akka.Hocon.
I think if it is not fixed, Akka.Hocon can be more flexible library.
Vladimir Sergienko
@vss1001
Apr 25 2016 07:39
Hi gents, I have spent some time reviewing the options out there I am settled on using Akka.NET on my next project.
The one area that I have a question on at the moment relates to the security of over-the-web remoting.
Due to the nature of the application each client company's app instance will be running on its own VM with its own DB persistence for data that it is the "sole point of truth" however it will need to share parts of this data in real-time with an arbitrary and dynamically changing list of other company's app instances. I have to ensure that the communication between these app instances is secure but due to the dynamic interconnection I can't have predefined VPNs as suggested on http://getakka.net/docs/remoting/security . I am planning on deploying the app instances on ASP.NET Core RC1 on Ubuntu docker containers, is Akka.NET port to .net Core anywhere close to reliable or should I target Mono/ some other key recommendations?
Any suggestions on how I can ensure communication encryption / security for remote messages? Is it possible or viable at the moment to use DotNetty with Akka.NET instead of Helios to take advantage of TLS?
Toshko Andreev
@Ravenheart
Apr 25 2016 07:57
greetings guys
how do i remove Json.NET as the defaul serializer
i'm following the bootcamp tutorials
and everything works OK, but theres a warning that json.net will be removed as default serialzier soon
Marc Piechura
@marcpiechura
Apr 25 2016 08:00
@Ravenheart it's explained in the docs here
Marc Piechura
@marcpiechura
Apr 25 2016 08:09
@vss1001 we have an issue for .net core #992, @Aaronontheweb is working on replacing Helios with dotnetty, don't know what's the actual status is but until then the current solution is, as far as I know, to keep your ActorSystem secured behind a web api that supports your security concerns
Dave Sansum
@dave-sansum
Apr 25 2016 11:25

I have a question around dependency injection. In the akka.net docs it has the following "When scoping actor type dependencies using your DI container, only TransientLifestyle or InstancePerDependency like scopes are supported. This is due to the fact that Akka explicitly manages the lifecycle of its actors. So any scope which interferes with that is not supported."

What I want to figure out is why when akka manages the lifecycle of the actors does it also needs to do the same for dependencies? We're currently starting out with Akka in a hybrid environment so are injecting current components in to the actors. We've been hitting issues where singleton components are forced to instances (in the Ninject DI library specifically via BeginBlock) so we're ending up with say multiple db connections rather than using the singleton pool?

We can implement our own DI resolver to solve this which is fine but we're intrigued to know why this is the case in the first place as it's surely not a responsibility of the Akka framework to manage it's dependencies?

Thanks in advance

Toshko Andreev
@Ravenheart
Apr 25 2016 12:22
must I call base.PostStop() in override PostStop?
Arjen Smits
@Danthar
Apr 25 2016 12:23
@dave-sansum The discussion in here should be illuminating: akkadotnet/akka.net#1139
Note that it is abit older. But afaik not much has been improved since.
Toshko Andreev
@Ravenheart
Apr 25 2016 12:25
also there appears to be an ebook about akka.net (its referred to in Unit 2's start page) whats it called and where can i buy it from
Arjen Smits
@Danthar
Apr 25 2016 12:28
There are plenty of akka related books. And the theory is easily applicable to akka.net. http://getakka.net/docs/Books
as for .net specific books. I know there is one currently being written. But i keep forgetting the link: @bruinbrown is the author
Toshko Andreev
@Ravenheart
Apr 25 2016 12:31
alright thanks
Arjen Smits
@Danthar
Apr 25 2016 12:34
@dave-sansum In short. Singleton scopes should be supported. If it does not, its a bug in the DI plugin. imho
We know there are a few - bugs in the di plugins
I dont use DI i.c.w akka alot. But when i do its Autofac. And i know that one works properly in all cases.
I noticed that the more i use Akka in my projects, the less i use DI. Because eventually you realise having an actor manage those resources, is a better model. In an actor based world that is.
We do have some changes planned for the DI api. Im guessing that will also be the time some of those issues will be adressed.
when that is, i cannot say. Will probably be a while.
Dave Sansum
@dave-sansum
Apr 25 2016 12:42
@Danthar had a look through that link but couldn't find the answer. Even at this early stage we can see having an actor manage those resources is the right way but our hands are tied as we try and make it there! We're pretty convinced it's a bug with the Ninject DI library. If you read around Ninject 'BeginBlock' it's essentially discouraged as it ignores all life cycles set on the container and always creates a new instance everytime. We think this is just an unrequired step and even without the need for lots of DI forcing a change of lifecycle without anyone knowing just feels wrong. Happy to do a PR for the Ninject repo if it'd get merged sooner?
Arjen Smits
@Danthar
Apr 25 2016 12:43
@dave-sansum the link was intended to give you abit of background on the state of the DI plugins.
hence my followup above
And your right about it being a bug.
PR's are most welcome
We recently moved the plugins out of core repo
CI still needs to be setup. but that will also happen soon.
Dave Sansum
@dave-sansum
Apr 25 2016 12:53
Great. Will submit the PR this afternoon. Thanks for teh advice
Carlos Torrecillas
@CarlosTorrecillas
Apr 25 2016 16:08
Unfortunately our changes don't seem to be fully working and we are facing issues with the Release method in Ninject and the dependencies aren't being released for some reason. If we get to the bottom of it we will submit the PR
Arjen Smits
@Danthar
Apr 25 2016 17:10
:+1:
Justin Merth
@jdmerth
Apr 25 2016 17:19
Hi all, when using cluster sharding, how are entities removed from a shard when they're no longer needed?
Maxim Cherednik
@maxcherednik
Apr 25 2016 17:31
Hi guys got a q. I know I've already asked similar one, but I didn't quite get the answer.
Here are a few facts:
  1. Cluster is still in beta
  2. There are online courses from the Petabridge about akka.net including Clustering
    So having these 2, I would assume that the cluster module can be used already. Even though it's still in Beta, there could be a limited number of bugs for some edge cases, but it should work in the most cases.
    Is this correct? @Silv3rcircl3 @Danthar @Aaronontheweb
Toshko Andreev
@Ravenheart
Apr 25 2016 17:44
hey guys assuming i've got computers behind a NAT
is it at all possible to communicate with them
if say i have a central server thats all good network wise
Maxim Cherednik
@maxcherednik
Apr 25 2016 17:45
@Ravenheart if you wish to have a bottleneck, you can. Akka assumes peer-to-peer connection
Toshko Andreev
@Ravenheart
Apr 25 2016 17:47
so its out of the box OK
no router actors or anything
(i'm fine with a bottleneck at this point, its an internal hospital network)
Maxim Cherednik
@maxcherednik
Apr 25 2016 17:50
Probably you didn't get the whole picture. If you want to have a full blown akka application where all the nodes are communicating with each other, they need to see each other. By the bottleneck I mean, you will need to have a public endpoint which will do the rest - but it's not about akka already...
Kris Schepers
@schepersk
Apr 25 2016 18:48
@jdmerth Entities should passivate themselves.. It's rather well documented. An entity should send a Passivate message to its parent, the shard. When you supply a PoisonPill as return message, the entity will stop itself. See the Passivation chaper here: Cluster sharding
And a trigger for passivation could be using the SetReceiveTimeout functionality of an actor..