To use or not to use netty?

rzo rzo at gmx.de
Mon Jan 11 13:40:05 EST 2010


Hello,

thanks for your suggestions.

to 1:
the patch implements different types of service wrappers:

ImmediateInvokeService  which invokes the method within a single thread 
for all calls per connection.
ConntinuationService        where the invocation request is queued and 
method call can be done in a separate thread depending on the service 
implementation.

For the ImmediateInvocationService I have added as you suggest a 
ThreadLocal static attribute to the ImmediateInvocationService class.
For the ContinuationService I have added the method 
Continuation.getSession().

Thus for both architectures one may now access the session.
Similar to HttpSession from the servlet API, I have added methods such 
as Session.getAttribute and Session.setAttribute
See the patch example.

to 2:
for callback mechanism you do not need a second connection. You may use 
continuation on the server and HessianProxyFuture.addListener()  on the 
client.
I am adding an example chat application where you can see how this is 
done. Take a look at ChatService.getMessage(), 
ContinuationChatServiceImpl.getMessage()
and ChatClient.main.

I will check if I can also "detect" callback methods in the service api 
and call them directly (as done in RMI callback). But this is a long 
term goal.

I will post a mail with an update of the patch with the above changes 
and the chat example soon.

Feedback and comments are highly appreciated.

-- Ron




More information about the netty-users mailing list