Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-25 Thread Yann Simon
2014-03-25 17:25 GMT+01:00 Caldarale, Charles R : >> From: Yann Simon [mailto:yann.simon...@gmail.com] >> Subject: Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with >> ReadListener > >> > Also, have you tried with the 8.0.5 release that is up for vote?

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-25 Thread Yann Simon
2014-03-25 16:36 GMT+01:00 Daniel Mikusa : > On Mar 25, 2014, at 11:25 AM, Yann Simon wrote: > >> 2014-03-20 15:28 GMT+01:00 Yann Simon : >>> Thanks for all your input, I think I have now an implementation that >>> works on Tomcat and Jetty. >>> >>>

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-25 Thread Yann Simon
2014-03-20 15:28 GMT+01:00 Yann Simon : > Thanks for all your input, I think I have now an implementation that > works on Tomcat and Jetty. > > By testing it, I've found something that can be an interesting > information for you. > > The upload variant with forking a ne

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-20 Thread Yann Simon
heers, Yann 2014-03-20 9:36 GMT+01:00 Yann Simon : > One option I am trying is to ignore onAllDataRead and to use > sevletInputStream.isFinished to know when the body is totally > consumed: > > https://github.com/yanns/servlet31_async/blob/master/src/main/java/com/yann/ReadListenerImpl.

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-20 Thread Yann Simon
One option I am trying is to ignore onAllDataRead and to use sevletInputStream.isFinished to know when the body is totally consumed: https://github.com/yanns/servlet31_async/blob/master/src/main/java/com/yann/ReadListenerImpl.java#L55 Is it a dumb idea? 2014-03-20 7:42 GMT+01:00 Yann Simon

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-19 Thread Yann Simon
Thanks Rémy and Mark for the quick feedback and explanations! On Mar 19, 2014 6:40 PM, "Mark Thomas" wrote: > On 19/03/2014 17:04, Rémy Maucherat wrote: > > 2014-03-19 17:47 GMT+01:00 Yann Simon : > > > >>> This is because you're forking a thread, it

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-19 Thread Yann Simon
2014-03-19 17:24 GMT+01:00 Rémy Maucherat : > 2014-03-19 17:10 GMT+01:00 Yann Simon : > >> 2014-03-19 17:05 GMT+01:00 Rémy Maucherat : >> > 2014-03-19 16:36 GMT+01:00 Yann Simon : >> > >> >> I have maybe found another problem: >> >> onAllD

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-19 Thread Yann Simon
2014-03-19 17:05 GMT+01:00 Rémy Maucherat : > 2014-03-19 16:36 GMT+01:00 Yann Simon : > >> I have maybe found another problem: >> onAllDataRead is called with the same thread that is calling input.read. >> > > I am not aware of any requirement that says this is not a

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-19 Thread Yann Simon
2014-03-19 16:42 GMT+01:00 Mark Thomas : > On 19/03/2014 15:36, Yann Simon wrote: >> Hi, >> >> I have maybe found another problem: >> onAllDataRead is called with the same thread that is calling input.read. >> >> I updated the sample to show the problem: >

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-03-19 Thread Yann Simon
mpl: onDataAvailable [Thread 26] onDataAvailable end [Thread 27] onAllDataRead [Thread 27] read till now: 234 (onAllDataRead is called defore "read till now" with the same thread) Can you check that? Thanks! Yann 2014-02-01 15:13 GMT+01:00 Yann Simon : > > On Jan 31, 2014 7:36 PM,

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-02-01 Thread Yann Simon
On Jan 31, 2014 7:36 PM, "Mark Thomas" wrote: > > On 31/01/2014 11:52, Yann Simon wrote: > > On Jan 31, 2014 10:25 AM, "Mark Thomas" wrote: > >> > >> On 31/01/2014 07:58, Yann Simon wrote: > >>>>>> On Jan 30, 2014, at 11:18 A

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-31 Thread Yann Simon
On Jan 31, 2014 10:25 AM, "Mark Thomas" wrote: > > On 31/01/2014 07:58, Yann Simon wrote: > >>>> On Jan 30, 2014, at 11:18 AM, Yann Simon > > > Jetty seems to allow this. Why not tomcat? Is there something in the > > specification about it. I could n

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-30 Thread Yann Simon
On Jan 30, 2014 11:02 PM, "Daniel Mikusa" wrote: > > On Jan 30, 2014, at 3:38 PM, Yann Simon wrote: > > > 2014-01-30 Daniel Mikusa : > >> On Jan 30, 2014, at 11:18 AM, Yann Simon wrote: > >> > >>> Hi, > >>> > >>>

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-30 Thread Yann Simon
2014-01-30 Daniel Mikusa : > On Jan 30, 2014, at 11:18 AM, Yann Simon wrote: > >> Hi, >> >> I wrote a sample app to demonstrate the problem: >> https://github.com/yanns/servlet31_async >> >> You can generate an exploded war with maven: mvn war:explod

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-30 Thread Yann Simon
2014-01-30 Rémy Maucherat : > 2014-01-30 Yann Simon : > >> Hi, >> >> I wrote a sample app to demonstrate the problem: >> https://github.com/yanns/servlet31_async >> >> You can generate an exploded war with maven: mvn war:exploded >> I deployed t

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-30 Thread Yann Simon
work. https://github.com/yanns/servlet31_async/blob/master/src/main/java/com/yann/ReadListenerImpl.java#L22 The "onDataAvailable" is called only one time. With jetty, it does work (mvn jetty:run) I hope this can help. Yann 2014-01-08 Yann Simon : > 2014/1/8 Daniel Mikusa : >>

Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-08 Thread Yann Simon
2014/1/8 Daniel Mikusa : > On Jan 8, 2014, at 12:04 PM, Yann Simon wrote: > >> Hi, >> >> I am trying to write a servlet that asynchronously read data from the >> servlet request input stream. >> I tested my servlet with tomcat 8.0.0-RC5. > > If possible,

Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener

2014-01-08 Thread Yann Simon
Hi, I am trying to write a servlet that asynchronously read data from the servlet request input stream. I tested my servlet with tomcat 8.0.0-RC5. the symptoms: - I must synchronously read the input stream in onDataAvailable() so that the upload works what I expected: I want to be more "reactive