users@grizzly.java.net

TCP multiplexer with Grizzly Framework

From: Raffaele Marcello <marcelloraffaele_at_gmail.com>
Date: Tue, 17 Apr 2012 14:39:47 +0200

*Hi*,
i'm new in Grizzly framework and i'm studying it. In my next project I need
to develop a "TCP multiplexer", a module that accept n socket and forward
each packet in one of m socket (output) with n>>m.
My forwarder need to do these:

   - During the forward, i need to add an header(add an packet id) to each
   packet
   - manage anwers: all packet have an answer packet, so i need to answer
   to the right socket (using the packet id)
   - manage permanent sockets: never close sockets
   - manage timeouts: if i have a timeout, i need to notify it and manage
   (doing something)
   - Performance Optimization: open socket, and high number
   transaction->thread management->memory management
   - (optional) load balance between output socket

I have the following questions:

Is there a ready component that do it?

What can i use to develop something like this? Can you suggest some class?
Which is the best way to pack it? I'm thinking about:

   - stand alone jar: simple and light
   - web application: i can add also web pages for management ad display
   current state (statistics)

i hope that you can help me

Thanks

Raffaele