directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Cruise <a...@cluonflux.com>
Subject Re: [MINA] Error on StreamIOHandler
Date Mon, 28 Nov 2005 19:13:56 GMT
Trustin Lee wrote:

> Are you saying that it would be great if you can switch the mode 
> (semi-synchronous stream I/O and original MINA way)?  If so, this is a 
> wonderful idea.

That is exactly what I'd *like* to do, but I lack sufficient depth in 
asynchronous architecture to know whether it's feasible.  I was hoping 
for some opinions. :)

BTW, it's conventional wisdom that apart from handling keepalives 
efficiently, asynchronous I/O isn't strongly beneficial for Java servlet 
systems, since each thread is either 100% busy doing "servlet business" 
or 100% idle in the pool.

However, I think there are several "waity" areas that would benefit from 
async.  You shouldn't have to block a thread waiting for a slow backend 
in a proxy-like system, or when you're waiting for an authentication 
response from a heavily loaded LDAP server.  It probably makes sense for 
slow clients.  It might even make sense to implement semi-sync database 
drivers someday! :)

In the long run, I'd like to employ a heuristic approach that would 
switch, based on observed latency, back and forth between blocking and 
non-blocking I/O on each connection (e.g. go async when latency is > 
100ms?).   I like how MINA's modular architecture makes it fairly easy 
to experiment with different approaches.  I hope it won't add too much 
latency. :)

-0xe1a

-- 
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.


Mime
View raw message