SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Coming to REST: Basic Stuff
@maxgoff
BIG SMART DATA
Coming to REST:
BIG SMART DATA
⁻ What is REST
⁻ REST Design Principles
⁻ REST Architecture Components
⁻ REST Design Guidelines
What is REST?
̵ Representational State Transfer
̵ Web Services Design Principles
̵ Focus: System’s Resources
̵ Simple HTTP transfer
̵ Lightweight alternative to RPC and
Web Services (SOAP, WSDL)
̵ Effectively replaced SOAP and WSDL
BIG SMART DATA
REST Origin: Doctoral Dissertation of Roy Thomas Fielding, PhD
What is REST?
̵ Platform Independent
̵ Language Independent
̵ Standards Based (HTTP)
̵ Can be used in the presence of firewalls
̵ REST is NOT a “standard”
BIG SMART DATA
Someone Special
345 Some Address
Some URL, WWW
127.0.0.1
Some Sender
012 Traceback Street
Some URL, WWW
198.168.1.1
Someone Special
345 Some Address
Some URL, WWW
127.0.0.1
REST vs SOAP
⁻ No envelope
⁻ Easier to handle
⁻ Waste less resources
BUT as secure(able) as SOAP
What is REST?
Four Basic Design Principles:
1) Use HTTP methods explicitly
2) Be stateless
3) Expose directory structure-like URLs
4) Transfer: XML, JSON, or both
BIG SMART DATA
REST Design Principles
Explicit HTTP methods:
BIG SMART DATA
CRUD Operation ≈ HTTP method ≈ SQL Equivalent
CREATE (resource on server) POST INSERT
READ (retrieve resource) GET SELECT
UPDATE (change or modify) PUT UPDATE
DELETE (destroy resource) DELETE DELETE
REST Design Principles
NOT a standard but a good idea
Be stateless:
BIG SMART DATA
Fig 1. Stateful design = bad
Source: http://www.ibm.com/developerworks/webservices/library/ws-restful
REST Design Principles
Be stateless:
BIG SMART DATA
Fig 2. Stateless design = good
Source: http://www.ibm.com/developerworks/webservices/library/ws-restful
Stateless design shifts the responsibility of maintaining
application state to the client
REST Design Principles
Expose directory structure-like URIs:
BIG SMART DATA
⁻ URI should be intuitive
⁻ Ideally, a self-documenting interface
⁻ Hierarchical, rooted at a single path
⁻ Design Affordance
REST Design Principles
Key components of REST architecture:
BIG SMART DATA
⁻ Resources
⁻ A web of resources
⁻ Client-server
⁻ No connection state
⁻ Resources should be cacheable
⁻ Proxy server friendly
REST Architecture Components
Resources:
BIG SMART DATA
⁻ Logical URLs: universally addressable
⁻ Key element of a true RESTful design
as opposed to “methods” or “services”
⁻ View object data as a resource
⁻ Resource contains all required information
or links to it
REST Architecture Components
A Web of Resources:
BIG SMART DATA
⁻ An arbitrary resource ought not be excessively
large and contain too fine-grained details
⁻ A resource ought to contain links to
additional information, just like a web page
REST Architecture Components
Client-Server:
BIG SMART DATA
⁻ Simple client-server assumption
⁻ One component’s server can be another
component’s client
REST Architecture Components
No Connection State:
BIG SMART DATA
⁻ Interaction is stateless
⁻ Servers and resources can be stateful
⁻ Each request carries all required information
⁻ No reliance on previous interactions
REST Architecture Components
Cacheable:
BIG SMART DATA
⁻ Resources should be cacheable
(when possible)
⁻ Protocols must allow server to specify
⁻ HTTP/HTTPS universally used
REST Architecture Components
Proxy servers:
⁻ Any standard HTTP proxy can be used
BIG SMART DATA
⁻ URLs
⁻ Queries
⁻ Documentation
⁻ GET v POST
⁻ Best Practices
REST Design Guidelines
BIG SMART DATA
⁻ Do not use “physical” URLs
⁻ Use logical URLs
REST Design Guidelines
URLs:
http://www.bigsmartdata.com/inventory/product123.xml
http://www.bigsmartdata.com/inventory/product/123
BIG SMART DATA
⁻ Should not return an overload of data
⁻ If needed, provide a paging mechanism:
eg: a “product list” GET request
returns the first N products
with next/prev links
REST Design Guidelines
Queries:
BIG SMART DATA
⁻ REST response can be anything, but …
⁻ APIs should be well documented
⁻ Do not change output format lightly
⁻ REMEMBER: Non-human clients
⁻ If output is XML, document with
schema or DTD
REST Design Guidelines
Documentation:
BIG SMART DATA
⁻ GET requests should never cause
a state change
⁻ Anything causing server state change
should be POST or other HTTP verbs
REST Design Guidelines
GET v POST:
BIG SMART DATA
⁻ Returns Include Actual URLs
⁻ instead of:
http://bigsmartdata.com/product/PRODUCT_ID
⁻ return:
http://bigsmartdata.com/product/012345 ...
REST Design Guidelines
Best Practices:
Output is larger but clients are more
easily directed to new URLs as needed
BIG SMART DATA
⁻ Keep Things Simple
⁻ Use 2 Base URLs per resource
⁻ Two fundamental abstractions:
⁻ Collections (Collection Resource)
⁻ Elements within Collections
(Instance Resource)
⁻ Use Ordinal Numbers for Versions
REST Design Guidelines
Best Practices:
BIG SMART DATA
⁻ Nouns are the new verbs
⁻ Use a noun to describe the action
⁻ The noun is the resource:
REST Design Guidelines
Best Practices:
Verb based Noun based
The project is validated by owner A project validation is created
The user deactivates the account A user account activation is deleted
A user subscribes to a group A subscription is created
RESTful Resources
Tutorials:
Pearson College “Learn REST”:
http://www.restapitutorial.com
Apigee YouTube Channel:
http://www.youtube.com/user/apigee
Learn REST:
http://rest.elkstein.org/
Resources:
IBM Developer Works:
http://www.ibm.com/developerworks/webservices/library/ws-restful/
HTTP Status Codes:
http://httpstatus.es/
Original Dissertation:
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
BIG SMART DATA
http://about.me/maxgoff
http://linkedin.com/in/maxgoff
http://bigsmartdata.com
@maxgoff
BIG SMART DATA

