directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [Mina] Architecture advice
Date Tue, 14 Feb 2006 05:28:03 GMT
Hi J-F,

On 2/14/06, daune.jf@daune-consult.com <daune.jf@daune-consult.com> 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:

http://issues.apache.org/jira/browse/DIRMINA-165

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 am not even sure non-blocking I/O are the appropriate way for this.


NBIO can handle this of course IMHO.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C

Mime
View raw message