166
RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect, Layer 7 Technologies

Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

RESTing in the ALPSGeneric Hypermedia and Domain-Specific

APIs

@mamundMike Amundsen

Principal API Architect, Layer 7 Technologies

Page 2: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

A simple story In three parts...

Page 3: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The bona fidesHow we got here...

Page 4: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confessionI left some stuff out...

Page 5: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Where I make amendsThe payoff

Page 6: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Ok, let's begin...

Page 7: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

How we got here...The bona fides

Page 8: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Let's start with a quote from 2002

Page 9: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Fielding and Taylor, 2002

"REST provides [this] by focusing on a shared understanding

of data types with metadata..."

Page 10: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

That phrase struck me.

Page 11: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

It has become a prime motivator for me.

Page 12: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

focusing

Page 13: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

focusingon

Page 14: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

focusingon

shared understanding

Page 15: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

shared understanding

Page 16: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

How do we share understanding on the Web?

Page 17: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

protocols

Page 18: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

protocols

httpftp

smtpdns

ws xmpp

Page 19: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

But that's not all...

Page 20: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Fielding & Taylor, 2002

"REST components communicate by transferring a representation of the data

in a format matching one of an evolving set of standard data types..."

Page 21: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

standard data types

htmlcsv

halatom

json Cj

Page 22: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

registered media types

htmlcsv

halatom

json Cj

Page 23: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

messages

htmlcsv

halatom

json Cj

Page 24: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

We share understanding via messages.

Page 25: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Description

Page 26: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Discovery

Page 27: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Hypermedia

Page 28: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

These messages tell us what protocol actions are possible.

Page 29: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

These messages tell us what protocol actions are possible.

Page 30: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

How is this done in a message?

Page 31: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

affordances

Page 32: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

hypermediaaffordances

Page 33: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

protocolhypermediaaffordances

Page 34: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Back in 2010, I called those...

Page 35: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 36: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 37: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Identify nine features for sharing understanding about protocol actions.

Page 38: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 39: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 40: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 41: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Identify the affordances

Page 42: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 43: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Categorize them.

Page 44: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 45: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

For lots of media type designs.

Page 46: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 47: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 48: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 49: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 50: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

This gives us a tool for lots of tasks...

Page 51: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

We can analyze existing designs

Page 52: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

We can categorize types for 'best fit' implementations

Page 53: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

We can use H-Factors to model prototype designs

Page 54: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 55: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

We now have a shared understanding

about protocol affordances

Page 56: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 57: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 58: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

And this is all good.

Page 59: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

But...

Page 60: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

There's a problem here.

Page 61: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

An important piece is missing.

Page 62: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

There is a "gap" between theory and practice

Page 63: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

There is a "gap" between H-Factors and "the real world"

Page 64: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

I ignored this "gap" when identifying H-Factors.

Page 65: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

I side-stepped the "gap" in the last book.

Page 66: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Page 67: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

And this "gap" is a key theme in the next book.

Page 68: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

H-Factors

Yep, you might say...

Page 69: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

I left some stuff out.The confession

Page 70: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

I ignored the "hard" parts ...

Page 71: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

Page 72: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

What are those?

Page 73: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

Page 74: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

They're rather specific.

Page 75: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

Page 76: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

affordances?

Page 77: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

Page 78: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

Well, they are not protocol affordances

Page 79: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

I call them application affordances

Page 80: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The confession

But there is another name for these...

Page 81: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

VocabulariesSrsly?

Page 82: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

On the Web, representations contain

protocol AND application affordances

Page 83: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

We share understandingat the application-level, too.

Page 84: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Well, "we" means us humans.

Page 85: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Do we share app-level understanding?

Page 86: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

How about now?

Page 87: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

How about now?

Page 88: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Human app-level affordances

Page 89: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Machine app-level affordances

Page 90: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Of course, we've known this for quite a while.

Page 91: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

There has been quite a bit of work on vocabularies

dublin core

microformatsactivity streams

schema.org

VoID

Page 92: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Vocabularies can provide shared understanding

of the application-specific affordances

Page 93: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

And this is all good.

Page 94: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

But...

Page 95: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

There's a problem here.

Page 96: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

An important piece is missing.

Page 97: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

There is a "gap" between theory and practice

Page 98: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

There is a "gap" between Vocabularies and "the real world"

Page 99: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Vocabularies only model the "what"

state

Page 100: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

Vocabularies only model the "what"

not the "how"

state

transitions

Page 101: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

I know what a Person is, but how can I interact with it?

Page 102: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

I know what an hProduct is, but how can I interact with it?

Page 103: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Vocabularies

I know what an ActivityStream is, but how can I interact with it?

