[occi-wg] confusion about status of link / headers

Sam Johnston samj at samj.net
Mon Oct 19 18:21:23 CDT 2009

On Tue, Oct 20, 2009 at 12:57 AM, gary mazzaferro
<garymazzaferro at gmail.com>wrote:

The http header and key/value pairs need to parsed also, there is no free
> ride here.

Every HTTP library I have ever used parses HTTP headers and puts them in a
nice hash for you ready to consume. If we go for "Name: Value" then that's
all there is to it. If we go for "Attribute: name=value" as is currently
proposed (which is arguably cleaner, follows cookies' "prior art" and avoids
Amazon's prefix hack) then you just have to split on '='.

To illustrate how clean this is by example:

> import urllib2
> response = urllib2.urlopen('http://cloud.example.com/myvm')
> representation = response.read()
> metadata = response.info()
> print metadata['occi-compute-cores']

As soon as you start talking about payloads you have to fire up a parser
(JSON/XML/Atom/etc.) or write your own (previous text rendering) which is *
significantly* more work to do at both design and run times. Not to mention
more work for us to do now and more scope for interoperability problems.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/occi-wg/attachments/20091020/6605c320/attachment.html 

More information about the occi-wg mailing list