[Openais] lcr take 6 - going in soon - last chance for comments :)

Steven Dake sdake at mvista.com
Mon Jan 23 11:57:13 PST 2006


On Mon, 2006-01-23 at 14:29 +0000, Patrick Caulfield wrote:
> Steven Dake wrote:
> > On Thu, 2006-01-19 at 13:43 +0000, Patrick Caulfield wrote:
> > 
> >>Steven Dake wrote:
> >>
> >>>Here is take 6 of the LCR code.  It also integrates the beginning of the
> >>>msg service which I'm going to commit in this change as well.
> >>>
> >>>I also made it possible to either choose to build dynamic services or
> >>>not.  I found debugging dynamic services to be a little tricky
> >>>(breakpoints can't be set until the object is loaded into the symbol
> >>>table).  
> >>>
> >>>Simply set BUILD_DYNAMIC to 0 or 1 depending on if you want dynamic
> >>>services or not.
> >>>
> >>>Also, I found dynamic services consume 2x memory after initial startup.
> >>>I think this has something to do with the -bdynamic flag required and
> >>>the PIC rules required.
> >>>
> >>
> >>Superb. I wish I'd being paying attention - I'd started on something like this
> >>so I could make CMAN a dynamically loaded service!
> >>
> >>I just need to find some time to play with it now...
> > 
> > 
> > 
> > Cool
> > The best place to look is in the service handlers themselves to see the
> > interfaces of the expected service handler.  Look for "BUILD_DYNAMIC".
> 
> That looks really nice.
> 
> Is there any chance of making the list of services more dynamic ? Ether
> holding them in a config file or simply scanning the directory for .lcrso
> files and using them all ? having them hard-coded loses some of the benefit of
>  dynamically loaded services I think.
> 
> I can do this if you like :)
> 

Yes I want to do this - just have not got there yet.  What I had
intended is for "uic" to send a message to "uis" to load a service
handler.  uis on startup creates a thread to listen to socket I/Os from
uic.  Then code in the UIS handler would dynamically load the service
handler.

So the command would look something like
"passthrough load service "servicename" and then the interface loader
would try to load the service and instantiate it.

This should work for already running aisexecs.

I don't really want to have to change the lcr code much to achieve these
results so scanning all lcrsos for their interface names doesn't work.
I want to "dynamicize" all of the code, not just the service handlers.
And The intent is that others could use the lcrsos in their own program
designs.  The purpose of the lcr then is to live-replace, not dynamic
loading (we just get that for free:)

Another option you mention which I like is to extract the "dynamic
services" data structure into a configuration file which lists all of
the services and their version numbers that should be loaded at startup.
This would then populate the dynamic services data structure.

If you want to make a patch for that I'd like it :)

regards
-steve




More information about the Openais mailing list