These are chat archives for akkadotnet/akka.net

14th
Nov 2017
Bartosz Sypytkowski
@Horusiath
Nov 14 2017 06:39
@mebymyself you can join cluster manually - Cluster.Get(system).Join(nodeAddresses)
Roman Golenok
@shersh
Nov 14 2017 09:18
Hi guys. Is anyone started Http() porting?
HermansG
@HermansG
Nov 14 2017 10:14
Our team is currently writing a POC with akka.net. For now we think about deploying the server actor system in 1 Windows service. We ran into a situation where we wanted to share a large data object between (parent/child) actors and we just put in in a constructor. We know this not valid in akka but is there anybody who also did it, because in the same CLR there will be no serialization?
Bart de Boer
@boekabart
Nov 14 2017 14:39
@HermansG you mean, you send that large data as a message? In that case, yes, been there, done that, no issues (anymore) with it. In our case, it was a 1 Gb xml file as XDocument.
HermansG
@HermansG
Nov 14 2017 14:55
@boekabart Hello Bart. W.r.t. your question: we have sent the larg data as a message and passed it via the constructor. In both cases it works without serialization, because it's in the same CLR. We know that because all references are conserved. Did your XDocument contain references?
Bart de Boer
@boekabart
Nov 14 2017 14:56
I'm not sure what you mean by 'passed it via constructor'. All messages (and surely as long as they don't leave the process via Akka.Remote) just plain old C# objects - they aren't copied, just the 'pointer' is passed along. And yes, an XDocument contains thousands of references. Which doesn't matter.
HermansG
@HermansG
Nov 14 2017 15:05
'passed it via constructor' means I coded Context.ActorOf(Props.Create(() => new MyActor(MyLargeData)));
You mention that only Akka.Remote leaves the process. This means that all local messages are not serialized right? I didn't read this important distinction in the documentation.
Bartosz Sypytkowski
@Horusiath
Nov 14 2017 19:31
@shersh I've got some early akka.http port, but I'm not touching it - the amount of code to port is immense, probably it would be even easier to first write some (even buggy) scala → C# transpiler to avoid porting all of the boilerplate code by hand and just focus human intervention to the hard parts
@HermansG actors can share some objects, but in order to maintain isolation, that kind of object should be either stateless, or have immutable readonly state
HermansG
@HermansG
Nov 14 2017 20:56
@Horusiath That is exactly our scenario. Do you also pass shared state in a constructor when it is 100% readonly local?
HermansG
@HermansG
Nov 14 2017 21:03
@Horusiath I read "Don't Ask, Tell" which is very enlightening.
About aggregation of a long list of answers of calculations.
We currently trust that while sending items of a list one by one, the order of the messages is preserved on the receiver side. Esp. we trust that sending a "Finished" message at the end is ok. Is this assumption correct? Does it depend on local/remote? Thanks for your answer.