Weitere ähnliche Inhalte

Was ist angesagt?

Power BI For SharePointAdminsSLC
Power BI For SharePointAdminsSLCPower BI For SharePointAdminsSLC
Power BI For SharePointAdminsSLCSteve Pucelik
 
Amundsen at Brex and Looker integration
Amundsen at Brex and Looker integrationAmundsen at Brex and Looker integration
Amundsen at Brex and Looker integrationmarkgrover
 
REA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and AmundsenREA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and Amundsenmarkgrover
 
Apache atlas sydney 2017-v4
Apache atlas   sydney 2017-v4Apache atlas   sydney 2017-v4
Apache atlas sydney 2017-v4Nigel Jones
 
Metadata, Open Access and More: Crossref presentation
Metadata, Open Access and More: Crossref presentationMetadata, Open Access and More: Crossref presentation
Metadata, Open Access and More: Crossref presentationCrossref
 
A Complete BI Solution in About an Hour!
A Complete BI Solution in About an Hour!A Complete BI Solution in About an Hour!
A Complete BI Solution in About an Hour!Aaron King
 
No sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_ppNo sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_ppMongoDB
 
IndexedDB - An Efficient Way to Manage Data
IndexedDB - An Efficient Way to Manage DataIndexedDB - An Efficient Way to Manage Data
IndexedDB - An Efficient Way to Manage Datasara stanford
 
Original Working Draft of Bancha Project
Original Working Draft of Bancha ProjectOriginal Working Draft of Bancha Project
Original Working Draft of Bancha ProjectRolandSchuetz
 
All Aboard the Boxcar! Going Beyond the Basics of REST
All Aboard the Boxcar! Going Beyond the Basics of RESTAll Aboard the Boxcar! Going Beyond the Basics of REST
All Aboard the Boxcar! Going Beyond the Basics of RESTPat Patterson
 
