Re: [akka-user] akka serialization - message boundary

2016-09-08 Thread Wei
Thanks. I am looking into that lib. On Wednesday, September 7, 2016 at 4:22:44 AM UTC-4, Guido Medina wrote: > > Hi, > > You can also try Akka Kryo serialization extension, it has proven to be > very efficient so far so you don't have to write your own serialization. > Kryo offers you automatic,

Re: [akka-user] akka serialization - message boundary

2016-09-07 Thread Guido Medina
Hi, You can also try Akka Kryo serialization extension, it has proven to be very efficient so far so you don't have to write your own serialization. Kryo offers you automatic, manual (by you listing explicitly) registration of the classes and both. It is a very matured extension and its backed

Re: [akka-user] akka serialization - message boundary

2016-09-07 Thread Wei
Thanks for all the suggestions, folks. I am using case class (enclosing the real data) for all my messages and I am trying to use protobuf to serialize my message instead of java serializer. Based on your comment, the case class(not the data inside it) will determine the serializer to use.

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Viktor Klang
The outermost serializer defines how it serializes its data, so any serializer would have to decide how it figures out how to serialize its contents. On Tue, Sep 6, 2016 at 3:39 PM, Konrad Malawski < konrad.malaw...@lightbend.com> wrote: > This document talks about serialization in the context

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Konrad Malawski
This document talks about serialization in the context of persistence, but many of the patterns are the same for remoting: http://doc.akka.io/docs/akka/snapshot/scala/persistence-schema-evolution.html -- Konrad `ktoso` Malawski Akka @ Lightbend On 6

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Konrad Malawski
Hi there, not quite. If you use java serialization of X that contains Y things, then Java serialization serializes the entire thing. For example, if you serialized a List using java serialization, it also will serialize the things inside the list - that's how it works. Akka always wraps your

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Wei
Thanks a lot for the reply, it is very helpful. My knowledge in networking/serialization is very limited, so please let me check a more complex example for serialize/deserialize in akka-remote: say I send a immutable List as the message. In more understanding, the List itself will use java

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Viktor Klang
Akka encloses the binary data in an envelope to track message size. It is recommended to send small messages for the same reason it is recommended to to send huge packets through normal post boxes. :-) -- Cheers, √ On Sep 6, 2016 08:00, "Wei" wrote: > Hello, > > I am trying