Thursday, August 20, 2009

What conference calls tell us about REST

I've just got off a conference call, the topic isn't important. What is important is that at the end of the call lots of other people started joining. Why was this? Well they were joining the next call that the meeting organiser had.

This got me thinking about REST and resource identifiers and why if you are doing REST its really important to understand what the right resource is. With conference calls there are basically two choices
  1. Have a unique conference number by person, this person therefore can just hand it out to people and they can dial in at anytime for a meeting
  2. Have a unique conference number by meeting. So when you want a meeting you have to arrange it and get a unique ID
Now the first one basically means that you always have a meeting ID but of course has a major problem: Your meetings can all begin melding into one.

The second is what you should be doing as it means that the meeting is the resource and the participants join the meeting. Someone can still be the chair if required but its the meeting that is the discreet entity.

The point here is that when doing REST you need to think about the implications of your resource hierarchy selections and not tie them to the first thing that you think makes sense.

Technorati Tags: ,

3 comments:

Ironick said...

Spot On! Wow Steve, that's one of the most cogent things I've ever heard you say about REST.

Now let me point out to your readers what I'm sure you already know: REST (and its community of practitioners) makes such resource "architecture" a first class concern. That's not to say REST gives easy answers; it does something far more important: it gets you to focus on the really important decisions right up front.

Contrast this with (you knew it was coming) WS-* (and its community of practitioners). Making decisions about the architecture of resources is a secondary consideration (at best). It comes after a lot of falderal about the operations of the "conference call service" (eg start call, end call, start recording).

Steve Bennett said...

Tedious though, if every time you call up for the weekly teleconference, the magic number has changed.

Steve Jones said...

Nick,

The point of WS-* v REST doesn't really hold as you could easily have a WS-* which starts a call based on a number.

Steve,

The CALL has the given ID so if its a repeating call every week then it should have the same ID every week as the Resource has been specified as repeating.