Hap clojure berlin 2015
Hap clojure berlin 2015Hap clojure berlin 2015
Hap clojure berlin 2015alexanderkiel
 
Semi Structured Data
Semi Structured DataSemi Structured Data
Semi Structured DataMariaDB plc
 
From discovering to trusting data
From discovering to trusting dataFrom discovering to trusting data
From discovering to trusting datamarkgrover
 
Toronto OpenRefine MeetUp Nov 2015
Toronto OpenRefine MeetUp Nov 2015Toronto OpenRefine MeetUp Nov 2015
Toronto OpenRefine MeetUp Nov 2015Martin Magdinier
 
Heuristics for Fixing Common Errors in Deployed schema.org Microdata
Heuristics for Fixing Common Errors in Deployed schema.org MicrodataHeuristics for Fixing Common Errors in Deployed schema.org Microdata
Heuristics for Fixing Common Errors in Deployed schema.org MicrodataRobert Meusel
 

Was ist angesagt? (19)

Power BI For SharePointAdminsSLC
Power BI For SharePointAdminsSLCPower BI For SharePointAdminsSLC
Power BI For SharePointAdminsSLC
 
Amundsen at Brex and Looker integration
Amundsen at Brex and Looker integrationAmundsen at Brex and Looker integration
Amundsen at Brex and Looker integration
 
REA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and AmundsenREA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and Amundsen
 
Apache atlas sydney 2017-v4
Apache atlas   sydney 2017-v4Apache atlas   sydney 2017-v4
Apache atlas sydney 2017-v4
 
Metadata, Open Access and More: Crossref presentation
Metadata, Open Access and More: Crossref presentationMetadata, Open Access and More: Crossref presentation
Metadata, Open Access and More: Crossref presentation
 
A Complete BI Solution in About an Hour!
A Complete BI Solution in About an Hour!A Complete BI Solution in About an Hour!
A Complete BI Solution in About an Hour!
 
No sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_ppNo sql mongodb_publicsector2014_pp
No sql mongodb_publicsector2014_pp
 
Rest api-basic
Rest api-basicRest api-basic
Rest api-basic
 
Reasoned SPARQL
Reasoned SPARQLReasoned SPARQL
Reasoned SPARQL
 
IndexedDB - An Efficient Way to Manage Data
IndexedDB - An Efficient Way to Manage DataIndexedDB - An Efficient Way to Manage Data
IndexedDB - An Efficient Way to Manage Data
 
Original Working Draft of Bancha Project
Original Working Draft of Bancha ProjectOriginal Working Draft of Bancha Project
Original Working Draft of Bancha Project
 
All Aboard the Boxcar! Going Beyond the Basics of REST
All Aboard the Boxcar! Going Beyond the Basics of RESTAll Aboard the Boxcar! Going Beyond the Basics of REST
All Aboard the Boxcar! Going Beyond the Basics of REST
 
Hap clojure berlin 2015
Hap clojure berlin 2015Hap clojure berlin 2015
Hap clojure berlin 2015
 
Semi Structured Data
Semi Structured DataSemi Structured Data
Semi Structured Data
 
Html 5 Overview
Html 5 OverviewHtml 5 Overview
Html 5 Overview
 
From discovering to trusting data
From discovering to trusting dataFrom discovering to trusting data
From discovering to trusting data
 
Toronto OpenRefine MeetUp Nov 2015
Toronto OpenRefine MeetUp Nov 2015Toronto OpenRefine MeetUp Nov 2015
Toronto OpenRefine MeetUp Nov 2015
 
Introducing Xapian
Introducing XapianIntroducing Xapian
Introducing Xapian
 
Heuristics for Fixing Common Errors in Deployed schema.org Microdata
Heuristics for Fixing Common Errors in Deployed schema.org MicrodataHeuristics for Fixing Common Errors in Deployed schema.org Microdata
Heuristics for Fixing Common Errors in Deployed schema.org Microdata
 

Ähnlich wie Coming to REST

REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfAparna Sharma
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanJexia
 
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
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfAparna Sharma
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Serverswebhostingguy
 
Modeling REST API's Behaviour with Text, Graphics or Both?
Modeling REST API's Behaviour with Text, Graphics or Both?Modeling REST API's Behaviour with Text, Graphics or Both?
Modeling REST API's Behaviour with Text, Graphics or Both?Ana Ivanchikj
 
Pragmatic REST APIs
Pragmatic REST APIsPragmatic REST APIs
Pragmatic REST APIsamesar0
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesRestlet
 
Introduction server Construction
Introduction server ConstructionIntroduction server Construction
Introduction server ConstructionJisu Park
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 

Ähnlich wie Coming to REST (20)

REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Restful web services
Restful web servicesRestful web services
Restful web services
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
 
RESTful APIs
RESTful APIsRESTful APIs
RESTful APIs
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel Mardjan
 
Unerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIsUnerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIs
 
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)
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
 
Rest api design
Rest api designRest api design
Rest api design
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
Modeling REST API's Behaviour with Text, Graphics or Both?
Modeling REST API's Behaviour with Text, Graphics or Both?Modeling REST API's Behaviour with Text, Graphics or Both?
Modeling REST API's Behaviour with Text, Graphics or Both?
 
Pragmatic REST APIs
Pragmatic REST APIsPragmatic REST APIs
Pragmatic REST APIs
 
HDP Next: Governance
HDP Next: GovernanceHDP Next: Governance
HDP Next: Governance
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 
Introduction server Construction
Introduction server ConstructionIntroduction server Construction
Introduction server Construction
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 

