Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SIMPLE

SERVERS
CLEVER

CLIENTS
Ruben Verborgh
Hypermedia APIs
that make sense
HOW DO WE
MEASURE
SUCCESS?
MY API IS GOOD

BECAUSE I USE SWAGGER.
YOUR API SUCKS

BECAUSE IT’S NOT REST.
MY API IS DOING HYPERMEDIA,

LIKE, FOR REAL.
MY WEBSITE IS GOOD

BECAUSE I USE FLASH.
YOUR WEBSITE SUCKS

BECAUSE THE MENU IS ON TOP.
MY WEBSITE REQUIRES ONLY

3 CLICK...
API DESIGN

IS STUCK WHERE
WEB INTERACTION DESIGN
WAS 15 YEARS AGO.
WEB INTERACTION DESIGN
IN 2015 IS MEASURABLE:

HOW LONG DOES IT TAKE

CUSTOMERS TO BUY

WHAT THEY WANT?
WEB INTERACTION DESIGN
IN 2015 IS MEASURABLE:

HOW OFTEN IS

OUR CONTENT SHARED

ON TWITTER?
HOW CAN WE

MEASURE WEB API
DESIGN DECISIONS?
HOW CAN WE

MEASURE WEB API
DESIGN DECISIONS?
www.docsduds.com
PUBLISHING

LINKED DATA
QUANTIFYING
WEB APIS
MAKING SENSE

WITH HYPERMEDIA
1
2
3
PUBLISHING

LINKED DATA
QUANTIFYING
WEB APIS
MAKING SENSE

WITH HYPERMEDIA
1
2
3
LINKED DATA

CAPTURES FACTS

WITH LINKS
http://dbpedia.org/

resource/Nikola_Tesla
http://dbpedia.org/

resource/Thomas_Edison
http://xmlns.com/foaf/

0.1/knows
“...
{
"@id": "dbpedia:Nikola_Tesla",
"foaf:knows": "dbpedia:Thomas_Edison",
"foaf:givenName": "Nikola"

JSON-LD
!
!
!
!
}
WIKIPEDIA IS

TRANSLATED INTO

500 MILLION

LINKED DATA FACTS.
IT CAN BE QUERIED

BY THE WEB’S

MOST POWERFUL API.
SPARQLQUERY LANGUAGE
?
?
?
SPARQL
WHICH FRENCH CITIES

HAVE A POPULATION OF

MORE THAN 200.000?
SPARQL
WHICH MOVIES WERE
DIRECTED BY WOMEN
WHO WROTE NOVELS?
SPARQL
SPARQL

WEB API
THE WEB API

IS THE SAME

AS THE LANGUAGE:

ASK ANYTHING
/SPARQL?QUERY=

WHICH FRENCH CITIES

HAVE A POPULATION OF

MORE THAN 200.000?
SPARQL
/SPARQL?QUERY=

WHICH MOVIES WERE
DIRECTED BY WOMEN
WHO WROTE NOVELS?
SPARQL
IT’S LIKE THE

GRAPHQL OF

LINKED DATA
WITHOUT MONEY
THE SPARQL API

IS SO POWERFUL THAT

THAT MOST ENDPOINTS
ARE DOWN

> 1.5 DAY EACH MONTH
THE SPARQL API

IS SO POWERFUL THAT

THAT MOST ENDPOINTS

ARE DOWN

> 1.5 DAY EACH MONTH
PUBLISHING

LINKED DATA
QUANTIFYING
WEB APIS
MAKING SENSE

WITH HYPERMEDIA
1
2
3
SPARQL

WEB API
LET’S MEASURE THE

S!
C

S!
C
!
C
!
C
!
C
!
C
!
C
!
C
EACH CLIENT SENDS

UNIQUE REQUESTS, SO

CACHING IS INEFFECTIVE
REQUESTS CAN BE

ARBITRARILY COMPLICATED
THE INTERFACE

IS ...
1 240 CLIENTS
SPARQL API
QUERIES

PER HOUR
100 200
SPARQL API
1 240 CLIENTS100 200
SERVER

CPU LOAD
SPARQL API
1 240 CLIENTS100 200
CLIENT

CPU LOAD
SPARQL API
1 240 CLIENTS100 200
CACHE

REUSE
WHO WILL PAY

FOR SUCH AN

EXPENSIVE API?
PUBLISHING

