[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] libosinfo - implemented.



On Wed, Jan 27, 2010 at 10:54:07PM -0500, Arjun Roy wrote:
> Hi all,
> 
> Back in October I posted some thoughts on a library for dealing with OS metadata
> used by the various virt applications.
> 
> As a refresher, here it is:
> https://www.redhat.com/archives/virt-tools-list/2009-October/msg00091.html
> 
> After a few emails back and forth, I revised the proposed API to :
> https://www.redhat.com/archives/virt-tools-list/2009-October/msg00162.html
> 
> I have no implemented the API, mostly as described in the second email, and have
> it hosted at the following location:
> https://fedorahosted.org/libosinfo
> 
> I feel that with a little integration work, this would be very useful for any of
> the virt management applications in use, and would like to hear any comments on
> the implementation.
> 
> The implementation as is works on the test cases provided, and going forward
> would need the following things:
> 
> 1. Generate the actual backing data that virt applications use in the appropriate
> format
> 2. Determine how best to integrate it with existing virt apps like virtinst
> 
> The library right now is functionality complete in that all the methods advertised work,
> and there is a sample 'dummy' data file that the tests run against. However, the required
> plumbing work (actually installing the headers and *.so file to where it needs to go) has
> not been done yet, though that's easy to do when necessary.

I've only had a quick look at the API / code so far, but my first impression
is that the API would majorly benefit by being ported to use GLib / GObject
rather than being built from scratch. In particular this would let you use
a good object system, which your code is clearly trying to achieve. The use
of the structure list / hash table data types & error reporting in GLib would
also bring benefits to this.  Finally, perhaps the most compelling reason is
that with GObject Introspection, we will get the ability to access libosinfo
from multiple other languages for free, without needing to hand write or 
auto generate any extra code.  The only minor downside is the OOM handling
in GLib, but for the scenarios in which libosinfo is to be used I don't
think that this is a problem worth worrying about & is easily outweighed by
the advantages.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]