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 serializer while the content of the List correspond to a class 
that uses my custom serializer. In this case, will the akka 
serialization/envelope mechanism be able to deserialize correctly so that 
in the serializer fromBinary callback the Array[Byte] always correspond to 
a whole object, no more no less?


On Tuesday, September 6, 2016 at 2:33:38 AM UTC-4, √ wrote:
>
> 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" <[email protected] <javascript:>> wrote:
>
>> Hello,
>>
>> I am trying to write a custom serializer in akka. While deriving from the 
>> Serializer trait and implementing the fromBinary(byte, clazz) methods, I 
>> started to think of a questions: does the byte given to this method always 
>> one whole message? Could it be partial or multiple message in the byte? In 
>> other words, how does akka determine message boundary when getting the byte 
>> from the network stream? 
>>
>> Thanks a lot.
>>
>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to