Multiplexing: send multiple requests to the client in parallel throught only one socket.

pierz pierz at hotmail.it
Thu Oct 13 16:12:59 EDT 2011


Ok, I didn't find the response after googling and seeking a lot in your
forum.

I want to do data multiplexing through one channel. The server should be
able 
send multiple requests to the client in parallel through only one socket.

It have to be non blocking, by example : 
MSG1: server send a large file to the client.
MSG2: server send a short echo "message"; to the client, while the file
transfer
(MSG1) is not finished. 

Even if MSG1 is being sent, the MSG2 must be sent in parallel.

So how about doing that with netty ? 

My idea is about creating a protocol which will cut a MSG in several chunks.

The thread in charge of sending data will have severals "chunk queue",
imagine
there is 3 messages that have to be sent simultaneously, it will create 3
differents
chunk queues.

Each chunk queue will contain the chunks of its own message.

So the sender thread while take a chunk of queue 1, then send it, then queue
2,
queue 3... If a queue is empty, it's because the whole message have been
sent,
so it will only take the chunk from the lasts queues...

On the client side I reassemble the chucks into MSG, then parse the MSG...

Do you think I m on the good way, is it something that already do this in 
netty ? Do I have to use something ?


--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Multiplexing-send-multiple-requests-to-the-client-in-parallel-throught-only-one-socket-tp6890374p6890374.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list