protobuf and MessageLite

"Trustin Lee (이희승)" trustin at gmail.com
Thu May 6 00:12:22 EDT 2010


Hi Jan,

Thanks for a good suggestion.  I've just updated the
ProtobufEncoder/Decoder to use MessageLite instead of Message.

Cheers,
Trustin

Jan Van Besien wrote:
> Hi
> 
> I'm using Netty for a simple client/server style application with protobuf
> serialization. Netty is used for the client, and for a mock of the server.
> The actual server is an embedded C++ application running with limited cpu
> and memory resources. For that reason, we configured protobuf to be
> optimized for a "LITE_RUNTIME".
> 
> The Java classes generated by protobuf therefore implement the MessageLite
> interface, rather than the Message interface (Message extends MessageLite).
> 
> The ProtobufEncoder and ProtobufDecoder from Netty however depend on the
> Message interface. I created my own ProtobufLiteEncoder and
> ProtobufLiteDecoder based on the ones from Netty, and all I had to change
> was to replace all usages of Message with MessageLite. In other words, it
> seems the provided encoder and decoder don't rely on the extra methods in
> the Message interface.
> 
> Would it be a good idea to change the default encoder en decoder for
> protobuf to use the MessageLite interface?
> 
> Kind regards
> Jan

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100506/25164889/attachment-0001.bin 


More information about the netty-users mailing list