james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Spooler improperly waking threads
Date Wed, 07 May 2003 21:33:30 GMT
> This is rough, but say you had WAIT_LIMIT set to 60 seconds, but had 10
> threads.  Then if evenly distributed, you would have be checking for
> pending messages every 6 seconds.

> So I would say generally you want WAIT_LIMIT = LOAD_TIME_MINIMUM * #

Except that this really isn't a polling algorithm.  The threads wait for a
max of 60 seconds, but the notify() call would wake one of them to do work,
whenever a message arrives.  How does that change your reasoning?

What we don't get is a lot of parallel processing if the message load is
very light.  I don't see that as particularly problematic, although I expect
that we'll address it in the v3 spooler.

What I have in mind is that in v2 we have multiple worker threads in
JamesSpoolManager all reading the queue.  It would be cleaner for v3 to have
a spooler thread that then dispatched messages to worker threads.  That
allows cleaner synchronization, and follows the same model that NIO, JSR 166
and util.concurrent promote.

	--- Noel

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

View raw message