directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject [mina] Filter priority
Date Mon, 07 Feb 2005 04:19:14 GMT
Hi,

I modified the internal algorithm which manages filters, and now the
range of filter priority is limited from 0 to 99.  The new algorithm
stores filter entries in an array, and thus evaluating all filters in
the chain will iterate the internal array 100 times every time an
event is fired.  I'm not sure this will be a performance hit.  WDYT?

And, I think the priority range 0~99 is really big.  We'll usually add
not more than 3~5 filters IMHO.  So we need to decide a proper value. 
How about 0~9?  Please note that the priority numbers cannot be
duplicate because the evaluation order gets ambiguous.

The thread-safety issue still exists for the filters which filters
both dataRead(or messageReceived) and Session.write(...) like SSL
filters when the session traffic is high; read data is decrpyted but
written data is not encrypted.  Of course there should be some
negotiation mechanism in user application to prevent this situation.

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

Mime
View raw message