demultiplexing protobuf messages
sandstorm_sh
sandstorm_sh at abv.bg
Mon Nov 2 07:04:54 EST 2009
How can we demultiplex protobuf messages, given the fact that a message has
not any type defining header information in itself, and the protocol we are
trying to define is message-flexible so to say, i.e. has not got any fixed
message sequence hardcoded into the protocol definition.
one solution is to prepend the type header like a lengthfieldprepender
prepends a length field, and to decode the message with an appropriate
protobuf decoder.
we can maintain a collection of decoders for the corresponding types, but
the problem is that the decode method is protected, not public, and we can
not invoke it.
so we should use the pipeline somehow, and my question is what is the
standard idiom for this particular situation: do we have to replace handlers
in the pipeline, based on the incoming message type ?
what is the standard thing to do ?
example code in the netty distribution contains protobuf examples, but there
is one message type incoming and outgoing..
im a bit newbie in netty, so i'd like some elaboration on this topic, thanks
--
View this message in context: http://n2.nabble.com/demultiplexing-protobuf-messages-tp3931395p3931395.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list