<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Backdrifter &#187; xrds</title>
	<atom:link href="http://www.backdrifter.com/tags/xrds/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.backdrifter.com</link>
	<description>The personal site of Jared Hanson</description>
	<lastBuildDate>Tue, 22 Jun 2010 22:16:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solving XRDS&#8217; Host Problem with XRD and host-meta</title>
		<link>http://www.backdrifter.com/2010/03/13/solving-xrds-host-problem-with-xrd-and-host-meta/</link>
		<comments>http://www.backdrifter.com/2010/03/13/solving-xrds-host-problem-with-xrd-and-host-meta/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 22:03:34 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[eaut]]></category>
		<category><![CDATA[poco]]></category>
		<category><![CDATA[portablecontacts]]></category>
		<category><![CDATA[webfinger]]></category>
		<category><![CDATA[xrd]]></category>
		<category><![CDATA[xrds]]></category>
		<category><![CDATA[yadis]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/?p=190</guid>
		<description><![CDATA[The ongoing efforts to define standard protocols for common web services have resulted in a wide variety of specifications.  If you&#8217;re interested in the Internet&#8217;s plumbing, as I am, these are truly exciting times.  One of the common pieces of functionality needed by all these specifications is discovery.
The most recent, and recommended, format [...]]]></description>
			<content:encoded><![CDATA[<p>The ongoing efforts to define standard protocols for common web services have resulted in a wide variety of specifications.  If you&#8217;re interested in the Internet&#8217;s plumbing, as I am, these are truly exciting times.  One of the common pieces of functionality needed by all these specifications is discovery.</p>
<p>The most recent, and recommended, format for discovery is <a href="http://hueniverse.com/xrd/">XRD</a> (currently at <a href="http://www.oasis-open.org/committees/download.php/36542/xrd-1.0-wd15.html">Working Draft 15</a>).  XRD supersedes the older <a href="http://en.wikipedia.org/wiki/XRDS">XRDS</a> format, which has a convoluted evolution that can be traced in twists and turns through <a href="http://docs.oasis-open.org/xri/xri-resolution/2.0/specs/cs01/xri-resolution-V2.0-cs-01.html">XRI Resolution</a>, <a href="http://yadis.org/">Yadis</a>, and <a href="http://xrds-simple.net/">XRDS-Simple</a>.</p>
<p>These older specifications define both a data format and a resolution protocol.  The resolution protocol suffers a problem, however: it can&#8217;t distinguish between a host and a root-level resource.  A succinct technical statement is provided in <a href="http://hueniverse.com/">Eran Hammer-Lahav</a>&#8217;s <a href="http://tools.ietf.org/html/draft-hammer-hostmeta-05">host-meta</a> draft:</p>
<p><span id="more-190"></span></p>
<blockquote><p>Because there is no URI or a resource available to describe a host,<br />
many of the methods used for associating per-resource metadata (such<br />
as HTTP headers) are not available. This often leads to the<br />
overloading of the root HTTP resource (e.g. &#8216;http://example.com/&#8217;)<br />
with host metadata that is not specific to the root resource (e.g. a<br />
home page or web application), and which often has nothing to do it.</p></blockquote>
<p>Take, for example, <a href="http://jaredhanson.net/">http://jaredhanson.net/</a>, the URL I use to identify myself online.  It has an XRDS document located at: <a href="http://jaredhanson.net/meta.xrds">http://jaredhanson.net/meta.xrds</a></p>
<p><code>&lt;xrds:XRDS xmlns:xrds=&quot;xri://$xrds&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns=&quot;xri://$xrd*($v*2.0)&quot;&gt;<br />
&lt;XRD&gt;<br />
&nbsp;&nbsp;&lt;Service&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;Type&gt;http://portablecontacts.net/spec/1.0&lt;/Type&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;URI&gt;http://www-opensocial.googleusercontent.com/api/people/&lt;/URI&gt;<br />
&nbsp;&nbsp;&lt;/Service&gt;<br />
&nbsp;&nbsp;&lt;Service&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;Type&gt;http://specs.eaut.org/1.0/template&lt;/Type&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;URI&gt;http://jaredhanson.net/&lt;/URI&gt;<br />
&nbsp;&nbsp;&lt;/Service&gt;<br />
&lt;/XRD&gt;<br />
&lt;/xrds:XRDS&gt;</code></p>
<p>Among the services advertised are an address book available via <a href="http://portablecontacts.net/">Portable Contacts</a> and an <a href="http://eaut.org/">EAUT</a>-based email address to URL translation service.  The address book is very specifically associated with me; it is my address book.  The EAUT service, however, is simply a service that is running at the domain jaredhanson.net; it is not associated with me directly.  This case exhibits the conflict between the host and the root-level resource.</p>
<p>The new XRD specification does not define a resolution protocol.  That task is left up to other specifications such as host-meta and <a href="http://tools.ietf.org/html/draft-hammer-discovery-04">LRDD</a>.  host-meta, in particular, addresses this conflict by registering a <a href="http://tools.ietf.org/html/draft-nottingham-site-meta-05">well-known URI</a> for metadata about the host.</p>
<p>Looking again at my digital identity, things have been broken down into two separate documents.  One for information about the host at: <a href="http://jaredhanson.net/.well-known/host-meta">http://jaredhanson.net/.well-known/host-meta</a></p>
<p><code>&lt;XRD xmlns=&quot;http://docs.oasis-open.org/ns/xri/xrd-1.0&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:hm=&quot;http://host-meta.net/xrd/1.0&quot;&gt;<br />
&nbsp;&nbsp;&lt;hm:Host&gt;jaredhanson.net&lt;/hm:Host&gt;<br />
&nbsp;&nbsp;&lt;Link&nbsp;rel=&quot;lrdd&quot;&nbsp;template=&quot;http://jaredhanson.net/meta.xrd?id={uri}&quot;/&gt;<br />
&lt;/XRD&gt;</code></p>
<p>And another for information about me at: <a href="http://jaredhanson.net/meta.xrd">http://jaredhanson.net/meta.xrd</a></p>
<p><code>&lt;XRD xmlns=&quot;http://docs.oasis-open.org/ns/xri/xrd-1.0&quot;&gt;<br />
&nbsp;&nbsp;&lt;Subject&gt;acct:me@jaredhanson.net&lt;/Subject&gt;<br />
&nbsp;&nbsp;&lt;Link&nbsp;rel=&quot;http://portablecontacts.net/spec/1.0&quot;&nbsp;href=&quot;http://www-opensocial.googleusercontent.com/api/people/&quot;/&gt;<br />
&lt;/XRD&gt;</code></p>
<p>Using this schema, my address book remains in the XRD that describes me.  However, <a href="http://code.google.com/p/webfinger/">WebFinger</a> (the modern EAUT equivalent), which utilizes LRDD, moves to the host-meta XRD.  This is a much cleaner approach, which resolves ambiguities about exactly what discovery is being performed on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2010/03/13/solving-xrds-host-problem-with-xrd-and-host-meta/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>People, Services and Content</title>
		<link>http://www.backdrifter.com/2009/05/27/people-services-and-content/</link>
		<comments>http://www.backdrifter.com/2009/05/27/people-services-and-content/#comments</comments>
		<pubDate>Wed, 27 May 2009 16:46:40 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[eaut]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[xrd]]></category>
		<category><![CDATA[xrds]]></category>
		<category><![CDATA[yadis]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/?p=130</guid>
		<description><![CDATA[A couple weeks ago, Marc Canter wrote a entry outlining the constructs of people, services and content.  These are the central pillars around which collaboration software is structured.
Content, as a concept, encompasses a wide area.  It could be a newspaper article, a radio program, a TV show, a spreadsheet or presentation.  Creating [...]]]></description>
			<content:encoded><![CDATA[<p>A couple weeks ago, <a href="http://marc.blogs.it/">Marc Canter</a> wrote a <a href="http://blog.broadbandmechanics.com/2009/05/08/people-services-and-content-the-3-hiways/">entry</a> outlining the constructs of people, services and content.  These are the central pillars around which collaboration software is structured.</p>
<p>Content, as a concept, encompasses a wide area.  It could be a newspaper article, a radio program, a TV show, a spreadsheet or presentation.  Creating and managing content has been one of the primary purposes of computers, ever since they came into existence.</p>
<p>With the rise of the Internet, and particularly social networking, there has been a renewed focus on people and the role they play in a system.  Proper emphasis on individuals and groups makes collaboration more efficient.</p>
<p><span id="more-130"></span></p>
<p>One of the problems surrounding identity in the past has been the lack of a widely adopted standard.  This has made it very difficult to build solutions that are interoperable.  Thankfully, <a href="http://openid.net/">OpenID</a> is gaining traction, along with usability improvements through <a href="http://eaut.org/">EAUT</a> and other initiatives.</p>
<p>Underlying OpenID, the <a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xri">XRD</a> specification, emerging from earlier work on <a href="http://xrds-simple.net/">XRDS-Simple</a> and <a href="http://yadis.org/">Yadis</a>, will tie people and content together through services that allow interaction among the two.</p>
<p>There is a lot of work remaining, but its conceivable at this point to envision a future where signing up for a service is as simple as entering your email address and approving access. When the mesh realizes that level of usability, innovation will both flourish and be self-reinforcing.</p>
<p>Developers would be well advised to pay attention to these standards.  Integrating these technologies will allow software to participate in the larger web-based ecosystem, both deriving and yielding benefits from and to the whole.</p>
<p>As I noted in my <a href="http://blog.broadbandmechanics.com/2009/05/08/people-services-and-content-the-3-hiways/#comment-17802">comment</a>:</p>
<blockquote><p>
The standards are all coming together. In my mind, the flow looks something like this:</p>
<p>1. People become directly addressable (i.e. through email addresses).<br />
2. Programs dereference the email address and get an XRD document, which identifies associated services.<br />
3. Programs interact with the discovered services to publish and subscribe to content.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2009/05/27/people-services-and-content/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>oEmbed FAIL! Represent RESTfully.</title>
		<link>http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/</link>
		<comments>http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/#comments</comments>
		<pubDate>Fri, 09 May 2008 22:12:14 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oembed]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xrds]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/</guid>
		<description><![CDATA[oEmbed is the latest standard to come out of the Web 2.0 developer crowd.  While I&#8217;m typically a huge advocate of standards, and think much of the prior work has been superb, oEmbed fails on almost every level.  So much so, in fact, that I&#8217;m writing this post to declare it worthless, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oembed.com/">oEmbed</a> is the latest standard to <a href="http://www.readwriteweb.com/archives/oembed_open_format.php">come out</a> of the Web 2.0 developer crowd.  While I&#8217;m typically a huge advocate of standards, and think much of the prior work has been superb, oEmbed fails on almost every level.  So much so, in fact, that I&#8217;m writing this post to declare it worthless, and suggest an alternative.</p>
<p>Upon first seeing the spec, I immediately <a href="http://twitter.com/jaredhanson/statuses/807531511">tweeted</a>:</p>
<blockquote><p>
oEmbed completely ignores REST principles. GET with a Content-Type to the original resource. Benefit: a single URL per resource. C&#8217;mon!
</p></blockquote>
<p>Allow me to further explain&#8230;</p>
<p><span id="more-95"></span></p>
<p>To begin with, let&#8217;s dive into the <a href="http://oembed.com/">specification</a>, and take note of the things that immediately raise red flags.</p>
<blockquote><p>
An oEmbed exchange occurs between a consumer and a provider. A consumer wishes to show an embedded representation of a third party resource on their own web site, such as a photo or an embedded video. A provider implements the oEmbed API to allow consumers to fetch that representation.
</p></blockquote>
<p>Hmm&#8230; that sounds suspiciously like an <a href="http://en.wikipedia.org/wiki/HTTP">HTTP</a> GET request.  Why the need to refer to this as &#8220;the oEmbed API&#8221;?!?  Something suspect must be about to go down.</p>
<blockquote><p>
Configuration for oEmbed is very simple. Providers must specify one or more URL scheme and API endpoint pairs. The URL scheme describes which URLs provided by the service may have an embedded representation. The API endpoint describes where the consumer may request representations for those URLs.
</p></blockquote>
<p>Wait&#8230; what?  This oEmbed thing requires two <a href="http://en.wikipedia.org/wiki/URL">URL</a>s to fetch different representations of the same resource?  Have we not learned even the most rudimentary <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a> principles in the past few years?  Here&#8217;s a quick lesson: a single resource can have multiple representations.  One URL, multiple data formats.  Once that is understood, the need for an oEmbed API endpoint drops away entirely.</p>
<p>Even so, let&#8217;s be pragmatic and use oEmbed, since some respectable providers have already implemented support for it. (Which begs further questions, but I&#8217;ll let that slide.)  To start, we need to get the address of the API endpoint.  That mechanism is not specified, so we&#8217;ll have to resort to hardcoding endpoints.  <a href="http://en.wikipedia.org/wiki/XRDS">XRDS</a> could be useful here, but that introduces further complications.  Besides, there is better way.</p>
<p><b>oEmbed with REST to the Rescue!</b></p>
<p>Since the URL to the original resource must be known, and an oEmbed representation is desired, the oEmbed API endpoint is completely unnecessary.  Just request the oEmbed representation from the resource directly.<br />
<code><br />
GET /photos/bees/2362225867/ HTTP/1.1<br />
Host: flickr.com<br />
Accept: application/oembed+xml<br />
</code></p>
<p>Flickr could then respond with our embed-ready resource.<br />
<code><br />
HTTP/1.x 200 OK<br />
Content-Type: application/oembed+xml<br />
&nbsp;<br />
&lt;oembed&gt;<br />
&lt;version&gt;1.0&lt;/version&gt;<br />
&lt;type&gt;photo&lt;/type&gt;<br />
&lt;title&gt;Bacon Lollys&lt;/title&gt;<br />
&lt;author_name&gt;bees&lt;/author_name&gt;<br />
&lt;author_url&gt;http://www.flickr.com/photos/bees/&lt;/author_url&gt;<br />
&lt;cache_age&gt;3600&lt;/cache_age&gt;<br />
&lt;provider_name&gt;Flickr&lt;/provider_name&gt;<br />
&lt;provider_url&gt;http://www.flickr.com/&lt;/provider_url&gt;<br />
&lt;width&gt;500&lt;/width&gt;<br />
&lt;height&gt;375&lt;/height&gt;<br />
&lt;url&gt;http://farm4.static.flickr.com/3040/2362225867_4a87ab8baf.jpg&lt;/url&gt;<br />
&lt;/oembed&gt;<br />
</code></p>
<p>See that! There is absolutely zero requirement for the oEmbed API.  All we need to do is define a couple data formats and the associated <a href="http://en.wikipedia.org/wiki/MIME_type">MIME types</a>.  While there is evidence of duplicative effort, the oEmbed formats look reasonable and have both <a href="http://en.wikipedia.org/wiki/XML">XML</a> and <a href="http://en.wikipedia.org/wiki/JSON">JSON</a> output.  I propose we define them as <code>application/oembed+xml</code> and <code>application/oembed+json</code>.</p>
<p>Error handling is equally trivial.  If support for RESTful oEmbed is not implemented, a standard HTTP <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7">406 Not Acceptable</a> status code would be returned to the client.  The client could then fail over to screen scraping or proprietary APIs as necessary.</p>
<p>I hope I&#8217;ve outlined my case against oEmbed effectively.  If anyone has any questions or concerns, drop a line in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2008/05/09/oembed-fail-represent-restfully/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
