Hi... May be I think I misunderstand something about the thread model...can someone help/ point out what is wrong?
I have written a simple client-server pair to try. the server has a codec and threadpool filter in its IoFilterChain. The POJO sent from client just contains an ID and a number indicate sleep time. The server decode the POJO and the decoding thread sleep the specified time in the POJO. The POJO ID and thread ID are both printed. In the ProtocolHandler's messageReceived method, sleep is called again to pause for specified time in POJO, and POJO ID and thread ID are also printed. After that I tried some different configuration, varying the below parameters: 1. acceptor = new NioSocketAcceptor(x); x = 1, or Runtime.getRuntime().availableProcessors() + 1, as suggested in tutorial. 2. the insert order of codec filter and an UnorderedThreadPoolExecutor filter to the IoFilterChain. Client send request with ID 1-100 and sleepTime 100-1ms in sequence. >From the output, it seems that: a. point 1 doesn't affect the output. b. for point 2, the order doesn't affect the output of the decoder. The output of decoder is always the same as the order received. c. UnorderedThreadPoolExecutor do make the messageReceived executed not in sequence Thanks for the patient to reach here... I want to ask what component/layer (or more detail, function call) these two thread pool models will take effect on, in the MINA framework? Any help will be appreciated. Thanks, Benny bennyzlm wrote: > > > Hi, > > I am new to MINA and currently I am trying the MINA thread pools. > according to the tutorial, there are two thread pool can be configured, > the I/O worker threads and the IoFilterChain. For I/O worker threads, my > understanding is that a server app may has several I/O worker threads, to > do I/O processing for different connections. But for a client app, as I > suppose there will be only one connection to the server side, will > multiple I/O threads help to improve the performance? > > Thanks, > Benny > > _________________________________________________________________ > 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜! > http://im.live.cn/emoticons/?ID=18 > -- View this message in context: http://www.nabble.com/MINA-I-O-processor-thread-pool-question-tp17795943p17819819.html Sent from the Apache MINA User Forum mailing list archive at Nabble.com.
