users@grizzly.java.net

Regarding strategy of reading in separate thread with temp selector

From: Panda, Archanaa IN GGN SISL <Archanaa.Panda_at_Siemens.com>
Date: Mon, 20 Apr 2009 12:22:53 +0530

Hello,

This is with reference to the blog entry http://weblogs.java.net/blog/jfarcand/archive/2006/07/tricks_and_tips_4.html which elaborates a design of reading for bytes of a logical request packet in the context of a read thread pool with a temporary selector drawn from a pool of ready to use Selectors.

I have just downloaded and gone through the latest code release 1.9.14. For the server side, I find that reading is being done in the context of a thread pool but if I am not wrong, there is no longer any select(readTimeout) for this read. Rather, I think that if the bytes for one logical request has not been accumulated, the readPostProcessor accumulates the incomplete portion in memory and returns immediately unlike the design elaborated above.
I see that the above design is being used in the client side TCPConnectorHandler only, using InputReader, but not in the server side. Please correct me if I am wrong and point me to the right code.
However, if my analysis is correct, I would be interested in knowing whether there has been any design change and the motivation behind it.

Thanks and Regards,
Archanaa Panda

________________________________
Important notice: This e-mail and any attachment there to contains corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system.
Thank You.