Can't find appropriate examples of what I'm trying to achieve with Netty

NiPNi nils-petter at nilsen.as
Fri May 29 04:13:32 EDT 2009


I've been looking at Netty for a couple of weeks, it's a prime candidate for
our next project at work. However, the examples I've been able to find are a
bit too simple, and given my limited experience with Netty (and NIO in
general), I would appreciate some pointers.

Here's the quick overview of what I'm trying to do:
- We're going to make a server that will talk XML over TCP with up to 20000
clients
- We do not control the client side, but we do control the XML format
- It is the clients' responsibility to connect to the server and send
"isAlive" messages at some interval
- We want to keep all channels open at all times, as a means to discover
disconnected clients
- Messages can be sent unsolicited from either side; some require are
response, some do not
- There will be a substantial amount of software on top of the NIO
application that will produce responses to the clients' requests. Producing
responses may be time consuming, so we'd like to do this asynchronously

A typical scenario:
- A client connects to the server
- It sends isAlive every 5 minutes
- After a while, it sends a request
- The request is received and placed in a queue, for some other application
to process
- After a few seconds, the request is processed, and the response is placed
in a queue, for our server to handle
- The server takes the response from the queue and transmits it to the
client

I'm having some difficulties formulating the actual question here, because
this is all new to me (I usually work at a higher level, with webapps and
JBoss and such). 

My main issue, I think, is the fact that the response to a request is
produced asynchronously, so that from Netty's point of view, it's not a
response per se, but rather an unsolicited message initiated from the server
side. 

This means that I have to keep track of the connections. The clients do have
a logical ID that will be used in the higher-level applications, so I can
use that as a key to map the connections, but I don't have a clue what to
map.

What I'm looking for with this post are actually two things
- a confirmation that this sort of server is even possible to make with
Netty
- a pointer or example on how to attack this problem; the examples I've
found are good, but too simple to be of much help given my limited
experience in this field

Regards,

NiPNi
-- 
View this message in context: http://n2.nabble.com/Can%27t-find-appropriate-examples-of-what-I%27m-trying-to-achieve-with-Netty-tp2992637p2992637.html
Sent from the Netty User Group mailing list archive at Nabble.com.




More information about the netty-users mailing list