james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Draeger ...@joachim-draeger.de>
Subject Re: IMAP Draft: Cluster
Date Fri, 14 Jul 2006 13:24:08 GMT
Am Montag, den 10.07.2006, 21:05 -0600 schrieb Mike Heath:
> On Mon, 2006-07-10 at 14:57 +0200, Joachim Draeger wrote:
> 
> > > Maybe such idle connections could be handled by a special thread and if 
> > > any real work is starting on a connection, this one is handed over to a 
> > > worker thread?
> > 
> > To allow many idle connections but limit the maximal possible server
> > load, I have the idea of a central scheduler in mind.
> > The scheduler keeps track of all running threads. 
> > If a session thread wants to run an expensive command it has to ask the
> > scheduler first. 
> 
> The thread per connection model simply doesn't scale to the level that
> would be needed for a decent IMAP server.  

Why? There are reasons to limit the maximal number of simultaneously
running threads. But what are the drawbacks of having one thread per
connection?

> Fortunately, this is a
> problem that has already been solved by SEDA [1].  The Apache MINA
> project [2] implements the good ideas of SEDA plus adds a number of
> other good ideas providing a framework that is very easy to learn and
> use.  MINA also performs and scales very well. 

I just begun to read MINA docs to get an overview. How does it work
internally? How does MINA know there is data waiting on a connection?
Is it possible to let Java fire events in a new thread when data has
arrived or are you polling every connection for new data?
I had a fast look to a SEDA doc. Does MINA support prioritization?
E.G.: NOOP is a cheap, LIST or APPEND are expensive commands.
Maybe between ProtocolAcceptor and ProtocolHandler?

Joachim




---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message