SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Representational
State
Transfer
Rodrigo D. A. Senra
EMC BRDC TechTalk
Overview
• Roy Fielding’s Vision
• ReST = URI + HTTP + Hypermedia
• API Design
• Success Stories
• Q & A
ReST for a minute
What: Representational State Transfer (REST) architectural style
Who: Roy Thomas Fielding
When: 2000
Where: Chapter 5, Ph.D. dissertation: “Architectural Styles and the Design of Network-based Software Architectures”
Why: need for blueprints to guide the design and development of the architecture for the modern Web
• scalable component interactions
• general and uniform interfaces
• self-descriptive representations
• independent deployable components
• reduced interaction latency
• enforced security
• able to encapsulate legacy systems
How: HTTP + URI + (Client Pull - Resolver - [Cache] - Stateless [Tunnel] - Server ) = ULCODC$SS
Patterns
• (Uniform) Pipe and Filters
• Replicated Repository
• Cache$
• Client Server
• Layered Systems
• Remote Session
• Remote Data Access
• Mobile Code Styles
• Virtual Machine
• Remote Evaluation
• Code on Demand
• Mobile Agent
• Event-based Integration
• (Brokered) Distributed Objects
from Roy Fielding’s Dissertation
Evaluation Criteria
•modifiability
•evolvability
•extensibility
•customizability
•configurability
•reusability
•simplicity
•scalability
•portability
•reliability
•visibility
from Roy Fielding’s Dissertation
Connectors != Components
from A Guide to REST and API Design
Solve problems
in unique ways
public andstandardized
from Roy Fielding’s Dissertation
from A Guide to REST and API Design
Data Structure
Data Element Examples
resource conceptual target of a hypertext reference
resource identifier URI (URN or URL)
resource metadata source link, alternates, vary, …
representation HTML, XML, JSON, JPG,…
representation metadata media-type, last-modified,…
control data if-modified-since, cache-control,…
$ curl -i -X HEAD http://stackoverflow.com/questions/4913343/what-is-the-difference-between-uri-url-and-urn
HTTP/1.1 200 OK
Cache-Control: public, no-cache="Set-Cookie", max-age=60
Content-Length: 92646
Content-Type: text/html; charset=utf-8
Expires: Thu, 12 Mar 2015 23:42:26 GMT
Last-Modified: Thu, 12 Mar 2015 23:41:26 GMT
Vary: *
X-Frame-Options: SAMEORIGIN
X-Request-Guid: 8f94e452-513b-43fb-958d-5de2aa67a557
Set-Cookie: prov=aa08df12-afe7-4073-928f-a09504693cc5; domain=.stackoverflow.com;
7 Steps to API design
1.List all data elements clients might need
2.Draw state diagrams (actions)
3.Reconcile Magic Strings (schema.org, DC, FOAF,…)
4.Select Media-types (html, xml, json, csv, hdf5,…)
5.Create a semantic profile (WSDL, WADL, APP, RAML,
Swagger,/ALPS,Json-LD, Json-Schema Hydra)
6. Write the code
7.Publish the API
from A Web API Design Methodology - Mike Amundsen
Some RESTful APIs
• Amazon S3
• Google DoubleClick Ad Exchange Buyer
• Google YouTube
• Twitter
• Twilio Voice and SMS
• Netflix API (2014/11)
• Facebook Graph
• EMC Isilon OneFS
Isilon REST API Example
The following request creates an access point named 'accesspoint1' on the namespace.
PUT /namespace/accesspoint1 HTTP/1.1
Host my_cluster:8080
Date: Fri, 15 Mar 2013 21:51:50 GMT
Content-Type: text/xml
{
"path": “/ifs/home/"
}
Example response
HTTP/1.1 200 OK
Date: Fri, 15 Mar 2013 21:51:50 GMT
Server: Apache/2.2.21 (FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8x
Allow: DELETE, GET, HEAD, POST, PUT, OPTIONS
x-isi-ifs-spec-version: 1.0
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=15, max=335
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain
Facebook Graph API - https://developers.facebook.com/tools/explorer
The Graph API is the primary way to get data in and out of Facebook's
platform. It's a low-level HTTP-based API that you can use to query
data, post new stories, manage ads, upload photos and a variety of
other tasks that an app might need to do
Brainiak is …
• 100% Python
•API RESTful
• Hypermedia (HATEOAS)
• Json-schema ☜☞ RDF
Architecture
Legacy Virtuosos
Solr
Bus
Replicator
Authentication & Authorization
Backstage
Eureka VoceDaNota A-Z Sitemaps CMAaS
Brainiak
ElasticSearch
Architecture
Query SPARQL
select ?id ?nome
from esportes:
where {
?id rdf:type esportes:Equipe .
?id rdfs:label ?nome .
}
/esportes/Equipe
Brainiak API
GET
Response
{
"items": [
{
"title": "Atlético-MG",
"@id": "http://semantica.globo.com/esportes/equipe/282",
"class_prefix": "esportes",
"resource_id": "282"
},
{
"title": "Bahia de Feira",
"@id": "http://semantica.globo.com/esportes/equipe/2590",
"class_prefix": "esportes",
"resource_id": "2590"
}[
],
"@id": "esportes:Equipe"
}
Schema
{
"links": [
{
"href": "/esportes/Equipe/_schema?class_prefix=http://semantica.globo.com/esportes/",
"method": "GET",
"rel": "class"
},
{
"href": "/esportes/Equipe?class_prefix=http://semantica.globo.com/esportes/",
"method": "POST",
"rel": "create",
"schema": {"$ref": "{+_base_url}"}
},
{
"href": "/_/_/_?instance_uri={value}",
"method": "GET",
"rel": "relatedInstance"
},
…
/esportes/Equipe/_schema
Hyper-map
Business Perspective
from eMag Web APIs from Start to Finish
"As a result of Data Enabled Disruption, many
of Amazon’s former competitors are now dead.
By utilizing APIs at all points of the data
lifecycle, Amazon is able to continuously
improve the accuracy, applicability, and
accessibility of its data. "
Jeff Bezos
As Yegge's recalls that one day Jeff Bezos issued a mandate, sometime back around
2002 (give or take a year):
All teams will henceforth expose their data and functionality through service
interfaces.
Teams must communicate with each other through these interfaces.
There will be no other form of inter-process communication allowed: no direct linking,
no direct reads of another team’s data store, no shared-memory model, no back-doors
whatsoever.
The only communication allowed is via service interface calls over the network.
It doesn’t matter what technology they use.
All service interfaces, without exception, must be designed from the ground up to be
externalizable. That is to say, the team must plan and design to be able to expose the
interface to developers in the outside world. No exceptions.
Anyone who doesn’t do this will be fired. Thank you; have a nice day!
from http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/
References


REST API Design Rulebook
Mark Masse (2011)

RESTful Web APIs
Leonard Richardson and Mike Amundsen
(2013)

REST APIs must be hypertext- driven

Roy T. Fielding: Untangled (2008)
RESTful Web Services
Leonard Richardson and Sam Ruby (2008)

HTTP Developer’s Handbook
Chris Shiflett (2003)

RESTful Web Services Cookbook
Subbu Allamaraju (2010)

Building Hypermedia APIs with HTML5 and Node

Mike Amundsen (2011)
Thank you.
Rodrigo Dias Arruda Senra
rodrigo.senra@emc.com
http://rodrigo.senra.nom.br
@rodsenra

Contenu connexe

Tendances

Web data from R
Web data from RWeb data from R
Web data from R
schamber
 
Resource Oriented Architectures
Resource Oriented ArchitecturesResource Oriented Architectures
Resource Oriented Architectures
Gabriele Lana
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
Li Yi
 
WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0
Jeffrey West
 
Functional Composition of Sensor Web APIs
Functional Composition of Sensor Web APIsFunctional Composition of Sensor Web APIs
Functional Composition of Sensor Web APIs
Ruben Verborgh
 
Consuming RESTful services in PHP
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHP
Zoran Jeremic
 
(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf
Guido Schmutz
 
CrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef WorkshopsCrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef Workshops
Crossref
 

Tendances (20)

Web data from R
Web data from RWeb data from R
Web data from R
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
 
Resource Oriented Architectures
Resource Oriented ArchitecturesResource Oriented Architectures
Resource Oriented Architectures
 
Arabidopsis Information Portal, Developer Workshop 2014, Introduction
Arabidopsis Information Portal, Developer Workshop 2014, IntroductionArabidopsis Information Portal, Developer Workshop 2014, Introduction
Arabidopsis Information Portal, Developer Workshop 2014, Introduction
 
Building Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET CoreBuilding Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET Core
 
Side by Side with Elasticsearch & Solr, Part 2
Side by Side with Elasticsearch & Solr, Part 2Side by Side with Elasticsearch & Solr, Part 2
Side by Side with Elasticsearch & Solr, Part 2
 
Introduction to RESTful Webservices in JAVA
Introduction to RESTful Webservices  in JAVA Introduction to RESTful Webservices  in JAVA
Introduction to RESTful Webservices in JAVA
 
httpie
httpiehttpie
httpie
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Introduction to RESTful Web Services
Introduction to RESTful Web ServicesIntroduction to RESTful Web Services
Introduction to RESTful Web Services
 
WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0WebLogic Developer Webcast 1: JPA 2.0
WebLogic Developer Webcast 1: JPA 2.0
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
How to create Treasure Data #dotsbigdata
How to create Treasure Data #dotsbigdataHow to create Treasure Data #dotsbigdata
How to create Treasure Data #dotsbigdata
 
Functional Composition of Sensor Web APIs
Functional Composition of Sensor Web APIsFunctional Composition of Sensor Web APIs
Functional Composition of Sensor Web APIs
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
 
A quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesA quick review of Python and Graph Databases
A quick review of Python and Graph Databases
 
Consuming RESTful services in PHP
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHP
 
Open Ldap Integration and Configuration with Lifray 6.2
Open Ldap Integration and Configuration with Lifray 6.2Open Ldap Integration and Configuration with Lifray 6.2
Open Ldap Integration and Configuration with Lifray 6.2
 
(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf(Big) Data Serialization with Avro and Protobuf
(Big) Data Serialization with Avro and Protobuf
 
CrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef WorkshopsCrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef Workshops
 

En vedette

En vedette (20)

Brainiak: Um plano maligno de dominação semântica hipermídia
Brainiak: Um plano maligno de dominação semântica hipermídiaBrainiak: Um plano maligno de dominação semântica hipermídia
Brainiak: Um plano maligno de dominação semântica hipermídia
 
Tech talk about iswc2013
Tech talk about iswc2013Tech talk about iswc2013
Tech talk about iswc2013
 
Rupy2014 - Show Pyrotécnico
Rupy2014 - Show PyrotécnicoRupy2014 - Show Pyrotécnico
Rupy2014 - Show Pyrotécnico
 
Python: Cabe no seu bolso, no seu micro, no seu cérebro.
Python: Cabe no seu bolso, no seu micro, no seu cérebro.Python: Cabe no seu bolso, no seu micro, no seu cérebro.
Python: Cabe no seu bolso, no seu micro, no seu cérebro.
 
Brainiak - uma API REST Hipermedia
Brainiak - uma API REST Hipermedia Brainiak - uma API REST Hipermedia
Brainiak - uma API REST Hipermedia
 
Cientista de Dados - A profissão mais sexy do século 21
Cientista de Dados - A profissão mais sexy do século 21Cientista de Dados - A profissão mais sexy do século 21
Cientista de Dados - A profissão mais sexy do século 21
 
Cientista de Dados
Cientista de DadosCientista de Dados
Cientista de Dados
 
Uma breve história no tempo...da computação
Uma breve história no tempo...da computaçãoUma breve história no tempo...da computação
Uma breve história no tempo...da computação
 
Organicer: Organizando informação com Python
Organicer: Organizando informação com PythonOrganicer: Organizando informação com Python
Organicer: Organizando informação com Python
 
Depurador onisciente
Depurador oniscienteDepurador onisciente
Depurador onisciente
 
Show Pyrotécnico - Keynote PythonBrasil[9] 2013
Show Pyrotécnico - Keynote PythonBrasil[9] 2013Show Pyrotécnico - Keynote PythonBrasil[9] 2013
Show Pyrotécnico - Keynote PythonBrasil[9] 2013
 
Cases de Python no 7Masters 2012
Cases de Python no 7Masters 2012Cases de Python no 7Masters 2012
Cases de Python no 7Masters 2012
 
Linked data at globo.com
Linked data at globo.comLinked data at globo.com
Linked data at globo.com
 
Rest, Gateway e Compiladores
Rest, Gateway e CompiladoresRest, Gateway e Compiladores
Rest, Gateway e Compiladores
 
Python: A Arma Secreta do Cientista de Dados
Python: A Arma Secreta do Cientista de DadosPython: A Arma Secreta do Cientista de Dados
Python: A Arma Secreta do Cientista de Dados
 
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
 
pa-pe-pi-po-pure Python Text Processing
pa-pe-pi-po-pure Python Text Processingpa-pe-pi-po-pure Python Text Processing
pa-pe-pi-po-pure Python Text Processing
 
REST presentation
REST presentationREST presentation
REST presentation
 
REST Presentation
REST PresentationREST Presentation
REST Presentation
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 

Similaire à Rest - Representational State Transfer (EMC BRDC Internal Tech talk)

Maya_Kamentcev_fullVersion_2016.docx
Maya_Kamentcev_fullVersion_2016.docxMaya_Kamentcev_fullVersion_2016.docx
Maya_Kamentcev_fullVersion_2016.docx
Maya Kamentcev
 
Syllabus for Technical courses
Syllabus for Technical coursesSyllabus for Technical courses
Syllabus for Technical courses
Montek1Learning
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
Rahul Singh
 
Zhen_Wu_Resume_V2
Zhen_Wu_Resume_V2Zhen_Wu_Resume_V2
Zhen_Wu_Resume_V2
Zhen Wu
 

Similaire à Rest - Representational State Transfer (EMC BRDC Internal Tech talk) (20)

Rahul 5yr java
Rahul 5yr javaRahul 5yr java
Rahul 5yr java
 
Building high performance
Building high performanceBuilding high performance
Building high performance
 
Final paper
Final paperFinal paper
Final paper
 
Gangadhar_Challa_Profile
Gangadhar_Challa_ProfileGangadhar_Challa_Profile
Gangadhar_Challa_Profile
 
Asp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume RemotelyAsp.Net_ Developer Resume Remotely
Asp.Net_ Developer Resume Remotely
 
MicroServices-Part-1.pdf
MicroServices-Part-1.pdfMicroServices-Part-1.pdf
MicroServices-Part-1.pdf
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
Maya_Kamentcev_fullVersion_2016.docx
Maya_Kamentcev_fullVersion_2016.docxMaya_Kamentcev_fullVersion_2016.docx
Maya_Kamentcev_fullVersion_2016.docx
 
Syllabus for Technical courses
Syllabus for Technical coursesSyllabus for Technical courses
Syllabus for Technical courses
 
성공적인 서비스로의 플랫폼 선택
성공적인 서비스로의 플랫폼 선택성공적인 서비스로의 플랫폼 선택
성공적인 서비스로의 플랫폼 선택
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Design
 
Application Security Workshop
Application Security Workshop Application Security Workshop
Application Security Workshop
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
 
Moran wsmx
Moran wsmxMoran wsmx
Moran wsmx
 
Serverless Computing with Azure Functions and Xamarin
Serverless Computing with Azure Functions and XamarinServerless Computing with Azure Functions and Xamarin
Serverless Computing with Azure Functions and Xamarin
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Zhen_Wu_Resume_V2
Zhen_Wu_Resume_V2Zhen_Wu_Resume_V2
Zhen_Wu_Resume_V2
 
Dev show september 8th 2020 power platform - not just a simple toy
Dev show september 8th 2020   power platform - not just a simple toyDev show september 8th 2020   power platform - not just a simple toy
Dev show september 8th 2020 power platform - not just a simple toy
 
Stanly_Bangalore_6_YearsExp_Dotnet -Wipro
Stanly_Bangalore_6_YearsExp_Dotnet -WiproStanly_Bangalore_6_YearsExp_Dotnet -Wipro
Stanly_Bangalore_6_YearsExp_Dotnet -Wipro
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Rest - Representational State Transfer (EMC BRDC Internal Tech talk)

  • 2. Overview • Roy Fielding’s Vision • ReST = URI + HTTP + Hypermedia • API Design • Success Stories • Q & A
  • 3. ReST for a minute What: Representational State Transfer (REST) architectural style Who: Roy Thomas Fielding When: 2000 Where: Chapter 5, Ph.D. dissertation: “Architectural Styles and the Design of Network-based Software Architectures” Why: need for blueprints to guide the design and development of the architecture for the modern Web • scalable component interactions • general and uniform interfaces • self-descriptive representations • independent deployable components • reduced interaction latency • enforced security • able to encapsulate legacy systems How: HTTP + URI + (Client Pull - Resolver - [Cache] - Stateless [Tunnel] - Server ) = ULCODC$SS
  • 4. Patterns • (Uniform) Pipe and Filters • Replicated Repository • Cache$ • Client Server • Layered Systems • Remote Session • Remote Data Access • Mobile Code Styles • Virtual Machine • Remote Evaluation • Code on Demand • Mobile Agent • Event-based Integration • (Brokered) Distributed Objects
  • 5. from Roy Fielding’s Dissertation
  • 7. from Roy Fielding’s Dissertation
  • 8. Connectors != Components from A Guide to REST and API Design Solve problems in unique ways public andstandardized
  • 9. from Roy Fielding’s Dissertation from A Guide to REST and API Design
  • 10. Data Structure Data Element Examples resource conceptual target of a hypertext reference resource identifier URI (URN or URL) resource metadata source link, alternates, vary, … representation HTML, XML, JSON, JPG,… representation metadata media-type, last-modified,… control data if-modified-since, cache-control,…
  • 11.
  • 12. $ curl -i -X HEAD http://stackoverflow.com/questions/4913343/what-is-the-difference-between-uri-url-and-urn HTTP/1.1 200 OK Cache-Control: public, no-cache="Set-Cookie", max-age=60 Content-Length: 92646 Content-Type: text/html; charset=utf-8 Expires: Thu, 12 Mar 2015 23:42:26 GMT Last-Modified: Thu, 12 Mar 2015 23:41:26 GMT Vary: * X-Frame-Options: SAMEORIGIN X-Request-Guid: 8f94e452-513b-43fb-958d-5de2aa67a557 Set-Cookie: prov=aa08df12-afe7-4073-928f-a09504693cc5; domain=.stackoverflow.com;
  • 13.
  • 14. 7 Steps to API design 1.List all data elements clients might need 2.Draw state diagrams (actions) 3.Reconcile Magic Strings (schema.org, DC, FOAF,…) 4.Select Media-types (html, xml, json, csv, hdf5,…) 5.Create a semantic profile (WSDL, WADL, APP, RAML, Swagger,/ALPS,Json-LD, Json-Schema Hydra) 6. Write the code 7.Publish the API from A Web API Design Methodology - Mike Amundsen
  • 15. Some RESTful APIs • Amazon S3 • Google DoubleClick Ad Exchange Buyer • Google YouTube • Twitter • Twilio Voice and SMS • Netflix API (2014/11) • Facebook Graph • EMC Isilon OneFS
  • 16. Isilon REST API Example The following request creates an access point named 'accesspoint1' on the namespace. PUT /namespace/accesspoint1 HTTP/1.1 Host my_cluster:8080 Date: Fri, 15 Mar 2013 21:51:50 GMT Content-Type: text/xml { "path": “/ifs/home/" } Example response HTTP/1.1 200 OK Date: Fri, 15 Mar 2013 21:51:50 GMT Server: Apache/2.2.21 (FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8x Allow: DELETE, GET, HEAD, POST, PUT, OPTIONS x-isi-ifs-spec-version: 1.0 Vary: Accept-Encoding Content-Encoding: gzip Keep-Alive: timeout=15, max=335 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/plain
  • 17. Facebook Graph API - https://developers.facebook.com/tools/explorer The Graph API is the primary way to get data in and out of Facebook's platform. It's a low-level HTTP-based API that you can use to query data, post new stories, manage ads, upload photos and a variety of other tasks that an app might need to do
  • 18. Brainiak is … • 100% Python •API RESTful • Hypermedia (HATEOAS) • Json-schema ☜☞ RDF
  • 20. Legacy Virtuosos Solr Bus Replicator Authentication & Authorization Backstage Eureka VoceDaNota A-Z Sitemaps CMAaS Brainiak ElasticSearch Architecture
  • 21. Query SPARQL select ?id ?nome from esportes: where { ?id rdf:type esportes:Equipe . ?id rdfs:label ?nome . }
  • 23. Response { "items": [ { "title": "Atlético-MG", "@id": "http://semantica.globo.com/esportes/equipe/282", "class_prefix": "esportes", "resource_id": "282" }, { "title": "Bahia de Feira", "@id": "http://semantica.globo.com/esportes/equipe/2590", "class_prefix": "esportes", "resource_id": "2590" }[ ], "@id": "esportes:Equipe" }
  • 24. Schema { "links": [ { "href": "/esportes/Equipe/_schema?class_prefix=http://semantica.globo.com/esportes/", "method": "GET", "rel": "class" }, { "href": "/esportes/Equipe?class_prefix=http://semantica.globo.com/esportes/", "method": "POST", "rel": "create", "schema": {"$ref": "{+_base_url}"} }, { "href": "/_/_/_?instance_uri={value}", "method": "GET", "rel": "relatedInstance" }, … /esportes/Equipe/_schema
  • 26.
  • 27.
  • 28. Business Perspective from eMag Web APIs from Start to Finish "As a result of Data Enabled Disruption, many of Amazon’s former competitors are now dead. By utilizing APIs at all points of the data lifecycle, Amazon is able to continuously improve the accuracy, applicability, and accessibility of its data. "
  • 29. Jeff Bezos As Yegge's recalls that one day Jeff Bezos issued a mandate, sometime back around 2002 (give or take a year): All teams will henceforth expose their data and functionality through service interfaces. Teams must communicate with each other through these interfaces. There will be no other form of inter-process communication allowed: no direct linking, no direct reads of another team’s data store, no shared-memory model, no back-doors whatsoever. The only communication allowed is via service interface calls over the network. It doesn’t matter what technology they use. All service interfaces, without exception, must be designed from the ground up to be externalizable. That is to say, the team must plan and design to be able to expose the interface to developers in the outside world. No exceptions. Anyone who doesn’t do this will be fired. Thank you; have a nice day! from http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/
  • 30. References 
 REST API Design Rulebook Mark Masse (2011)
 RESTful Web APIs Leonard Richardson and Mike Amundsen (2013)
 REST APIs must be hypertext- driven
 Roy T. Fielding: Untangled (2008) RESTful Web Services Leonard Richardson and Sam Ruby (2008)
 HTTP Developer’s Handbook Chris Shiflett (2003)
 RESTful Web Services Cookbook Subbu Allamaraju (2010)
 Building Hypermedia APIs with HTML5 and Node
 Mike Amundsen (2011)
  • 31. Thank you. Rodrigo Dias Arruda Senra rodrigo.senra@emc.com http://rodrigo.senra.nom.br @rodsenra