hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Closing the persisted server connections on IOReactor pause
Date Sun, 25 Apr 2010 19:12:45 GMT
On Sun, 2010-04-25 at 22:00 +0530, Ruwan Linton wrote:
> Hi Oleg,
> 
> Thanks a lot, I have got it fixed.
> 

Hi Ruwan

I am glad I was of some help

> Moving forward, do you think that this can be incooperated with the
> IOReactor#pause??

Ideally I/O reactors should remain protocol agnostic. They should deal
with I/O sessions, not with HTTP connections. Connection management
should be the responsibility of protocol handlers. 

> 
> Why I am saying this is, IOReactor#pause should make sure that the server is
> not accepting any more messages, right? but if you have keep-alive turned
> on, those persisted connections will be used by the clients to continue
> sending messages, since the IOReactor#pause doesn't close the persisted
> connections.
> 
> WDYT?
> 

It was a conscious decision to provide only very basic protocol handlers
out of the box in HttpCore, primarily to not be seen as competition to
other Apache projects. This probably is no longer relevant. So, If
anyone would be willing to work on improving protocol handlers in
HttpCore, I could happily offer my assistance. 

However, a better approach might be building an embeddable mini HTTP
server based on HttpCore with proper connection/thread management and
keep HttpCore what it is, just core. 

Cheers

Oleg

> BTW: really appreciate your help in getting this resolved.
> 
> Thanks,
> Ruwan
> 
> On Thu, Apr 22, 2010 at 5:59 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> 
> > On Thu, 2010-04-22 at 16:10 +0530, Ruwan Linton wrote:
> > > Oleg,
> > >
> > > I wrote the code, expecting that the IOControl#requestOutput will be
> > calling
> > > the NhttpServiceHandler#outputReady method or the
> > > NhttpServiceHandler#responseReady method, but non of those get called?
> > >
> > > Do you have any clue or is it a different method that I should be
> > expected
> > > be calling by the IOReactor??
> > >
> >
> >
> > NhttpServiceHandler#responseReady event should fire in response to the
> > IOControl#requestOutput. Synapse trunk has extensive logging support for
> > HTTP wire and context logging. Try turning it on to get more details on
> > what is happening inside the NHTTP transport.
> >
> > Oleg
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> >
> >
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message