SlideShare a Scribd company logo
REST
The Most Misunderstood
Software Architecture Ever
Martín Soto
February 17, 2015
REST
● REpresentational State Transfer
● Roy Fielding, 2000
● Deeply misunderstood! Many systems (mostly
APIs) claim to be REST(ful), few really are.
● Abstraction of the World Wide Web.
Richardson’s REST Maturity Model
http://martinfowler.com/articles/richardsonMaturityModel.html
Level 0: Plain, Old RPC
http://martinfowler.com/articles/richardsonMaturityModel.html
Plain, Old Remote Procedure Call (RPC)
Level 0: Remote Procedure Call (RPC)
Caller Callee
Procedure call
Return value
Caller
execution
Caller
continues
Procedure
execution
Network Corba
DCOM
java RMI
...
HTTP
Level 0
Level 0: RPC over HTTP
● Only one URL (e.g., http://example.
com/api/v1)
● Procedure name and parameters passed as
request payload.
● Return value returned as response.
Level 0: Example
Amazon Elastic Computing Cloud (EC2) API
Level 1: Resources
http://martinfowler.com/articles/richardsonMaturityModel.html
Level 1: Resources
Company 1
Company 7
Company 33
User 4
User 28
User 13 User 5
User 62
User 44
User 99
User 63
Security
policy 22
Security
policy 85
http://api.com/companies/1
http://api.com/users/63
http://api.com/policies/85
http://api.com/companies/33
http://api.com/companies/7
http://api.com/users/63http://api.com/users/63
http://api.com/users/63
http://api.com/users/63
http://api.com/users/63
http://api.com/users/63
http://api.com/users/63
http://api.com/policies/85
Level 2: HTTP Verbs
http://martinfowler.com/articles/richardsonMaturityModel.html
Level 2: HTTP Methods
POST
Create new resource (when POSTing to a collection) or
execute especial operation on resource.
GET Read the contents of resource (the resource representation)
PUT
Upload new resource contents replacing any previous
contents. Also, create a resource if previously nonexistent.
DELETE Delete the resource.
Level 2: Example
Google Calendar API
But…
The Web is
interconnected...
It’s the
hypertext,
stupid!
Hypertext: HTML
<HTML>
<HEAD>
<TITLE>Your Title Here</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<CENTER><IMG SRC="clouds.jpg" ALIGN="
BOTTOM"> </CENTER>
<HR>
<a href="http://somegreatsite.com">Link
Name</a>
is a link to another nifty site
<H1>This is a Header</H1>
<H2>This is a Medium Header</H2>
Send me mail at <a href="mailto:
support@yourcompany.com">
support@yourcompany.com</a>.
<P> This is a new paragraph!
<P> <B>This is a new paragraph!</B>
<BR> <B><I>This is a new sentence without
a paragraph break, in bold italics.
</I></B>
<HR>
</BODY>
</HTML>
Level 3: Hypermedia
http://martinfowler.com/articles/richardsonMaturityModel.html
HATEOAS
Hypertext As The
Engine of Application
State
“What needs to be done to make the
REST architectural style clear on the
notion that hypertext is a constraint?
In other words, if the engine of
application state (and hence the API)
is not being driven by hypertext, then
it cannot be RESTful and cannot be a
REST API. Period. Is there some
broken manual somewhere that
needs to be fixed?
Roy Fielding
http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
Programming with Hypermedia?
http://martinfowler.com/articles/richardsonMaturityModel.html
??? ???
Hypermedia for Data APIs
The Web
<HTML>
<HEAD>
<TITLE>Your Title Here</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<CENTER><IMG SRC="clouds.jpg" ALIGN="
BOTTOM"> </CENTER>
<HR>
<a href="http://somegreatsite.com">Link
Name</a>
is a link to another nifty site
<H1>This is a Header</H1>
<H2>This is a Medium Header</H2>
...
Data APIs
?
Example
Putting Hypermedia to Good Use: Regional Privacy
EU Web
Service
US Web
Service CN Web
Service
What we got from hypermedia
API is independent of data
location
We were able to introduce this structure
without breaking our API contract: Resource
location becomes an implementation detail
Data privacy becomes
evident
Customers can verify where their data is
located by just looking at the requests their
clients are running.
All customers can be
handled equally
As long as you stick to a format, you can
serve it from wherever you like and clients
will handle it.
API
Versioning
We can evolve the API by providing new
fields pointing to new resources or formats.
As long as the older fields are preserved,
older clients will continue to work.
Example
Federated Systems: Initial System
Relational DB (MySQL)
Example
Federated Systems: Fast Caching
Relational DB
(e.g., MySQL)
Key-value
Store (e.g.,
Redis)
Example
Federated Systems: Microservices
Microservice 1
Microservice 2
Microservice 3
Example
Federated Systems: SaaS
Customer 1 Customer 2
Customer 3
High-capacity cloud instance
Low-capacity cloud instance
In-premise, dedicated
hardware
The (Not-So-Exiting) Present
● Many more APIs are going the hypermedia way
GitHub, Nike, PayPal.
● Documentation for popular APIs still specifies URLs
API providers make resource locations part of the API contract
probably to appease programmers.
● Server frameworks and client libraries are getting better at
hypermedia
The improvement has been significant in the last two or three
years.
Wrap Up
✓
Thanks!
...and welcome to the discussion
Martín Soto
@msotoweb
donsoto@gmail.com
http://martinsoto.co
Credits
Presentation template by SlidesCarnival
“Linked Web” picture courtesy Chris 73 / Wikimedia
Commons, shared under Creative Commons
Attribution-Share Alike 3.0.
World map outline © Copyright Showeet.com, CC
Attribution.
For other credits, follow the links on the
corresponding slides.

