Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-29 Thread igaz
markt wrote > You may have noticed my responses were littered with comments like "up > to Servlet 3.0 ..." > > The problem you are presenting is easily solved in Servlet 3.1. > > Once you need to read the request body, put the Servlet into Async > mode and then use the new non-blocking IO API add

Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-24 Thread igaz
>You need to read the Javadoc more carefully. I suggest you take a look at java.io.ByteArrayInputStream (both source and javadoc). Perfectly good InputStream (never heard anyone claim otherwise) Never blocks. >While the words "blocking >and "non-blocking" are not used in ServletInputStream blocki

Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-24 Thread igaz
markt wrote >>Take a closer look. ServletInputStream (up to Servlet 3.0) is clearly >>blocking. > > Where in the spec is this? I don't see it. ServletInputStream is not > even mentioned - neither is blocking. ServletInputStream's javadoc also > mentions nothing about it. > Are you talking abo

Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-23 Thread igaz
OK, did a quick check of the servlet spec - and I could find nothing that proscribes the kind of thing I was thinking about (in fact it has nothing to say even about the semantics of using the javax.servlet.ServletInputStream) Here is some pseudocode for what I had in mind (I'm eliding quite a bit

Re: Getting my head around NIO 'simulated' blocking (trying to)

2013-03-23 Thread igaz
Ah, in doing a little bit more thinking I realize there is some unfortunate naivete (OK ignorance) in my original post, so let me clarify. I should not have focussed on *parsing* of the full HTTP Request. Of course that has to be 'deferred' at some level (think SOAP, file uploads, and of course w

Getting my head around NIO 'simulated' blocking (trying to)

2013-03-23 Thread igaz
So I won't bury the lede: what exactly (and why) is Tomcat doing 'simulated' read blocking when using the NIO connector? I've done some due diligence including downloading the latest source (7.0.37) and searching the tomcat mailing lists. Firstly, to make things simpler, let's take comet processi

Re: BIO performance issues

2013-03-20 Thread igaz
Is this thread/issue still *active*? I have a few ideas (and I worked on a similar issue awhile back). But this thread was last active 2 years ago and there was even discussion of deprecating BIO in tomcat 8, so I don't want to waste time on something that is dormant or has been superceded -- V