mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Austin Lee" <austinflor...@gmail.com>
Subject Question regarding turning many NIO sockets into 1 backend socket stream
Date Fri, 07 Jul 2006 18:46:34 GMT
Hey guys... one more question,

Does anyone know of a good way to go about taking all of an NIO's
server requests on the public-facing side and routing them through a
SINGLE socket to a backend server?

for instance:

Client#1  -----
Client#2  -----
Client#3  ----- NIO Server ====(single port & socket)===== Backend
processing server
Client#4  -----   /MINA
Client#1000 ---

The NIO Server would receive each user's data until it is a full
"message" then pass each message to the dedicated backend server
asyncronously, through the socket (kind of like a queue).

The Backend server would process the incoming requests on this single
socket, and (for various reasons I'm not going into here) will send
writes asyncronously back to the NIO server across the same socket.

Does anyone know how best to go about doing this? Also, would this be
a good approach if I need to do alot of "number crunching" or
intensive database access for some requests and I don't want to slow
down the NIO's progress on all connections? Or if I need
heavy and slow database accesses on certain requests?

I thought this might be a good solution but I could use some input
from some more experienced folks like yourselves.

Thanks in advance,

View raw message