directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject Re: [jira] Commented: (DIRMINA-121) Per-port filter chain
Date Thu, 17 Nov 2005 11:51:38 GMT
2005/11/17, Jose Alberto Fernandez <>:
> The alternative today is to create the entire chain on each session, which
> is even more expensive. This is why I have proposed some sort of lazy
> copying of the chain, which means that you only pay the price if you need to
> (if you actually modify your chain on a session). Per-acceptor (if we still
> keep it) and per-port can be added together during port binding (as this is
> a one time of operation).
You're right. It is one specific technique we can apply. Basically it is not
a different point of view but just an optimization.

> The only issue left is that NextFilters are not safe anymore to remember
> for the entire lifecycle of the Filter. I see two possible solutions here:
>  1) Tell people it is not safe to remember and if you do it is at your own
> risk. You can always obtain the NextFilter from the session.
> 2) Add a IoFilter.chainRelocated(NextFilter old, NextFilter new) method to
> be called in the filter in the case of a copy. So any filter that caches
> will be notified of the change and do whatever is necessary.

I don't think both are bad. We'll have to find out the way users can cache
the nextfilter instance.

what we call human nature is actually human habit

View raw message