Calculated vs. Shipped URIs

I was just reading some docs on the Restfulie project page:

It looks like really cool stuff. We’ll be doing the same thing here, on an upcoming project, but it will be java oriented. I’m too lazy to read other people’s docs, so we’ll see if we build our own hypermedia scheme, or leverage VRaptor.

Well, we’re already using CXF, so VRaptor might not be on the roadmap. I’d be interested to see a comparison between the two.

It will be interesting as we get into hypermedia on this project. The idea is, we hide from the client how URIs are built because the server just ships the URIs as opaque strings in the response body that the client is just supposed to follow. No more string concatenation on the client side; just identify the one you want and go.

In the abstract, it’s a wonderful decoupling mechanism, and makes it really easy for “simple” clients to process, display, and link representations that come from the server.

I wonder about the effenciencies, though. CPU is cheap and fast, bandwidth is slow and (kind of) expensive. So publishing a URI spec out-of-band and letting the client construct the actual URI with string concatenation consumes very little runtime resources. But shipping big documents loaded with hyperlinks, millions and millions of times, is going to be expensive.

But I don’t want to fuss too much and spoil the fun before we’re even out of the gate. At the end of the day, where I work, bandwidth is cheap, too.


1 Comment

Filed under opinionizing, REST

One response to “Calculated vs. Shipped URIs

  1. Pingback: This Week in #REST – Volume 34 (Feb 9 2011 – Mar 6 2011) « This week in REST

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s