<?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>kill the radio &#187; rpc</title>
	<atom:link href="http://blog.killtheradio.net/tag/rpc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.killtheradio.net</link>
	<description>or die trying</description>
	<lastBuildDate>Tue, 17 Aug 2010 23:37:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Revisited: REST vs RPC</title>
		<link>http://blog.killtheradio.net/technology/revisited-rest-vs-rpc/</link>
		<comments>http://blog.killtheradio.net/technology/revisited-rest-vs-rpc/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 00:52:42 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rpc]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=321</guid>
		<description><![CDATA[This is a response to a previous post I made about how HTTP authentication is the reason why I&#8217;m not building a REST API. After doing a bit more research, I&#8217;ve decided that REST is many times better than RPC. Reviewing a lot more information on REST revealed that HTTP authentication is not at all [...]]]></description>
			<content:encoded><![CDATA[<p>This is a response to a <a href="http://blog.killtheradio.net/technology/rest-vs-rpc-and-why-authentication-is-the-deciding-factor/">previous post I made</a> about how HTTP authentication is the reason why I&#8217;m not building a REST API. After doing a bit more research, I&#8217;ve decided that REST is many times better than RPC. Reviewing a lot more information on REST revealed that HTTP authentication is not at all required&#8230;but instead a suggested method of authentication only because it&#8217;s already built. In fact, any authentication scheme could be cooked up and used. I&#8217;ve currently got my eye on OAuth.</p>
<p>That being said, our internal framework is now being updated to support routing different requests to different controllers/actions based on the request method. For instance, I can now route a &#8220;POST /events&#8221; to /events/add_event, or &#8220;GET /events&#8221; to /events/get_events. That just about seals the deal on RESTifying the framework, except that I&#8217;ll also have to come up with a scheme to implement status headers in the response, either automatically or semi-manually.</p>
<p>There will be no need to do a sort-of REST implementation on the www site. All information needed can be gathered through the API. Gnar, duude.</p>
<p>In conclusion, I&#8217;ve decided to go with REST after all. It&#8217;s a great architecture, and the best part is that it&#8217;s already built for me. Wicked.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/revisited-rest-vs-rpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST vs RPC (and why authentication is the deciding factor)</title>
		<link>http://blog.killtheradio.net/technology/rest-vs-rpc-and-why-authentication-is-the-deciding-factor/</link>
		<comments>http://blog.killtheradio.net/technology/rest-vs-rpc-and-why-authentication-is-the-deciding-factor/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 00:15:20 +0000</pubDate>
		<dc:creator>Andrew Lyon</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rpc]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://blog.killtheradio.net/?p=313</guid>
		<description><![CDATA[So I&#8217;ve been in the process of converting beeets.com, which is currently a &#8220;website&#8221; with integrated back-end code, to a front-end with a back-end API. It&#8217;s been an interesting journey, and has spawned a lot of thought recently about how to implement the API. Obviously, whenever someone says web API, REST is the first this [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been in the process of converting beeets.com, which is currently a &#8220;website&#8221; with integrated back-end code, to a front-end with a back-end API. It&#8217;s been an interesting journey, and has spawned a lot of thought recently about how to implement the API.</p>
<p>Obviously, whenever someone says web API, REST is the first this that comes to mind. &#8220;Let&#8217;s make it a REST API!&#8221; From what I&#8217;ve been reading about REST (I tend not to use terminology without knowing what the hell it means) many &#8220;REST&#8221; services aren&#8217;t very RESTful (<a rel="nofollow" href="http://tomayko.com/writings/rest-to-my-wife" target="_blank">&#8220;How I Explained REST to My Wife&#8221;</a> &#8211; great intro to REST). In fact, the way I&#8217;ve implemented the beeets API happens to be closer to RPC. After doing my fair share of research, I&#8217;m ok with this.</p>
<p>REST seems like an excellent architecture. In fact, one of the world&#8217;s largest global networks is built on that architecture. It works well for what it does&#8230;but what the hell does it do? From what I&#8217;ve been reading, it gives &#8220;resources&#8221; (pieces of information) a single location to be accessed/updated/created/deleted. At least this is how it works on the web.</p>
<p>RPC is basically a function or method that runs on a remote machine that can be called by a local machine, completely transparent to the local code. Most RPC implementations work on their own conventions, separately from the beautiful architecture which is REST&#8230;what is otherwise known as reinventing the wheel.</p>
<p>So why am I okay with using RPC in the beeets API? The main reason is that RESTful authentication is total junk. It&#8217;s great for server-server communication, but NOT so great for user interactions. Users are used to seeing pretty login boxes with &#8220;forgot your password? reset it, moron!&#8221; or &#8220;create an account!&#8221; links. Popping up an HTTP login screen is not cool. It&#8217;s <span style="text-decoration: underline;">not cool</span>. This is my main problem with REST.</p>
<p>That being said, if you cannot authenticate REST, then using the built-in methods POST, PUT, DELETE are more or less worthless, unless you have a <em>completely</em> public set of information that anybody can add to, change, or remove&#8230;in which case, REST would kick ass.</p>
<p>In light of REST lacking in this area, I think the following makes sense. Create an RPC API that authenticated servers can call to get/create/update/delete information. IPhones, Facebook apps, etc can use this RPC for interacting with the actual dataset. Then on the www front-end, create a REST system that only implements GET.</p>
<p>So I could go to beeets.com/events/123-native-american-slaughter-celebration and get an HTML page with links I can click, an awesome layout, etc. I could go to beeets.com/events/123-native-american-slaughter-celebration.json and get a JSON representation of that event, with URLs to other pages which could be JSON-encoded if need be.</p>
<p>In other words, create a read-only RESTful service on top of the www site, and use an RPC for create/update/delete interactions with the dataset. The already-public information is freely accessibly, without any sort of authentication, so any person or system that cares to consume it can do so. This way you&#8217;re still mapping a resource to a location, and providing multiple consumption formats for said resource.</p>
<p>If there is any other way to authenticate users against a RESTful system without an HTTP login, and while being able to control the actual login/registration flow and layout, PLEASE let me know!</p>
<p>UPDATE: <a href="http://blog.killtheradio.net/technology/revisited-rest-vs-rpc/">please read my followup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.killtheradio.net/technology/rest-vs-rpc-and-why-authentication-is-the-deciding-factor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
