Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Armin Garcia
I am trying to figure out how a message can be sent through a Netty Server to a connected client. I see the channel is stored in a group for each client that connects to a Netty Server: public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Armin Garcia
Hi James, First, thank you for your response. Yes, you are right. I am trying to setup a bi-directional communication link. Your suggestion would definitely accomplish this requirement. I was hoping the same channel could be reused without having to establish another uni-directional link.

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Shaun Williams
Another solution is to use the response leg of a transaction to push messages to the client, e.g. provide a server protocol like this: WeatherUpdate listenForUpdate(); This would essentially block until an update is available. The only problem is that if the client is expecting a series of

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Armin Garcia
Hi Shaun, This is definitely another way. I share your same concern. I have to keep an eye out for high availablilty and high throughput. I'll be depending on this connection to support a massive amount of data. -Armin On Fri, Jan 20, 2012 at 9:25 AM, Shaun Williams

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Armin Garcia
Hi James, I see your point. On a different NIO framework, I implemented exactly the same message handling procedure (ie message routing) you just described. I guess I was pushing the NettyTransceiver a bit beyond its intended scope. I'll take a look at the comet pattern and see what I can do

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Scott Carey
For certain kinds of data it would be useful to continuously stream data from server to client (or vice-versa). This can be represented as an Avro array response or request where each array element triggers a callback at the receiving end. This likely requires an extension to the avro spec, but

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Doug Cutting
On 01/20/2012 11:59 AM, Scott Carey wrote: For certain kinds of data it would be useful to continuously stream data from server to client (or vice-versa). From client to server this is supported today by using one-way messages over a stateful transport, like SaslSocket or Netty. From server to

Re: Writing Unsolicited Messages to a Connected Netty Client

2012-01-20 Thread Shaun Williams
What about making this explicit in the protocol specification by adding a generic callback request parameter type? e.g. void someRequest(callbackResponseType cb) BTW: The NettyTranceiver already prepends a call id to each request and stores the corresponding callbacks in a table, so it can