Jun 29
last.fm does REST API, FAIL
icon1 Niklas | icon2 Tags: , . | icon4 06 29th, 2008| icon3No Comments »

last.fm just launched their brand new API (via Fredrik). Sporting support for both XML-RPC and REST. Now that’s a first sign of warning. And unsurprisingly it turns out that the “REST” API is just another RPC over HTTP incarnation.

For example.:

http://ws.audioscrobbler.com/2.0/?method=artist.getSimilar&api_key=xxx...

If you are accessing a write service, you will need to submit your request as an HTTP POST request. All POST requests should be made to the root url:

http://ws.audioscrobbler.com/2.0/

WTF? Is it really that hard to get REST? To add insult to injury, they even managed to make up their own authentication protocol, despite, you know, OpenID and OAuth being fairly mainstream these days.

Mar 18
REST inevitably complex?
icon1 Niklas | icon2 Tags: , , . | icon4 03 18th, 2008| icon3No Comments »

Turned out I had to cancel my trip to QCon London due to a customer engagement. Too bad as the conference seems to have been as good as the previous QCons. Oh well, there will probably be more. For my colleges at the conference, their most discussed topic seems to have been the REST track, something that makes me very happy.

My colleague Johan blogged on the inevitable increase in complexity in technologies as they become established. While I agree that REST will likely also see this type of development, I have some hopes for it not being as bad as for the WS-* cycle. For one, I don’t see the curve that Johan shows as having a constant amplitude but rather having an asymptotic curve.

For example, I think WS-* got some things right where CORBA went wrong (text based protocol, (mis)use an established protocol). This type of curve will never actually reach the golden middle way, but at least we’re getting closer. Will we be hyping some new technology-de-jour beyond REST? Sure.

Also, some (like me) would claim that REST builds on a stronger foundation then CORBA and WS-* do, and therefore will have an easier time growing to fulfill a greater set of requirements. In addition, REST did not come out the enterprisey dungeons of IBM and friends but rather from a pragmatic community and one quite wise man. Hopefully, this community can continue to foster REST and limit the inevitable complexity. For example, I don’t see REST repeating mistakes as worship transport independence (while only embracing HTTP anyways), XML level encryption or distributed transactions.