[Ovirt-devel] [Matahari] [PATCH matahari] Introduces a multiplexer for taking requests and mapping them to APIs.

Andrew Beekhof abeekhof at redhat.com
Mon May 31 08:58:51 UTC 2010


On May 28, 2010, at 5:41 PM, Darryl L. Pierce wrote:

> On Fri, May 28, 2010 at 11:24:46AM +0200, Andrew Beekhof wrote:
>>> const char* function(const char *);
>> 
>> Not sure about this method signature.
>> It would mean each function has to do its own packing and unpacking which might lead to excessive duplication.
>> It would also cause problems for API calls like "get the paste buffer" which could easily contain images (and thus zero'd bytes which would confuse strlen()).
> 
> Yeah, I was trying to keep things simple. Perhaps better would be to
> pass around just a void * and let each API know for itself what to
> extract. My main goal there was just to avoid having the Multiplexer dig
> into the XML and try to map values and types to specific method
> arguments.

It should at least parse the string into an xmlNode/xmlDoc for the API call to work with it easily.
So I'd not be passing around void*.

> 
>> Since the input is xml, perhaps xmlNodePtr is a better I/O vector.
>> 
>> Other than that, the patch is fine.
>> I'd go ahead and commit it and we can continue discussing the method signature.
> 
> Agreed.
> 
> This is pushed now.
> 
> -- 
> Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
> Delivering value year after year.
> Red Hat ranks #1 in value among software vendors.
> http://www.redhat.com/promo/vendor/
> 





More information about the ovirt-devel mailing list