Re: MINA and ThreadLocals used in other frameworks

2007-04-15 Thread Rob Butler
For improved scalability with Mina almost any time you have logic which may block (like accessing a DB) you should use a worker pool. (There will always be an exceptions to any rule.) This will increase the latency of request/response processing VS a standard thread per connection approach. B

Re: MINA and ThreadLocals used in other frameworks

2007-04-15 Thread Rob Butler
What I meant was, with Spring proxies the ThreadLocal is cleaned up because the worker thread must finish executing the proxy method before it can be returned to the pool. So the ThreadLocal is always cleaned up because the last thing the proxy does is remove from the ThreadLocal that it added

Re: Client-side thread model questions

2007-04-15 Thread Trustin Lee
Hi Sean, On 4/13/07, Sean LeBlanc <[EMAIL PROTECTED]> wrote: Hello, I'm testing out my client-side code by firing off many threads which in turn, call a simulated server. I find that it works okay up until a certain point. Any more than about 60 threads, and I get in trouble - not all messages

Re: JSR-000203 More New I/O APIs for the Java Platform - Early Draft Review

2007-04-15 Thread Trustin Lee
On 4/14/07, peter royal <[EMAIL PROTECTED]> wrote: The JSR that will finally bring multicast to NIO! -pete http://jcp.org/aboutJava/communityprocess/edr/jsr203/index.html Yay! :) Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6

Re: Http client decoder & encoder

2007-04-15 Thread Trustin Lee
Hi Tim, On 4/14/07, Kimmet, Tim <[EMAIL PROTECTED]> wrote: Does Jakarta Commons HttpClient support async i/o? If not, then wouldn't a MINA-based client (that would support async i/o) offer a good advantage because less threads would be required to process each http request? Yes. You might als

Re: non blocking dns and mina based application

2007-04-15 Thread Trustin Lee
Hi Stefano, On 4/15/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote: Hi all, I just found a really interesting companion for mina applications, named dnsjnio[1]. It is a set of utilities built around dnsjava and distributed[2] under the MPL license to reuse 2 single threads for resolving concurre

[jira] Commented: (DIRMINA-350) Heartbeat message sending filter.

2007-04-15 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488997 ] Trustin Lee commented on DIRMINA-350: - We need to check DIRMINA-354, too. > Heartbeat message sending filter. >

Re: MessageDecoder

2007-04-15 Thread Trustin Lee
On 4/16/07, mat <[EMAIL PROTECTED]> wrote: Thanks. My question is if it happens, will mina close the session? No, it won't. MINA closes the connection only when IOException is raised during I/O. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP

Re: MessageDecoder

2007-04-15 Thread mat
Thanks. My question is if it happens, will mina close the session? 2007/4/12, Trustin Lee <[EMAIL PROTECTED]>: On 4/12/07, mat <[EMAIL PROTECTED]> wrote: > Hi, > > If something wrong in the MessageDecoder decodeBody(unexpected exception > happened with no handling by programmer), what will mina

Re: MINA and ThreadLocals used in other frameworks

2007-04-15 Thread hstang
Assuming that you have that kind of logic in IoHandler, wouldn't this affect performance? Normally output to the client is determined after processing some input. So suppose we use a workerpool, like you have mentioned, to do some processing for us (possibly use Spring to get us some data from

Re: MINA and ThreadLocals used in other frameworks

2007-04-15 Thread Urmeli
Hi Rob, I don't think that the HiveMind approach is more complex. You basically call markThreadEntry() before the processing of the business logic starts and need to call markThreadExit() afterwards. You can easily wrap this in an IoFilter (the guy that invented HiveMind and Tapestry actually use

Re: MINA and ThreadLocals used in other frameworks

2007-04-15 Thread Rob Butler
Your making things more complex than they need to be. Spring uses proxy objects for transaction management. The proxy object takes care of adding objects to the ThreadLocal when the proxy method is entered and removing them before the proxy method is exited. If you have your thread pool befor

Re: MINA and ThreadLocals used in other frameworks

2007-04-15 Thread Urmeli
The problem is: how can the frameworks determine the logical end of the thread (the point in time when the thread is returned to the pool). In our project we use HiveMind as the IoC container. HiveMind has the feature to mark the entry and exit of a processing thread and all thread-bound component

[jira] Updated: (DIRMINA-350) Heartbeat message sending filter.

2007-04-15 Thread Mark Webb (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Webb updated DIRMINA-350: -- Attachment: HeartbeatIdleFilter.java Here is a class that will send a message to the remote client whe