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?
@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?
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.
@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
@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.