directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [Mina] Architecture advice
Date Tue, 14 Feb 2006 07:59:09 GMT
Quoting Trustin Lee <>:

> Hi J-F,
> On 2/14/06, <> wrote:
>> I must transfer files using a TFTP-like protocol (over TCP). The file size
>> does
>> not exceed 1 MB.
>> The file is truncated in numbered 512 bytes slices, each slice is
>> acknowledged
>> using a message.
>> A same file is requested many times, by different clients. So there is
>> room for
>> message caching and sharing.
>> My main question is how to make most benefit of Mina given those two
>> characteristics: 1) message cache and 2) multiple concurrent read-only use
>> of
>> same messages.
> To fulfill both requirement, we need ByteBuffer.duplicate().  MINA
> ByteBuffer doesn't provide duplicate() of slice() method for now.  We're
> going to resolve this issue somehow.  There's a discussion realated with it
> here:

Thanks for info. I'll take a look at it.

> Messages can be cached of course.  Moreover, if we can cache the encoded
> bytebuffer, the performance at a certain case will increase dramatically
> because it can bypass the actual encoding process.  I hope this feature is
> included with MINA 0.9.2.

I also do hope it will.

>> I am not even sure non-blocking I/O are the appropriate way for this.

> NBIO can handle this of course IMHO.

Yes it can, but I wonder whether it brings something over BIO in term of

This is a general question I have towards NBIO.

NBIO brings better scalability, at the price, IMHO, of complexity (less
intuitive model, require use of FSM-based protocol handler).

I always wonder from which nr of simultaneous connections NBIO take the
advantage over BIO.

I also wonder whether BIO perform better when load is not high.

Actually, it would be interesting to implement the same protocol (average
complexity) using BIO and NBIO, and compare their performance under several
loads. Does such benchmark already exist?

Best regards,


View raw message