More Related Content

What's hot

Web API Basics
Web API BasicsWeb API Basics
Web API Basics
LearnNowOnline
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
Prem Sanil
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
Aniruddh Bhilvare
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
Pankaj Bajaj
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Nordic APIs
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
Bhavya Siddappa
 
The REST And Then Some
The REST And Then SomeThe REST And Then Some
The REST And Then Some
Nordic APIs
 
API Design- Best Practices
API Design-   Best PracticesAPI Design-   Best Practices
API Design- Best Practices
Prakash Bhandari
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
Imran M Yousuf
 
The ASP.NET Web API for Beginners
The ASP.NET Web API for BeginnersThe ASP.NET Web API for Beginners
The ASP.NET Web API for Beginners
Kevin Hazzard
 
Creating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandCreating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandMatthew Turland
 
The Power of Drupal and Alfresco Together
The Power of Drupal and Alfresco TogetherThe Power of Drupal and Alfresco Together
The Power of Drupal and Alfresco Together
Jeff Potts
 
SFDC REST API
SFDC REST APISFDC REST API
SFDC REST API
Bohdan Dovhań
 
What is API - Understanding API Simplified
What is API - Understanding API SimplifiedWhat is API - Understanding API Simplified
What is API - Understanding API Simplified
Jubin Aghara
 
RESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar SuleymanovRESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar Suleymanov
Vuqar Suleymanov
 
Introduction to REST and Hypermedia
Introduction to REST and HypermediaIntroduction to REST and Hypermedia
Introduction to REST and Hypermedia
Nordic APIs
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best Practices
Marta Rauch
 
API Basics
API BasicsAPI Basics
API Basics
Ritul Chaudhary
 
Past, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web AppsPast, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web Apps
SmartBear
 

What's hot (20)

Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
 
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
The REST And Then Some
The REST And Then SomeThe REST And Then Some
The REST And Then Some
 
API Design- Best Practices
API Design-   Best PracticesAPI Design-   Best Practices
API Design- Best Practices
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
The ASP.NET Web API for Beginners
The ASP.NET Web API for BeginnersThe ASP.NET Web API for Beginners
The ASP.NET Web API for Beginners
 
