On Nov 21, 2007 8:11 PM, Luis Neves <[EMAIL PROTECTED]> wrote:
> Trustin Lee wrote:
> > Hi folks,
> >
> > I've just added a very interesting feature, which overlaps with
> > org.apache.mina.filter.traffic.  The difference if that it attaches to
> > the new ThreadPoolExecutors - OrderedThreadPoolExecutor and
> > UnorderedThreadPoolExecutor.  You can specify an IoEventQueueHandler
> > in the constructor.  IoEventQueueHandler provides some hook methods
> > for vetoing the event from getting into the queue and monitoring flow
> > of events.  IoEventQueueThrottle is the first implementation of
> > IoEventQueueHandler.  It is much simpler than
> > org.apache.mina.filter.traffic classes because it interacts
> > ThreadPoolExecutors directly.  Please take a look into the source
> > code:
> >
> > http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/executor/IoEventQueueThrottle.java?view=markup
> >
> > As you can see from the source code, it doesn't use IoSession traffic
> > mask operation; it just blocks on Executor.execute() and unblocks on
> > notification.  Trade-off of this simplicity is that there's no various
> > scope type in threshold value, in contrast to ReadThrottleFilter.  It
> > will be more efficient and won't burden call stack depth at all
> > instead, while fulfilling most people's demand.
>
> Looking at this again... for some reason IoEventQueueThrottle does not seem to
> help in the case of writes, I can easily crash the server with OOM errors by
> writing to fast.

Right.  It doesn't help fast write because it doesn't monitor the
write request queue.

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

Reply via email to