These are chat archives for akkadotnet/akka.net

5th
Jun 2016
Jaben Cargman
@Jaben
Jun 05 2016 01:50
I love the "ah-ha" moment when the state machine mechanics of become/stash etc click for handling remote processes. Very much thanks to the wonderful tutorial. Thanks guys.
Andrey Leskov
@andreyleskov
Jun 05 2016 16:59
Hi all. Can we pass Props with DI over the wire? For me - no, as it contains non-serializable ContainerResolver parameter (UnityDependencyResolver, for example). So any DI should be done only for local actors.
Roger Johansson
@rogeralsing
Jun 05 2016 17:16
@andreyleskov that is one of the reasons why we want to completely redesign the DI support, it does not play well with remote deployment
Andrey Leskov
@andreyleskov
Jun 05 2016 17:24
@rogeralsing thank you for fast answer. Theoretically we can create custom serializer for Resolver class, as it requires only external parameters to function - ActorSystem and container. So we should not serialize it, but just recreate on remote system.
Roger Johansson
@rogeralsing
Jun 05 2016 17:26
You can probably do that using ISurrogated, and ISurrogate, on your resolver class. that gives you access to the executing system when deserializing
Andrey Leskov
@andreyleskov
Jun 05 2016 17:39
ok, thank you for advice ! will share results
Andrey Leskov
@andreyleskov
Jun 05 2016 18:06

Created custom serializer as described in http://getakka.net/docs/Serialization, and it works properly, but getting new error from wire:

[ERROR][05.06.2016 18:04:11][Thread 0062][[akka://LocalSystem/system/endpointManager/reliableEndpointWriter-akka.tcp%3a%2f%2fLocalSystem%40127.0.0.1%3a8090-1/endpointWriter]] AssociationError [akka.tcp://LocalSystem@127.0.0.1:42242] -> akka.tcp://LocalSystem@127.0.0.1:8090: Error [Unknown manifest value] [   at Wire.Serializer.GetDeserializerByManifest(Stream stream, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass4_0.<GenerateFieldInfoDeserializer>b__1(Stream stream, Object o, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass1_0.<MakeReader>b__0(Stream stream, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass4_0.<GenerateFieldInfoDeserializer>b__1(Stream stream, Object o, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass1_0.<MakeReader>b__0(Stream stream, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass4_0.<GenerateFieldInfoDeserializer>b__1(Stream stream, Object o, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass1_0.<MakeReader>b__0(Stream stream, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass4_0.<GenerateFieldInfoDeserializer>b__1(Stream stream, Object o, DeserializerSession session)
   at Wire.CodeGenerator.<>c__DisplayClass1_0.<MakeReader>b__0(Stream stream, DeserializerSession session)
   at Wire.Serializer.Deserialize[T](Stream stream)
   at Akka.Serialization.WireSerializer.FromBinary(Byte[] bytes, Type type)
   at Akka.Remote.MessageSerializer.Deserialize(ActorSystem system, SerializedMessage messageProtocol)
   at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, SerializedMessage message, IActorRef senderOption)
   at Akka.Remote.EndpointReader.<DeliverAndAck>b__17_0(Message msg)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at lambda_method(Closure , Object , Action`1 , Action`1 , Action`1 )
   at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture`4.Handle(T value)
   at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
   at Akka.Actor.UntypedActor.Receive(Object message)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Actor.ActorCell.ReceiveMessage(Object message)
   at Akka.Actor.ActorCell.Invoke(Envelope envelope)]
Cause: Unknown

My config:

   actor {
             #serialize-messages = on
             #serialize-creators = on
             serializers {
                         wire = ""Akka.Serialization.WireSerializer, Akka.Serialization.Wire""
                         unity= ""GridDomain.Node.AkkaMessaging.Routing.UnityDependencyResolverSerializer, GridDomain.Node""
             }

             serialization-bindings {
                                   ""System.Object"" = wire
                                   ""Akka.DI.Unity.UnityDependencyResolver, Akka.DI.Unity"" = unity


             }
Never faced such error before from wire - "Unkown manifest value". Please share any links to read if somebody is familiar with it.
Bartosz Sypytkowski
@Horusiath
Jun 05 2016 19:12
@andreyleskov could you show the type definition of element, you're trying to deserialize?
Andrey Leskov
@andreyleskov
Jun 05 2016 19:46
@Horusiath I'm trying to pass System.DI().Props() by wire
May be I should register my custom deserializer in wire somehow? Because Props gets deserealized by Wire, and UnityDependencyResolver is nested inside
Andrey Leskov
@andreyleskov
Jun 05 2016 19:53
@mebymyself it seems I need to define serializer for whole props class, because serializers are message-based
btw: is there any information about Surrogate ? , akkadotnet/akka.net#1941 is actual
Bartosz Sypytkowski
@Horusiath
Jun 05 2016 20:10
@andreyleskov I guess you cannot simply serialize DI'ed props (like you can with normal props)
surrogate is basically class used as replacement solely for serialization needs. To use it, your class must implement ISurrogated interface with a method which will return a serializable instance of a class, that implements ISurrogate mechanism
ISurrogate implements method which can return original object
simonpetty
@simonpetty
Jun 05 2016 21:58
hi guys. i'm trying to update an EventStore persistence plugin. is there a way for me to output more logging info from the tests themselves (to work out why they're all currently failing!)?
also, i'm wondering if they're timeout related - any way of increasing the timeouts (from 3 secs it seems)?