LINKED DATA
QUANTIFYING
WEB APIS
MAKING SENSE

WITH HYPERMEDIA
1
2
3
WHAT IF WE MADE

A BETTER API?
GUESS WHAT?

THAT’S WHAT

EVERYBODY DOES!
2005 2010 2015

186

2,418

14,368
NUMBER

OF APIS
2005 2010 2015

186

2,418

14,368
NUMBER

OF CLIENTS
HOW CAN WE

THEN EXECUTE

UNIFORM QUERIES?
WE DON’T.
HOW CAN WE

THEN QUERY

MULTIPLE APIS?
WE CAN’T.
WHAT IF WE MADE

A SIMPLER API THAT
EXPLAINED ITSELF

WITH HYPERMEDIA?
“I DON’T DO
SERVER
”
“BUT I DO
SERVER
”
“SO IF I

WANT TO DO
CLIENT
”
“THEN I NEED

TO ASK YOU
CLIENT
”
“AND COMBINE IT

MYSELF INTO
CLIENT
”
CLIENTS STILL

ANSWER COMPLEX

SPARQL QUERIES,
JUST NOT WITH

THE SPARQL API
SERVER
TRIPLE PATTERN
FRAGMENTS API
SERVER CLIENT
SPARQL API
TPF API
(nothing)
SIMPLE

SERVER
CLEVER

CLIENT
TPF API
1 240 CLIENTS
SPARQL API
QUERIES

PER HOUR
TPF API
100 200
SPARQL API
TPF API
1 240 CLIENTS100 200
SERVER

CPU LOAD
SPARQL API
TPF API
1 240 CLIENTS100 200
CLIENT

CPU LOAD
SPARQL API
TPF API
1 240 CLIENTS100 200
CACHE

