directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: ProtocolCodec question
Date Thu, 12 May 2005 01:13:53 GMT
Hi,

2005/5/11, Emmanuel Lecharny <elecharny@gmail.com>:
> > > I have a question about the ProtocolCodec stuff :
> > > - is it possible to have an encoder that can push chunks of PDU
> instead
> > > of pushing a whole PDU ?
> >
> > You can push chunks of PDU by calling write(ByteBuffer) multiple
> > times.  But MINA will flush the list of buffers you pushed in after
> > encode() method returns.
> 
> Isn't it possible that MINA flush the chunks before the encode method
> return ?

I can fix it to do so.

> > So You'll be able to limit the maximum size
> > of ByteBuffer you allocate if you're using autoExpand mode, but MINA
> > doesn't flush them until encode() method returns.   (WDYT about
> > autoExpand mode btw? ;)
> 
> It would be very coll if neither the encoder nor MINA creates a 10Mb
> ByteBuffer before sending it (think about a LdapSearch which returns all
> Ldap entries ...) In this case, the data will be store twice : once in
> the POJO and once in the ByteBuffer. not very good ...

You're right, but I think MiNA can force users to use smaller buffers.
 But we'll have to write somewhere like FAQ about this issue.

> on a muli-processor computer, it will make a better usage of each
> processor... But I'm thinking of MINA as a front-end, like Apache is for
> J2EE servers. may be it's a little bit too early ?
> 
> Another advantage would be that MINA could send DNS requests to a
> DNS/ApacheDS which run on a JVM, Kerberos requests to a
> Kerberos/ApacheDS server, Ldap requests to a Ldap/ApacheDS server,....
> If the Ldap server is down, you still have the DNS and Kerberos servers
> running. That means that maintenance operations are possible without
> stopping all the services. Of course, this is only possible if MINA is
> able to handle connexion on different ports (I don't know MINA enough to
> tell). MINA could then be a front-end that dispatch requests to the
> servers, so you don't have to launch an instance of MINA for each
> server. Does it make sense ?

Yes, it makes sense.  But we'll have to consider the latency issues,
too, though latency becomes zero if we use VM pipe.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message