BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News RPC or REST in the Cloud?

RPC or REST in the Cloud?

This item in japanese

Bookmarks

In a previous article we discussed William Vambenepe's question of whether or not REST is really important for the Cloud when the front runner in that area does not use it? After our posting William had further feedback, which promoted him to try to clarify further as others continued to ignore, or not see, the central idea running through his original entry: that for developers, separated from the underlying interaction mechanism by language constructs such as objects or RPC, whether or not that approach is implemented using REST is likely to be immaterial. As William states:

Method calls is how normal developers write normal code. Doing it over the wire is the smallest change needed to invoke a remote API. The complexity with RPC has never been conceptual, it’s been in the plumbing. How do I serialize my method call and send it over? CORBA, RMI and SOAP tried to address that, none of them fully succeeded in keeping it simple and yet generic enough for the Internet. XML-RPC somehow (and unfortunately) got passed over in the process.

As he points out, AWS uses an approach that is very similar to XML-RPC. They made some trade-offs in their approach, but in general Amazon took a very pragmatic point-of-view and ended up with something that is conceptually simple and yet powerful (and usable). However, it seems that many people still disagree, such as Mike Pearce, who states that ...

I know I’m a RESTafarian (so coined for people who have an unhealthy enjoyment of REST), but really, Amazon haven’t proven anything, other than being arrogant and disrespecting developers.

In William's recent posting he attempts to address all of Mike's concerns. For instance, when Mike asks the question:

Does the fact that AWS use their own implementation of an API instead of a standard like, oh, I don’t know, REST, frustrate developers who really don’t want to have to learn another method of communicating with AWS?

To which Mike responds in the affirmative, but which promts William to counter with ...

I scratch my head. I’ve met many developers struggling to understand REST. I’ve never met a developer intimidated by RPC. As to the claim that REST is a “standard”, I’d like to read the spec. Please don’t point me to a PhD dissertation.

According to William, the point isn't whether or not REST is important for the evolution of the Cloud, but really whether the Cloud has evolved to a point where it is necessary or would make a substantial difference (to developers or implementers). In William's view, the benefits of REST in a single vendor offering, are likely to be limited.

The usage patterns for Cloud APIs may evolve to the point where the benefits of following the rules of REST become compelling. I just don’t think we’re there and frankly I am not holding my breath. There are lots of functional improvements needed in Cloud services before the burning issue becomes one of orchestrating between Cloud providers. And while a shared RESTful API would be the easiest to orchestrate, a shared RPC API will still be very reasonably manageable. The issue will mostly be one of shared semantics more than protocol.

There are also disagreements about William's premise that the use of REST is hidden behind programmatic interfaces so does it really matter at that level anyway? But as one commenter on his original article states:

The vast majority of AWS (or any cloud provider’s) users never see the API. They interact through language libraries or via web-based client apps. So, the only people who really care are RESTafarians, and library developers (like me). Perhaps it’s possible to have an API that’s so bad it prevents people from using it but the AWS Query API is no where near that bad. It’s fairly consistent and pretty easy to code to. It’s just not REST. It’s also worth noting that not all of AWS is in this boat. S3, CloudFront and Route53 API’s are much more RESTful.

The overall theme running throughout William's recent posting is that a good developer interface can hide a non-REST API approach and still be useful, whereas the inverse is not necessarily the case. The combination of a good interace and REST beneath may be the nirvana that the industry will achieve eventually, but at this stage it is neither a necessary nor sufficient condition for the success of Cloud. Getting the semantics of your resources right, as well as the programmatic interfaces, including error handling, is probably more important to Cloud developers than the best RESTful interfaces.

If your RPC API is consistent enough that its underlying model could be used as the basis for a REST API, you’re probably fine.

Rate this Article

Adoption
Style

BT