You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Andrew Stitcher <as...@redhat.com> on 2009/01/08 17:13:39 UTC

Some quick notes qbout recent changes in the low level IO code

Steve,

I'm currently adding heartbeat capability into the qpid broker/client.
In order to do that I'm adding functionality to the IO subsystem, in
particular I've added a capability to make a callback "in the context of
an IOHandle". That means that the callback is guaranteed to be run
serialised with all other callbacks for that IOHandle. I have no idea
how to structure this change in the windows code so I added stub code.

This capability should be generally very useful as well so is likely to
be more widely used in the future (it would have been used in the past
if it had been available).

I'm planning to entirely remove the Dispatcher class and roll the Poller
dispatch loop into the Poller class. I note you've implemented
Poller::run now, but have done the opposite to the posix code, if you
move the code itself into Poller and call it from Dispatcher::run then
(I think) everything will carry on working when I replace calls to
Dispatcher::run with calls to Poller::run.

I hope this makes sense, get back to me if not.

Andrew



RE: Some quick notes qbout recent changes in the low level IO code

Posted by Steve Huston <sh...@riverace.com>.
FYI, I completed this moving the dispatcher code from
IocpDispatcher.cpp to IocpPoller.cpp - the IocpDispatcher.cpp code is
no longer needed.

-Steve

> -----Original Message-----
> From: Andrew Stitcher [mailto:astitcher@redhat.com] 
> Sent: Thursday, January 08, 2009 11:14 AM
> To: Steve Huston
> Cc: qpid-dev
> Subject: Some quick notes qbout recent changes in the low 
> level IO code
> 
> 
> Steve,
> 
> I'm currently adding heartbeat capability into the qpid
broker/client.
> In order to do that I'm adding functionality to the IO subsystem, in
> particular I've added a capability to make a callback "in the 
> context of
> an IOHandle". That means that the callback is guaranteed to be run
> serialised with all other callbacks for that IOHandle. I have no
idea
> how to structure this change in the windows code so I added stub
code.
> 
> This capability should be generally very useful as well so is 
> likely to
> be more widely used in the future (it would have been used in the
past
> if it had been available).
> 
> I'm planning to entirely remove the Dispatcher class and roll 
> the Poller
> dispatch loop into the Poller class. I note you've implemented
> Poller::run now, but have done the opposite to the posix code, if
you
> move the code itself into Poller and call it from Dispatcher::run
then
> (I think) everything will carry on working when I replace calls to
> Dispatcher::run with calls to Poller::run.
> 
> I hope this makes sense, get back to me if not.
> 
> Andrew
> 
> 


RE: Some quick notes qbout recent changes in the low level IO code

Posted by Steve Huston <sh...@riverace.com>.
> On Fri, 2009-01-09 at 15:03 -0500, Steve Huston wrote:
> > Ok - is this the RequestCallback addition to AsynchIO?
> 
> Yes, in the posix code it uses DispatchHandle::call() which calls
> Poller::interrupt() to interrupt IO on an IOHandle.

Ok, cool.

On Windows, this will queue a completion to the IO Completion Port;
this will queue the callback to be handled in order, similar to how it
handles requests from the processing thread to issue a write.

-Steve


RE: Some quick notes qbout recent changes in the low level IO code

Posted by Andrew Stitcher <as...@redhat.com>.
On Fri, 2009-01-09 at 15:03 -0500, Steve Huston wrote:
> Ok - is this the RequestCallback addition to AsynchIO?

Yes, in the posix code it uses DispatchHandle::call() which calls
Poller::interrupt() to interrupt IO on an IOHandle.

They all have similar functions at their level of the code.

Andrew




RE: Some quick notes qbout recent changes in the low level IO code

Posted by Steve Huston <sh...@riverace.com>.
Hi Andrew,

> I'm currently adding heartbeat capability into the qpid
broker/client.
> In order to do that I'm adding functionality to the IO subsystem, in
> particular I've added a capability to make a callback "in the 
> context of an IOHandle". That means that the callback is guaranteed
to
> be run serialised with all other callbacks for that IOHandle.

Ok - is this the RequestCallback addition to AsynchIO?

> I have no idea
> how to structure this change in the windows code so I added stub
code.

Ok, thanks for the heads up - I'll check it out and see what to do.

> This capability should be generally very useful as well so is 
> likely to
> be more widely used in the future (it would have been used in the
past
> if it had been available).
> 
> I'm planning to entirely remove the Dispatcher class and roll 
> the Poller
> dispatch loop into the Poller class. I note you've implemented
> Poller::run now, but have done the opposite to the posix code, if
you
> move the code itself into Poller and call it from Dispatcher::run
then
> (I think) everything will carry on working when I replace calls to
> Dispatcher::run with calls to Poller::run.

Ah, that makes sense. I saw the new Poller::run() method, so I just
called the Dispatcher method - I'll copy the Dispatcher code to
IocpPoller today.

> I hope this makes sense, get back to me if not.

Yes... I'll let you know if anything comes up.

Thanks,
-Steve