Kürzlich hochgeladen

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
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...Orbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
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, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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 connectorsNanddeep Nachan
 
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 REVIEWERMadyBayot
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
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 2024Victor Rentea
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Kürzlich hochgeladen (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
+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...
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Coming to REST

  • 1. Coming to REST: Basic Stuff @maxgoff BIG SMART DATA
  • 2. Coming to REST: BIG SMART DATA ⁻ What is REST ⁻ REST Design Principles ⁻ REST Architecture Components ⁻ REST Design Guidelines
  • 3. What is REST? ̵ Representational State Transfer ̵ Web Services Design Principles ̵ Focus: System’s Resources ̵ Simple HTTP transfer ̵ Lightweight alternative to RPC and Web Services (SOAP, WSDL) ̵ Effectively replaced SOAP and WSDL BIG SMART DATA REST Origin: Doctoral Dissertation of Roy Thomas Fielding, PhD
  • 4. What is REST? ̵ Platform Independent ̵ Language Independent ̵ Standards Based (HTTP) ̵ Can be used in the presence of firewalls ̵ REST is NOT a “standard” BIG SMART DATA
  • 5. Someone Special 345 Some Address Some URL, WWW 127.0.0.1 Some Sender 012 Traceback Street Some URL, WWW 198.168.1.1 Someone Special 345 Some Address Some URL, WWW 127.0.0.1 REST vs SOAP ⁻ No envelope ⁻ Easier to handle ⁻ Waste less resources BUT as secure(able) as SOAP What is REST?
  • 6. Four Basic Design Principles: 1) Use HTTP methods explicitly 2) Be stateless 3) Expose directory structure-like URLs 4) Transfer: XML, JSON, or both BIG SMART DATA REST Design Principles
  • 7. Explicit HTTP methods: BIG SMART DATA CRUD Operation ≈ HTTP method ≈ SQL Equivalent CREATE (resource on server) POST INSERT READ (retrieve resource) GET SELECT UPDATE (change or modify) PUT UPDATE DELETE (destroy resource) DELETE DELETE REST Design Principles NOT a standard but a good idea
  • 8. Be stateless: BIG SMART DATA Fig 1. Stateful design = bad Source: http://www.ibm.com/developerworks/webservices/library/ws-restful REST Design Principles
  • 9. Be stateless: BIG SMART DATA Fig 2. Stateless design = good Source: http://www.ibm.com/developerworks/webservices/library/ws-restful Stateless design shifts the responsibility of maintaining application state to the client REST Design Principles
  • 10. Expose directory structure-like URIs: BIG SMART DATA ⁻ URI should be intuitive ⁻ Ideally, a self-documenting interface ⁻ Hierarchical, rooted at a single path ⁻ Design Affordance REST Design Principles
  • 11. Key components of REST architecture: BIG SMART DATA ⁻ Resources ⁻ A web of resources ⁻ Client-server ⁻ No connection state ⁻ Resources should be cacheable ⁻ Proxy server friendly REST Architecture Components
  • 12. Resources: BIG SMART DATA ⁻ Logical URLs: universally addressable ⁻ Key element of a true RESTful design as opposed to “methods” or “services” ⁻ View object data as a resource ⁻ Resource contains all required information or links to it REST Architecture Components
  • 13. A Web of Resources: BIG SMART DATA ⁻ An arbitrary resource ought not be excessively large and contain too fine-grained details ⁻ A resource ought to contain links to additional information, just like a web page REST Architecture Components
  • 14. Client-Server: BIG SMART DATA ⁻ Simple client-server assumption ⁻ One component’s server can be another component’s client REST Architecture Components
  • 15. No Connection State: BIG SMART DATA ⁻ Interaction is stateless ⁻ Servers and resources can be stateful ⁻ Each request carries all required information ⁻ No reliance on previous interactions REST Architecture Components
  • 16. Cacheable: BIG SMART DATA ⁻ Resources should be cacheable (when possible) ⁻ Protocols must allow server to specify ⁻ HTTP/HTTPS universally used REST Architecture Components Proxy servers: ⁻ Any standard HTTP proxy can be used
  • 17. BIG SMART DATA ⁻ URLs ⁻ Queries ⁻ Documentation ⁻ GET v POST ⁻ Best Practices REST Design Guidelines
  • 18. BIG SMART DATA ⁻ Do not use “physical” URLs ⁻ Use logical URLs REST Design Guidelines URLs: http://www.bigsmartdata.com/inventory/product123.xml http://www.bigsmartdata.com/inventory/product/123
  • 19. BIG SMART DATA ⁻ Should not return an overload of data ⁻ If needed, provide a paging mechanism: eg: a “product list” GET request returns the first N products with next/prev links REST Design Guidelines Queries:
  • 20. BIG SMART DATA ⁻ REST response can be anything, but … ⁻ APIs should be well documented ⁻ Do not change output format lightly ⁻ REMEMBER: Non-human clients ⁻ If output is XML, document with schema or DTD REST Design Guidelines Documentation:
  • 21. BIG SMART DATA ⁻ GET requests should never cause a state change ⁻ Anything causing server state change should be POST or other HTTP verbs REST Design Guidelines GET v POST:
  • 22. BIG SMART DATA ⁻ Returns Include Actual URLs ⁻ instead of: http://bigsmartdata.com/product/PRODUCT_ID ⁻ return: http://bigsmartdata.com/product/012345 ... REST Design Guidelines Best Practices: Output is larger but clients are more easily directed to new URLs as needed
  • 23. BIG SMART DATA ⁻ Keep Things Simple ⁻ Use 2 Base URLs per resource ⁻ Two fundamental abstractions: ⁻ Collections (Collection Resource) ⁻ Elements within Collections (Instance Resource) ⁻ Use Ordinal Numbers for Versions REST Design Guidelines Best Practices:
  • 24. BIG SMART DATA ⁻ Nouns are the new verbs ⁻ Use a noun to describe the action ⁻ The noun is the resource: REST Design Guidelines Best Practices: Verb based Noun based The project is validated by owner A project validation is created The user deactivates the account A user account activation is deleted A user subscribes to a group A subscription is created
  • 25. RESTful Resources Tutorials: Pearson College “Learn REST”: http://www.restapitutorial.com Apigee YouTube Channel: http://www.youtube.com/user/apigee Learn REST: http://rest.elkstein.org/ Resources: IBM Developer Works: http://www.ibm.com/developerworks/webservices/library/ws-restful/ HTTP Status Codes: http://httpstatus.es/ Original Dissertation: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm BIG SMART DATA