[Openais] Re: just looked at some of the openais code, have some comments

Chris Friesen cfriesen at nortelnetworks.com
Tue Jul 6 14:41:08 PDT 2004


Steven Dake wrote:

> I committed this patch.  I agree the activate poll design is not
> pretty.  It is possible this can be done with two fd's in a pipe as
> well, that that consumes alot more resources.

A couple more fds isn't really a big deal.  The annoying bit is getting the app 
to monitor the rx one for you, and notifying you when it's readable.

> In one case the activate poll is needed by AMF in the current design, to
> dispatch async messages on the same fd as sync messages are being
> delivered to.

I just had a thought.  What about having the library open a link to the exec 
using a stream socket (the way it happens now), but don't actually use it for 
anything other than application death detection?

We could do all the real messaging over a datagram socket, and give *that* fd to 
the app to monitor.

That would give the following characteristics:
--we still get notified if either end of the stream dies
--the library is able to send messages directly to itself
--the app only monitors one fd per library component
--we use one extra fd per app, which is minimal

Thoughts?

Chris



More information about the Openais mailing list