Netty server sending protobuf messages, correct design approach

Marc-André Laverdière marcandre.laverdiere at gmail.com
Mon Nov 29 03:17:01 EST 2010


I don't think RPC is a good idea, especially for streaming results.
When you have multiple message types, you need to wrap them up in a
meta message, or have an enum before hand that will let your client
know what type of message to parse.
As for the streaming, you can only have a 'hasmore" flag in your meta
message... If set to true, expect more, otherwise you can close the
connection. Simple :)


Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and
complete, not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



2010/11/15 pravesh <pravesh.chaudhary at rbs.com>:
>
> Hi,
>
> Can anyone suggest me the correct design approach of setting up Netty
> Client/Server
> Below is the description of Use Case that I am addressing:
>
> Client:
> I have a Client who is sending request containing query parameters.
> Server:
> The server will parse the query parameters and send the search results as
> messages(I am looking forward to use google proto buf messsages) back to the
> client.
> Now there is a twist:- There will be multiple mssages as part of response
> and in some cases even the response stream continues indefinitely as it may
> start publishing a live feed.
>
> Now the question:
> Is making RPC call a viable option, or do I need to set up something extra.
> Please advice.
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-server-sending-protobuf-messages-correct-design-approach-tp5739423p5739423.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>



More information about the netty-users mailing list