WS-REST 2014 Keynote

This year I had the honor to be invited by an old friend to give a keynote at WS-REST at WWW in Seoul.

Apart from meeting lots of great people, it was a great opportunity to get introduced to so many exciting ideas.

I figure that it could be useful to post my presentation online, as well as some text about it in case anyone that wasn't there needed a reference. So here it goes.

reading note: some of the parts of the talk I wrote about before, so instead of repeating myself, I embedded links to them. You want to de-reference them inline as you go along.

It Went More Of Less Like The Following...

"I think we are living in exciting times.

You see, there is this interesting idea that most technologies go through this notion of a hype-cycle: a technology trigger happens, they go through a peak of inflated expectations a trough of disillusionments, the slope of enlightment and eventually lead to a plateau of productivity.

And it feels like Hypermedia APIs are going through all that but it is early enough that we can feel that we can influence where it goes. Sort of like being at Sun when Java was being designed or Bell Labs when UNIX was being sorted out.

Sort of like the person that proposed s to be added to HTML: it feels obvious now, but oh boy, did that person enabled billion dollar businesses to be created!

But even before I talk about the technology triggers, let me first tell you where I come from.

My Rock Bottom

A few years ago I was working on gmail with the task of providing better visualizations of links on emails. We used to call that "mail intelligence" or something like that.

So, as any engineer would probably do, I gathered a set of examples (youtube links, flickr links, links, etc) and I went on writing regular expressions to detect them as code to talk to their individual APIs.

That launched and it was really cool.

The week it launched, my product manager came to my desk and said "wow, that was cool, can we do urls too?". And I said "yes, of course, let me just add that real quick".

A few days later, 3 new urls types requests came along. Ultimately, I had personally written over 13 regexes and API calls. I thought to myself: "I don't think this is going to scale" ... and my co-worker sitting next to me, noticing how busy I was, replied "do you think so?" :)

On my next project, I got smarter.

I was doing link posting for our social products.

When I was tasked to parse video urls I said: this is the common interface between google and video services. this is how you describe its affordances. We'll implement it once and onboard any video website.

That launched and it was really cool.

But then we needed to do photo websites too. And articles. And reviews. And all of the things that you could do with them. I had personally implemented over 25 of these individually before I stopped and asked asked myself again "I don't think this is going to scale" ... "do you think so?", said my co-worker smiling at me again :)

We didn't get to where we are because we are smart.

We Got To Where We Are Because We Tried Everything Else And Failed.

When the idea of crawling these links and parsing markup was brought to my attention, it felt like a breath of fresh air (well, in reality, I ignored it at first. it took me a few rounds for it to sink in).

But the idea was powerful: delegate. Instead of writing specific APIs, give webmasters the tools they needed to express what was on the link and find a way to degrade gracefully.

Folks started exploring what would be involved in adding verbs to to allow the representation of affordances. We asked questions like: what's the difference between purchase and buy? And how do you express what's involved in fulfilling an action?

But something was missing ... our foundation wasn't feeling as solid as we would like to.

The Real Measurement Of Code Quality: WTF/Min

On my way to the airport to a long trip, I picked up a book at a local bookstore. It was called RESTful Web Services.

By the time I landed, I had read it 3 times. For most of the time, I was cursing. In the right wtf/min rate.

They were going over the same problems that I was facing. They started from a similar place that I was starting.

I felt like I had finally found someone in the world that understood what challenges I was facing. We were coming from different ends (I was coming from the "web for humans i.e. webpages", and they were coming from the "web for computers i.e. APIs") but we could almost touch hands in the middle.

I went back excited to tell my co-workers about it. I told them:

  • "Guys, our APIs suck, we are an L2 API provider at best!"
  • "How could that be?", some asked. "We proud ourselves to provide solid APIs". "Well, how many levels are there even?".
  • "3. Here, let me show you how crappy your API is."

Ah, That's So Cool! Show Me What Your APIs Look Like!

... and I said: well, hummm, that's the issue, I can't. You know, I'm embarrassed about my APIs too :(

Here are the challenges that they are facing.

Lots of challenges, but these are exciting times."

Sam Goto, April 7th 2014 WWW/WS-REST @ Seoul.

That's, Hum, Cool. But What Happened After That?

I've been busy getting stuff done :) Check this out.