Re: Proposal for the storage API (for discussion only)

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

 



On Fri, Oct 19, 2007 at 09:53:27AM +0100, Richard W.M. Jones wrote:
> Daniel P. Berrange wrote:
> >Using structures in the public API is not in keeping with the rest of
> >the libvirt APIs. We should be using XML for the main metadata description
> >of volumes & pools.
> 
> No, that doesn't make sense.  XML for an API is a hack.  It's hard to 

  I disagree with you. XML is perfectly suitable for descriptions,
especially when you need extendability and you can't control the future range
of extensions. It's not proper for 'runtime' operations, but as a way to
describe complex structures I find it fills its role perfectly.

> use it without requiring an additional external library to parse the 
> XML.

  not an argument, "Security is a hack it requires external libraries
to implement right" , doesn't work :-)

> It's slow.

  For description, one time operation is absolutely not a problem. Plus
libxml2 parses a 20+MBytes/s with current processors.

> It has the facade of maintaining ABI compatibility 
> (because it's "just strings"), but in fact has no guaranteed ABI at all. 

  You can't guarantee proper processing of something you can't describe
in any case. Hard versionning with id in your stuctures can't guarantee
anymore, if the code doesn't handle that version you're out. Actually
with XML you can still extract the part of the structure you understand.
And you can similary put ids labels in the structure allowing to introduce
a radical change like the difference between a Xen or KVM definition.

  I still maintain that using XML for description (domains and network)
was the best approach which allowed to go forward 2 years ago even if most
of what we use now is very different from what was available at the time.

  And in front of the wide variety of storage options, I guess it's still
the best choise to describe how to reach the data you want to access. Once
the attach has been done, sure XML would be a bad format for operations in
most case. But for description, which is what Dan suggested I totally agree
with him.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]