REUSE
RESPONSES CONTAIN
HYPERMEDIA CONTROLS
IN JSON-LD USING THE
HYDRA VOCABULARY
{
"@id": "http://fragments.dbpedia.org/2015/en#dataset",
"search": {
"template": "/2015/en{?subject,predicate,object}",
"m...
I CAN DO
I CAN DO
I CAN DO
I CAN DO
2005 2010 2015

186

2,418

14,368
664,368
NUMBER

OF APIS
2005 2010 2015

186

2,418

14,368
NUMBER

OF CLIENTS

14,369
TRY A SIMPLE SERVER
AND A CLEVER CLIENT
data.linkeddatafragments.org
client.linkeddatafragments.org
PUBLISHING

LINKED DATA
QUANTIFYING
WEB APIS
MAKING SENSE

WITH HYPERMEDIA
1
2
3
WHEN DOES

A CLIENT TRULY
HAVE POWER?
IF IT SIMPLY

USES

CLEVER APIS?
IF IT CLEVERLY

USES

SIMPLE APIS?
IF YOU HAVE THE MONEY,

USE SPARQL OR GRAPHQL
INTELLIGENCE

IS EXPENSIVE
IF NOT, LET EACH CLIENT

USE ITS OWN CPU
I STOPPED THINKING

ABOUT WEB APIS

A LONG TIME AGO
I’M NOW THINKING

ABOUT WEB CLIENTS
AND WHEN I SAY WEB,

I MEAN HYPERM...
I CAN’T MEASURE

HYPERMEDIA,
BUT I CAN MEASURE

CLIENTS DOING

THE SAME TASKS

ON DIFFERENT APIS
HYPERMEDIA LETS

A SERVER EXPLAIN

ITS API TO CLIENTS,
SO THEY CAN USE IT

IN MEASURABLY

DIFFERENT WAYS.
SIMPLE

SERVERS
CLEVER

CLIENTS
@RubenVerborgh
Hypermedia APIs
that make sense
Upcoming SlideShare
Loading in …5
×

of

Hypermedia APIs that make sense Slide 1 Hypermedia APIs that make sense Slide 2 Hypermedia APIs that make sense Slide 3 Hypermedia APIs that make sense Slide 4 Hypermedia APIs that make sense Slide 5 Hypermedia APIs that make sense Slide 6 Hypermedia APIs that make sense Slide 7 Hypermedia APIs that make sense Slide 8 Hypermedia APIs that make sense Slide 9 Hypermedia APIs that make sense Slide 10 Hypermedia APIs that make sense Slide 11 Hypermedia APIs that make sense Slide 12 Hypermedia APIs that make sense Slide 13 Hypermedia APIs that make sense Slide 14 Hypermedia APIs that make sense Slide 15 Hypermedia APIs that make sense Slide 16 Hypermedia APIs that make sense Slide 17 Hypermedia APIs that make sense Slide 18 Hypermedia APIs that make sense Slide 19 Hypermedia APIs that make sense Slide 20 Hypermedia APIs that make sense Slide 21 Hypermedia APIs that make sense Slide 22 Hypermedia APIs that make sense Slide 23 Hypermedia APIs that make sense Slide 24 Hypermedia APIs that make sense Slide 25 Hypermedia APIs that make sense Slide 26 Hypermedia APIs that make sense Slide 27 Hypermedia APIs that make sense Slide 28 Hypermedia APIs that make sense Slide 29 Hypermedia APIs that make sense Slide 30 Hypermedia APIs that make sense Slide 31 Hypermedia APIs that make sense Slide 32 Hypermedia APIs that make sense Slide 33 Hypermedia APIs that make sense Slide 34 Hypermedia APIs that make sense Slide 35 Hypermedia APIs that make sense Slide 36 Hypermedia APIs that make sense Slide 37 Hypermedia APIs that make sense Slide 38 Hypermedia APIs that make sense Slide 39 Hypermedia APIs that make sense Slide 40 Hypermedia APIs that make sense Slide 41 Hypermedia APIs that make sense Slide 42 Hypermedia APIs that make sense Slide 43 Hypermedia APIs that make sense Slide 44 Hypermedia APIs that make sense Slide 45 Hypermedia APIs that make sense Slide 46 Hypermedia APIs that make sense Slide 47 Hypermedia APIs that make sense Slide 48 Hypermedia APIs that make sense Slide 49 Hypermedia APIs that make sense Slide 50 Hypermedia APIs that make sense Slide 51 Hypermedia APIs that make sense Slide 52 Hypermedia APIs that make sense Slide 53 Hypermedia APIs that make sense Slide 54 Hypermedia APIs that make sense Slide 55 Hypermedia APIs that make sense Slide 56 Hypermedia APIs that make sense Slide 57 Hypermedia APIs that make sense Slide 58 Hypermedia APIs that make sense Slide 59 Hypermedia APIs that make sense Slide 60 Hypermedia APIs that make sense Slide 61 Hypermedia APIs that make sense Slide 62 Hypermedia APIs that make sense Slide 63 Hypermedia APIs that make sense Slide 64 Hypermedia APIs that make sense Slide 65 Hypermedia APIs that make sense Slide 66 Hypermedia APIs that make sense Slide 67 Hypermedia APIs that make sense Slide 68 Hypermedia APIs that make sense Slide 69 Hypermedia APIs that make sense Slide 70 Hypermedia APIs that make sense Slide 71 Hypermedia APIs that make sense Slide 72
Upcoming SlideShare
The Future is Federated
Next
Download to read offline and view in fullscreen.

5 Likes

Share

Download to read offline

Hypermedia APIs that make sense

Download to read offline

Talk at APIdays Paris 2015

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Hypermedia APIs that make sense

  1. 1. SIMPLE
 SERVERS CLEVER
 CLIENTS Ruben Verborgh Hypermedia APIs that make sense
  2. 2. HOW DO WE MEASURE SUCCESS?
  3. 3. MY API IS GOOD
 BECAUSE I USE SWAGGER. YOUR API SUCKS
 BECAUSE IT’S NOT REST. MY API IS DOING HYPERMEDIA,
 LIKE, FOR REAL.
  4. 4. MY WEBSITE IS GOOD
 BECAUSE I USE FLASH. YOUR WEBSITE SUCKS
 BECAUSE THE MENU IS ON TOP. MY WEBSITE REQUIRES ONLY
 3 CLICKS TO ACCESS STUFF.
  5. 5. API DESIGN
 IS STUCK WHERE WEB INTERACTION DESIGN WAS 15 YEARS AGO.
  6. 6. WEB INTERACTION DESIGN IN 2015 IS MEASURABLE:
 HOW LONG DOES IT TAKE
 CUSTOMERS TO BUY
 WHAT THEY WANT?
  7. 7. WEB INTERACTION DESIGN IN 2015 IS MEASURABLE:
 HOW OFTEN IS
 OUR CONTENT SHARED
 ON TWITTER?
  8. 8. HOW CAN WE
 MEASURE WEB API DESIGN DECISIONS?
  9. 9. HOW CAN WE
 MEASURE WEB API DESIGN DECISIONS? www.docsduds.com
  10. 10. PUBLISHING
 LINKED DATA QUANTIFYING WEB APIS MAKING SENSE
 WITH HYPERMEDIA 1 2 3
  11. 11. PUBLISHING
 LINKED DATA QUANTIFYING WEB APIS MAKING SENSE
 WITH HYPERMEDIA 1 2 3
  12. 12. LINKED DATA
 CAPTURES FACTS
 WITH LINKS
  13. 13. http://dbpedia.org/
 resource/Nikola_Tesla http://dbpedia.org/
 resource/Thomas_Edison http://xmlns.com/foaf/
 0.1/knows “Nikola” http://xmlns.com/foaf/
 0.1/givenName RDF
  14. 14. { "@id": "dbpedia:Nikola_Tesla", "foaf:knows": "dbpedia:Thomas_Edison", "foaf:givenName": "Nikola"
 JSON-LD ! ! ! ! }
  15. 15. WIKIPEDIA IS
 TRANSLATED INTO
 500 MILLION
 LINKED DATA FACTS.
  16. 16. IT CAN BE QUERIED
 BY THE WEB’S
 MOST POWERFUL API.
  17. 17. SPARQLQUERY LANGUAGE
  18. 18. ? ? ? SPARQL
  19. 19. WHICH FRENCH CITIES
 HAVE A POPULATION OF
 MORE THAN 200.000? SPARQL
  20. 20. WHICH MOVIES WERE DIRECTED BY WOMEN WHO WROTE NOVELS? SPARQL
  21. 21. SPARQL
 WEB API
  22. 22. THE WEB API
 IS THE SAME
 AS THE LANGUAGE:
 ASK ANYTHING
  23. 23. /SPARQL?QUERY=
 WHICH FRENCH CITIES
 HAVE A POPULATION OF
 MORE THAN 200.000? SPARQL
  24. 24. /SPARQL?QUERY=
 WHICH MOVIES WERE DIRECTED BY WOMEN WHO WROTE NOVELS? SPARQL
  25. 25. IT’S LIKE THE
 GRAPHQL OF
 LINKED DATA WITHOUT MONEY
  26. 26. THE SPARQL API
 IS SO POWERFUL THAT
 THAT MOST ENDPOINTS ARE DOWN
 > 1.5 DAY EACH MONTH
  27. 27. THE SPARQL API
 IS SO POWERFUL THAT
 THAT MOST ENDPOINTS
 ARE DOWN
 > 1.5 DAY EACH MONTH
  28. 28. PUBLISHING
 LINKED DATA QUANTIFYING WEB APIS MAKING SENSE
 WITH HYPERMEDIA 1 2 3
  29. 29. SPARQL
 WEB API LET’S MEASURE THE
  30. 30. 
S! C
  31. 31. 
S! C ! C ! C ! C ! C ! C ! C
  32. 32. EACH CLIENT SENDS
 UNIQUE REQUESTS, SO
 CACHING IS INEFFECTIVE REQUESTS CAN BE
 ARBITRARILY COMPLICATED THE INTERFACE
 IS EXPENSIVE
  33. 33. 1 240 CLIENTS SPARQL API QUERIES
 PER HOUR 100 200
  34. 34. SPARQL API 1 240 CLIENTS100 200 SERVER
 CPU LOAD
  35. 35. SPARQL API 1 240 CLIENTS100 200 CLIENT
 CPU LOAD
  36. 36. SPARQL API 1 240 CLIENTS100 200 CACHE
 REUSE
  37. 37. WHO WILL PAY
 FOR SUCH AN
 EXPENSIVE API?
  38. 38. PUBLISHING
 LINKED DATA QUANTIFYING WEB APIS MAKING SENSE
 WITH HYPERMEDIA 1 2 3
  39. 39. WHAT IF WE MADE
 A BETTER API? GUESS WHAT?
 THAT’S WHAT
 EVERYBODY DOES!
  40. 40. 2005 2010 2015 
186 
2,418 
14,368 NUMBER
 OF APIS
  41. 41. 2005 2010 2015 
186 
2,418 
14,368 NUMBER
 OF CLIENTS
  42. 42. HOW CAN WE
 THEN EXECUTE
 UNIFORM QUERIES? WE DON’T.
  43. 43. HOW CAN WE
 THEN QUERY
 MULTIPLE APIS? WE CAN’T.
  44. 44. WHAT IF WE MADE
 A SIMPLER API THAT EXPLAINED ITSELF
 WITH HYPERMEDIA?
  45. 45. “I DON’T DO SERVER ”
  46. 46. “BUT I DO SERVER ”
  47. 47. “SO IF I
 WANT TO DO CLIENT ”
  48. 48. “THEN I NEED
 TO ASK YOU CLIENT ”
  49. 49. “AND COMBINE IT
 MYSELF INTO CLIENT ”
  50. 50. CLIENTS STILL
 ANSWER COMPLEX
 SPARQL QUERIES, JUST NOT WITH
 THE SPARQL API
  51. 51. SERVER TRIPLE PATTERN FRAGMENTS API
  52. 52. SERVER CLIENT SPARQL API TPF API (nothing)
  53. 53. SIMPLE
 SERVER CLEVER
 CLIENT TPF API
  54. 54. 1 240 CLIENTS SPARQL API QUERIES
 PER HOUR TPF API 100 200
  55. 55. SPARQL API TPF API 1 240 CLIENTS100 200 SERVER
 CPU LOAD
  56. 56. SPARQL API TPF API 1 240 CLIENTS100 200 CLIENT
 CPU LOAD
  57. 57. SPARQL API TPF API 1 240 CLIENTS100 200 CACHE
 REUSE
  58. 58. RESPONSES CONTAIN HYPERMEDIA CONTROLS IN JSON-LD USING THE HYDRA VOCABULARY
  59. 59. { "@id": "http://fragments.dbpedia.org/2015/en#dataset", "search": { "template": "/2015/en{?subject,predicate,object}", "mapping": [ { "variable": "subject", "property": "rdf:subject" }, { "variable": "predicate", "property": "rdf:predicate" }, { "variable": "object", "property": "rdf:object" } ] } } JSON-LD
  60. 60. I CAN DO I CAN DO I CAN DO I CAN DO
  61. 61. 2005 2010 2015 
186 
2,418 
14,368 664,368 NUMBER
 OF APIS
  62. 62. 2005 2010 2015 
186 
2,418 
14,368 NUMBER
 OF CLIENTS 
14,369
  63. 63. TRY A SIMPLE SERVER AND A CLEVER CLIENT data.linkeddatafragments.org client.linkeddatafragments.org
  64. 64. PUBLISHING
 LINKED DATA QUANTIFYING WEB APIS MAKING SENSE
 WITH HYPERMEDIA 1 2 3
  65. 65. WHEN DOES
 A CLIENT TRULY HAVE POWER?
  66. 66. IF IT SIMPLY
 USES
 CLEVER APIS?
  67. 67. IF IT CLEVERLY
 USES
 SIMPLE APIS?
  68. 68. IF YOU HAVE THE MONEY,
 USE SPARQL OR GRAPHQL INTELLIGENCE
 IS EXPENSIVE IF NOT, LET EACH CLIENT
 USE ITS OWN CPU
  69. 69. I STOPPED THINKING
 ABOUT WEB APIS
 A LONG TIME AGO I’M NOW THINKING
 ABOUT WEB CLIENTS AND WHEN I SAY WEB,
 I MEAN HYPERMEDIA
  70. 70. I CAN’T MEASURE
 HYPERMEDIA, BUT I CAN MEASURE
 CLIENTS DOING
 THE SAME TASKS
 ON DIFFERENT APIS
  71. 71. HYPERMEDIA LETS
 A SERVER EXPLAIN
 ITS API TO CLIENTS, SO THEY CAN USE IT
 IN MEASURABLY
 DIFFERENT WAYS.
  72. 72. SIMPLE
 SERVERS CLEVER
 CLIENTS @RubenVerborgh Hypermedia APIs that make sense
  • vladimirtsukur

    Mar. 7, 2017
  • marfuzii

    Dec. 8, 2016
  • MikelEganaAranguren

    Dec. 9, 2015
  • choeungjin

    Dec. 9, 2015
  • lanthaler

    Dec. 8, 2015

Talk at APIdays Paris 2015

Views

Total views

2,502

On Slideshare

0

From embeds

0

Number of embeds

141

Actions

Downloads

14

Shares

0

Comments

0

Likes

5

×