
Hi guys, Sorry I missed the call. Had to be on the AMQP weekly call... I've just got an update from Sam by phone. It sounds like we continue to make progress! We had a chat about the formats thing and realised that a good position might be to disallow any XML use that cannot easily be expressed in JSON. This would allow JSON to be used - good news for "being very simple and clear" and good news for JSON scenarios (eg browser) and many sections of the dev community who like JSON. At the same time it would allow environments with poor support for JSON, such as .NET, to put angle brackets around things as needed ;-) Any thoughts on this? alexis On Wed, May 6, 2009 at 5:32 PM, Richard Davies <richard.davies@elastichosts.com> wrote:
Following up the topic of attributes on links after the discussion on our call:
The original example was:
<link href="urn:uuid:4cc8cf62-69a4-4650-9e8c-7d4c516884df" rel="http://purl.org/occi/storage#device" title="Hard Drive"/>
And as I said before, we also need a device identifier at which to connect the storage, making it something like:
<link type="ide:0:0" href="urn:uuid:4cc8cf62-69a4-4650-9e8c-7d4c516884df" rel="http://purl.org/occi/storage#device" title="Hard Drive"/>
which mapped to JSON as:
"link":[ { "type":"ide:0:0" "rel":"http://purl.org/occi/storage#device", "href":"urn:uuid:4cc8cf62-69a4-4650-9e8c-7d4c516884df", "title":"Hard Drive" } ]
I still believe that the "link" here is a figment of conversion from the Atom XML format. To write this in something more like native JSON, I'd go with:
"ide:0:0": { "href":"urn:uuid:4cc8cf62-69a4-4650-9e8c-7d4c516884df", "title":"Hard Drive" }
since the device identifier is unique for the VM, and clearly specifies this as a place where storage is being attached.
In text format, I'd flatten this data structure as:
ide:0:0|href|4cc8cf62-69a4-4650-9e8c-7d4c516884df ide:0:0|title|Hard Drive
or even just:
ide:0:0|4cc8cf62-69a4-4650-9e8c-7d4c516884df ide:0:0|title|Hard Drive
Rather than the original:
link|ide:0:0|http://purl.org/occi/storage#device|Hard Drive|urn:uuid:4cc8cf62-69a4-4650-9e8c-7d4c516884df
This is rather cleaner in terms of not having to know what all the possible attributes might be, and where they appear in the |-deliminated list.
Cheers,
Richard. _______________________________________________ occi-wg mailing list occi-wg@ogf.org http://www.ogf.org/mailman/listinfo/occi-wg