Creating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandCreating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew Turland
 
The Power of Drupal and Alfresco Together
The Power of Drupal and Alfresco TogetherThe Power of Drupal and Alfresco Together
The Power of Drupal and Alfresco Together
 
SFDC REST API
SFDC REST APISFDC REST API
SFDC REST API
 
What is API - Understanding API Simplified
What is API - Understanding API SimplifiedWhat is API - Understanding API Simplified
What is API - Understanding API Simplified
 
RESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar SuleymanovRESTful web services with Groovy on Grails by Vugar Suleymanov
RESTful web services with Groovy on Grails by Vugar Suleymanov
 
Introduction to REST and Hypermedia
Introduction to REST and HypermediaIntroduction to REST and Hypermedia
Introduction to REST and Hypermedia
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best Practices
 
API Basics
API BasicsAPI Basics
API Basics
 
Past, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web AppsPast, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web Apps
 

Viewers also liked

Toast 2015 qiime_talk2
Toast 2015 qiime_talk2Toast 2015 qiime_talk2
Toast 2015 qiime_talk2TOASTworkshop
 
Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...
Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...
Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...
Anupam Singh
 
Progetto EPI.CA. Report riassuntivo semplificato
Progetto EPI.CA. Report riassuntivo semplificatoProgetto EPI.CA. Report riassuntivo semplificato
Progetto EPI.CA. Report riassuntivo semplificato
Mariano Marino
 
EPI.CA epidemiologia del cancro nella città di Casoria (NA)
EPI.CA epidemiologia del cancro nella città di Casoria (NA)EPI.CA epidemiologia del cancro nella città di Casoria (NA)
EPI.CA epidemiologia del cancro nella città di Casoria (NA)
Mariano Marino
 
Dimensioning, Weighing and Scanning (DWS) System
Dimensioning, Weighing and Scanning (DWS) SystemDimensioning, Weighing and Scanning (DWS) System
Dimensioning, Weighing and Scanning (DWS) System
Vineet Govani
 
EPI.CA Casoria per le scuole
EPI.CA Casoria per le scuoleEPI.CA Casoria per le scuole
EPI.CA Casoria per le scuole
Mariano Marino
 
Toast 2015 qiime_talk
Toast 2015 qiime_talkToast 2015 qiime_talk
Toast 2015 qiime_talkTOASTworkshop
 
Lcloud on aws re invent 2016 - amazon web services
Lcloud on aws re invent 2016 - amazon web servicesLcloud on aws re invent 2016 - amazon web services
Lcloud on aws re invent 2016 - amazon web services
Jacek Biernat
 
BEST Courses
BEST CoursesBEST Courses
BEST Courses
Dima Lisovyk
 
BEST courses
BEST coursesBEST courses
BEST courses
Dima Lisovyk
 
Literate environment presentation by Andrea Lewis
Literate environment presentation by Andrea LewisLiterate environment presentation by Andrea Lewis
Literate environment presentation by Andrea Lewis
skittledimples
 
autodome slideshow
autodome slideshowautodome slideshow
autodome slideshowKashif Khan
 
Estructura de la pirámide de Hans Kelsen aplicada en el Perú
Estructura de la pirámide de Hans Kelsen aplicada en el PerúEstructura de la pirámide de Hans Kelsen aplicada en el Perú
Estructura de la pirámide de Hans Kelsen aplicada en el Perú
Jonás Contreras
 
Giant panda
Giant pandaGiant panda
Giant panda
Jaset Parada
 
Fierul si cuprul lectie
Fierul si cuprul  lectieFierul si cuprul  lectie
Fierul si cuprul lectie
davidfanica
 
Licor de miel
Licor de mielLicor de miel
Licor de miel
Jonás Contreras
 
Snackthoughts Interview: Category General
Snackthoughts Interview: Category GeneralSnackthoughts Interview: Category General
Snackthoughts Interview: Category General
snackthoughts
 

Viewers also liked (20)