Page 104: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoffWhere I make amends

Page 105: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

What if we combined the "what" of vocabularies

state

Page 106: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

What if we combined the "what" of vocabularies

withthe "how" of protocols?

state

transitions

Page 107: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

What would that look like?

state

transitions

Page 108: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

XHTML Meta Data Profiles (XMDP)Tantek Celik, 2003

Page 109: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

A few years on, a similar approach...

Page 110: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

ALPS - Microblogging with XHTMLMike Amundsen, 2011

Page 111: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

ALPS includes both state and transitions

Page 112: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

ALPS(mb) hackathon at 2011 RESTFest.

Initial experiment was a success.Independently built apps could interop.

Page 113: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

Microblogging site rstatus implements ALPS(mb) in 2012

Page 114: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

ALPS(mb) was a good ideabut we can do better.

Page 115: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

The payoff

How about a profile specthat includes both

state and transitionsthat works for a wide range

of media types?

Page 116: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Application-Level Profile Semantics

The sequel

Page 117: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Warning!What follows is early-stage,

tentative design

Page 118: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Design and register two media types for describing problem domains.

application/alps+xml (or +json)

Page 119: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 120: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 121: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 122: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 123: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Four possible descriptor types:1. semantic (data)2. safe (HTTP.GET)3. unsafe (HTTP.POST)4. idempotent (HTTP.PUT & HTTP.DELETE)

Page 124: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 125: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

ALPS 'id' properties become representation identifiers● @class, @rel, @name (HTML)● @rel, @name (Cj, HAL)● @rel (Atom)

Page 126: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Apply these semantics to a wide range of existing media types

Page 127: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 128: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

There will be a set of rules for applying ALPS semantics

to each media type.

Page 129: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 130: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

By applying semantic descriptors consistently...

Page 131: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 132: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

selecting an implementation media type

can be independent of the state and transition

semantics.

Page 133: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 134: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

selecting a reference vocabularycan be independent of the

protocol semantics

Page 135: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Page 136: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

ALPS spec will provide several markup elements

Page 137: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understanding

Page 138: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understandingabout a problem domain

Page 139: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understandingabout a problem domain

Not a service document (WSDL)

Page 140: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understandingabout a problem domain

Not a discovery document (Google, @mnot)

Page 141: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understandingabout a problem domain

Not a hypermedia type (HAL, Cj, Siren, etc.)

Page 142: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understandingabout a problem domain

Not a vocabulary repository

Page 143: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Now we have a way to share understandingabout a problem domain

Not an object graph

Page 144: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

This could give us tools for lots of tasks...

Page 145: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Describing a domain profile

Page 146: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Analyzing domain profiles

Page 147: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Matching domain profiles to media types

Page 148: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Sharing selected state with multiple services

schema.org/Persongift lists

contacts

photosancestry tree

matchmaker

school pals

Page 149: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Documenting domain profiles

Page 150: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Driving server-side representation engines

Page 151: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Driving client-side processing engines

Page 152: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

ALPS

Possible benefits of ALPS Repositories:● Share your domain profiles● Search for profiles by topic● Match abstracts w/ favored vocabularies● Reflect aggregate profile use/reference data

Page 153: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

So, where are we headed now?

Summary

Page 154: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Snowflakes still commonprogrammableWeb, 2012

Summary

Page 155: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

How many data types here?programmableWeb, 2012

Summary

Page 156: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

How much shared understanding here?programmableWeb, 2012

Summary

Page 157: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Fielding & Taylor, 2002

"REST components communicate by transferring a representation of the data

in a format matching one of an evolving set of standard data types..."

Page 158: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

standard data types includes both

state and transition types

Summary

Page 159: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

shared understanding includes both

state and transition types

Summary

Page 160: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

because the Web includes both

state and transition types

Summary

Page 161: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

protocols

httpftp

smtpdns

ws xmpp

Page 162: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

media types

htmlcsv

halatom

json Cj

Page 163: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

dublin core

microformatsactivity streams

schema.org

VoIDvocabularies

Page 164: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

micro-blogging

hProductPerson

vCard

accounting

domain profiles

Page 165: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

Summary

● ALPS IETF I-D will be posted in March● Watch my blog/twitter for details● Looking for feedback/contributions

Page 166: Principal API Architect, Layer 7 Technologies RESTing in ...€¦ · RESTing in the ALPS Generic Hypermedia and Domain-Specific APIs @mamund Mike Amundsen Principal API Architect,

RESTing in the ALPSGeneric Hypermedia and Domain-Specific

APIs

@mamundMike Amundsen

Principal API Architect, Layer 7 Technologies

Let's talk!