On Apr 23, 2007, at 10:51 AM, Brigham Stevens wrote:
Authentication in my app will require a database lookup, and once theIoSession is authorized, I won't need to do that anymore. So to implement this as a filter, would I insert an ExecutorFilter before the Authentication filter to make sure the database work is offloaded to another thread? Whatabout future messages after authentication, they will still be routedthrough these filters, and through the thread too, it seems like it would add latency. I already have an executor filter in place to take care of myIOHandler.
If you already have an ExecutorFilter, don't add another one.You could use the fact that a filter chain is per-session and dynamic. After a session is authenticated, your auth filter could remove itself from the chain. Or just set a flag and have it pass- through.
Also, just out of curiosity, for my main IOHandler if I were to use ChainedIoHandlers instead of IoHandlers, would I add an ExecutorFilter before each one to give each their own thread pool?
Generally a single ExecutorFilter is enough. I'd start with that for now :)
thanks in advance. I'm new to MINA and this list.
welcome! -pete -- [EMAIL PROTECTED] - http://fotap.org/~osi
smime.p7s
Description: S/MIME cryptographic signature