Toast 2015 qiime_talk2
Toast 2015 qiime_talk2Toast 2015 qiime_talk2
Toast 2015 qiime_talk2
 
Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...
Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...
Policy Brief-Costly Disease: How to reduce out of pocket expenditure in Diabe...
 
Progetto EPI.CA. Report riassuntivo semplificato
Progetto EPI.CA. Report riassuntivo semplificatoProgetto EPI.CA. Report riassuntivo semplificato
Progetto EPI.CA. Report riassuntivo semplificato
 
EPI.CA epidemiologia del cancro nella città di Casoria (NA)
EPI.CA epidemiologia del cancro nella città di Casoria (NA)EPI.CA epidemiologia del cancro nella città di Casoria (NA)
EPI.CA epidemiologia del cancro nella città di Casoria (NA)
 
Dimensioning, Weighing and Scanning (DWS) System
Dimensioning, Weighing and Scanning (DWS) SystemDimensioning, Weighing and Scanning (DWS) System
Dimensioning, Weighing and Scanning (DWS) System
 
EPI.CA Casoria per le scuole
EPI.CA Casoria per le scuoleEPI.CA Casoria per le scuole
EPI.CA Casoria per le scuole
 
Toast 2015 qiime_talk
Toast 2015 qiime_talkToast 2015 qiime_talk
Toast 2015 qiime_talk
 
Lcloud on aws re invent 2016 - amazon web services
Lcloud on aws re invent 2016 - amazon web servicesLcloud on aws re invent 2016 - amazon web services
Lcloud on aws re invent 2016 - amazon web services
 
BEST Courses
BEST CoursesBEST Courses
BEST Courses
 
M.J Magwadi Research final draft
M.J Magwadi Research final draftM.J Magwadi Research final draft
M.J Magwadi Research final draft
 
BEST courses
BEST coursesBEST courses
BEST courses
 
20150223135848514
2015022313584851420150223135848514
20150223135848514
 
Literate environment presentation by Andrea Lewis
Literate environment presentation by Andrea LewisLiterate environment presentation by Andrea Lewis
Literate environment presentation by Andrea Lewis
 
Entorno a la cultura escrita
Entorno a la cultura escritaEntorno a la cultura escrita
Entorno a la cultura escrita
 
autodome slideshow
autodome slideshowautodome slideshow
autodome slideshow
 
Estructura de la pirámide de Hans Kelsen aplicada en el Perú
Estructura de la pirámide de Hans Kelsen aplicada en el PerúEstructura de la pirámide de Hans Kelsen aplicada en el Perú
Estructura de la pirámide de Hans Kelsen aplicada en el Perú
 
Giant panda
Giant pandaGiant panda
Giant panda
 
Fierul si cuprul lectie
Fierul si cuprul  lectieFierul si cuprul  lectie
Fierul si cuprul lectie
 
Licor de miel
Licor de mielLicor de miel
Licor de miel
 
Snackthoughts Interview: Category General
Snackthoughts Interview: Category GeneralSnackthoughts Interview: Category General
Snackthoughts Interview: Category General
 

Similar to REST: The Most Misunderstood Software Architecture Ever

Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2
Sumy PHP User Grpoup
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
Tatiana Al-Chueyr
 
Together Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with HypermediaTogether Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with Hypermedia
Vladimir Tsukur
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
TurnToTech
 
Unerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIsUnerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIs
SocialDevCamp Chicago
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
Sudheer Satyanarayana
 
REST and the Hypermedia Constraint
REST and the Hypermedia ConstraintREST and the Hypermedia Constraint
REST and the Hypermedia ConstraintInviqa
 
TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...
TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...
TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...Terminalfour
 
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
POX to HATEOAS: Our Company's Journey Building a Hypermedia APIPOX to HATEOAS: Our Company's Journey Building a Hypermedia API
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
Luke Stokes
 
Building Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRSBuilding Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRS
Derek Comartin
 
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Pete Morano
 
