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

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

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