Building Self Documenting REST APIs
Building Self Documenting REST APIsBuilding Self Documenting REST APIs
Building Self Documenting REST APIs
Yan Pritzker
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTOWordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTO
Roy Sivan
 
Cqrs api
Cqrs apiCqrs api
Cqrs api
Brandon Mueller
 
OAuth and REST web services
OAuth and REST web servicesOAuth and REST web services
OAuth and REST web services
sullis
 
Getting Started with API Management
Getting Started with API ManagementGetting Started with API Management
Getting Started with API Management
Revelation Technologies
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)
Sascha Wenninger
 
Talking to 25% of the web - In-depth report and analysis on the WordPress RES...
Talking to 25% of the web - In-depth report and analysis on the WordPress RES...Talking to 25% of the web - In-depth report and analysis on the WordPress RES...
Talking to 25% of the web - In-depth report and analysis on the WordPress RES...
Stephane Beladaci
 
RESTful services
RESTful servicesRESTful services
RESTful servicesgouthamrv
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
rainynovember12
 

Similar to REST: The Most Misunderstood Software Architecture Ever (20)

Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
Together Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with HypermediaTogether Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with Hypermedia
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Unerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIsUnerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIs
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
 
REST and the Hypermedia Constraint
REST and the Hypermedia ConstraintREST and the Hypermedia Constraint
REST and the Hypermedia Constraint
 
TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...
TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...
TERMINALFOUR t44u 2008 - Piero Tintori - Integration Publishing To Share Poin...
 
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
POX to HATEOAS: Our Company's Journey Building a Hypermedia APIPOX to HATEOAS: Our Company's Journey Building a Hypermedia API
POX to HATEOAS: Our Company's Journey Building a Hypermedia API
 
Building Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRSBuilding Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRS
 
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
 
Building Self Documenting REST APIs
Building Self Documenting REST APIsBuilding Self Documenting REST APIs
Building Self Documenting REST APIs
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTOWordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTO
 
Cqrs api
Cqrs apiCqrs api
Cqrs api
 
OAuth and REST web services
OAuth and REST web servicesOAuth and REST web services
OAuth and REST web services
 
Getting Started with API Management
Getting Started with API ManagementGetting Started with API Management
Getting Started with API Management
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)
 
Talking to 25% of the web - In-depth report and analysis on the WordPress RES...
Talking to 25% of the web - In-depth report and analysis on the WordPress RES...Talking to 25% of the web - In-depth report and analysis on the WordPress RES...
Talking to 25% of the web - In-depth report and analysis on the WordPress RES...
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 

Recently uploaded

Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 

Recently uploaded (20)

Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 

REST: The Most Misunderstood Software Architecture Ever

  • 1. REST The Most Misunderstood Software Architecture Ever Martín Soto February 17, 2015
  • 2. REST ● REpresentational State Transfer ● Roy Fielding, 2000 ● Deeply misunderstood! Many systems (mostly APIs) claim to be REST(ful), few really are. ● Abstraction of the World Wide Web.
  • 3.
  • 4. Richardson’s REST Maturity Model http://martinfowler.com/articles/richardsonMaturityModel.html
  • 5. Level 0: Plain, Old RPC http://martinfowler.com/articles/richardsonMaturityModel.html Plain, Old Remote Procedure Call (RPC)
  • 6. Level 0: Remote Procedure Call (RPC) Caller Callee Procedure call Return value Caller execution Caller continues Procedure execution Network Corba DCOM java RMI ... HTTP Level 0
  • 7. Level 0: RPC over HTTP ● Only one URL (e.g., http://example. com/api/v1) ● Procedure name and parameters passed as request payload. ● Return value returned as response.
  • 8. Level 0: Example Amazon Elastic Computing Cloud (EC2) API
  • 10. Level 1: Resources Company 1 Company 7 Company 33 User 4 User 28 User 13 User 5 User 62 User 44 User 99 User 63 Security policy 22 Security policy 85 http://api.com/companies/1 http://api.com/users/63 http://api.com/policies/85 http://api.com/companies/33 http://api.com/companies/7 http://api.com/users/63http://api.com/users/63 http://api.com/users/63 http://api.com/users/63 http://api.com/users/63 http://api.com/users/63 http://api.com/users/63 http://api.com/policies/85
  • 11. Level 2: HTTP Verbs http://martinfowler.com/articles/richardsonMaturityModel.html
  • 12. Level 2: HTTP Methods POST Create new resource (when POSTing to a collection) or execute especial operation on resource. GET Read the contents of resource (the resource representation) PUT Upload new resource contents replacing any previous contents. Also, create a resource if previously nonexistent. DELETE Delete the resource.
  • 13. Level 2: Example Google Calendar API
  • 16. Hypertext: HTML <HTML> <HEAD> <TITLE>Your Title Here</TITLE> </HEAD> <BODY BGCOLOR="FFFFFF"> <CENTER><IMG SRC="clouds.jpg" ALIGN=" BOTTOM"> </CENTER> <HR> <a href="http://somegreatsite.com">Link Name</a> is a link to another nifty site <H1>This is a Header</H1> <H2>This is a Medium Header</H2> Send me mail at <a href="mailto: support@yourcompany.com"> support@yourcompany.com</a>. <P> This is a new paragraph! <P> <B>This is a new paragraph!</B> <BR> <B><I>This is a new sentence without a paragraph break, in bold italics. </I></B> <HR> </BODY> </HTML>
  • 18.
  • 19. HATEOAS Hypertext As The Engine of Application State
  • 20. “What needs to be done to make the REST architectural style clear on the notion that hypertext is a constraint? In other words, if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed? Roy Fielding http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
  • 22. Hypermedia for Data APIs The Web <HTML> <HEAD> <TITLE>Your Title Here</TITLE> </HEAD> <BODY BGCOLOR="FFFFFF"> <CENTER><IMG SRC="clouds.jpg" ALIGN=" BOTTOM"> </CENTER> <HR> <a href="http://somegreatsite.com">Link Name</a> is a link to another nifty site <H1>This is a Header</H1> <H2>This is a Medium Header</H2> ... Data APIs ?
  • 23. Example Putting Hypermedia to Good Use: Regional Privacy EU Web Service US Web Service CN Web Service
  • 24. What we got from hypermedia API is independent of data location We were able to introduce this structure without breaking our API contract: Resource location becomes an implementation detail Data privacy becomes evident Customers can verify where their data is located by just looking at the requests their clients are running. All customers can be handled equally As long as you stick to a format, you can serve it from wherever you like and clients will handle it. API Versioning We can evolve the API by providing new fields pointing to new resources or formats. As long as the older fields are preserved, older clients will continue to work.
  • 25. Example Federated Systems: Initial System Relational DB (MySQL)
  • 26. Example Federated Systems: Fast Caching Relational DB (e.g., MySQL) Key-value Store (e.g., Redis)
  • 27. Example Federated Systems: Microservices Microservice 1 Microservice 2 Microservice 3
  • 28. Example Federated Systems: SaaS Customer 1 Customer 2 Customer 3 High-capacity cloud instance Low-capacity cloud instance In-premise, dedicated hardware
  • 29. The (Not-So-Exiting) Present ● Many more APIs are going the hypermedia way GitHub, Nike, PayPal. ● Documentation for popular APIs still specifies URLs API providers make resource locations part of the API contract probably to appease programmers. ● Server frameworks and client libraries are getting better at hypermedia The improvement has been significant in the last two or three years.
  • 31. Thanks! ...and welcome to the discussion Martín Soto @msotoweb donsoto@gmail.com http://martinsoto.co
  • 32. Credits Presentation template by SlidesCarnival “Linked Web” picture courtesy Chris 73 / Wikimedia Commons, shared under Creative Commons Attribution-Share Alike 3.0. World map outline © Copyright Showeet.com, CC Attribution. For other credits, follow the links on the corresponding slides.