SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Web Services




       Web Service API : 80

         (Legacy) System
Web Services




       Web Service API : 80

         (Legacy) System
The Types of Web Services
Big Web Services
  WS-Notification
                   REST
  WS-Security
                   RPC style
  WSDL
                   REST-RPC hybrid
  SOAP
REST
RESTful Web Services
Representational State Transfer (REST) is a
    style of software architecture for
distributed hypermedia systems such as the
World Wide Web. The term Representational
    State Transfer was introduced and
    defined in 2000 by Roy Fielding in his
 doctoral dissertation. Fielding is one of
  the principal authors of the Hypertext
  Transfer Protocol (HTTP) specification
              versions 1.0 and 1.1.
Bookings

Application   HTTP    Routes

                     Passengers
Resources


                      Bookings

Application   HTTP    Routes

                     Passengers
Resources


                POST    /booking/{id}/
                 GET
Application              /route/{id}/
                 PUT
              DELETE   /passenger/{id}/
Addressable
                        Resources


                POST    /booking/{id}/
                 GET
Application              /route/{id}/
                 PUT
              DELETE   /passenger/{id}/
Uniform    Addressable
              Interface    Resources


                 POST      /booking/{id}/
                  GET
Application                 /route/{id}/
                  PUT
               DELETE     /passenger/{id}/
Addressable
                                   Resources

              GET /booking/123/
                                   /booking/{id}/

Application                         /route/{id}/

                                  /passenger/{id}/
Addressable
                                    Resources

              GET /booking/123/
                                   /booking/{id}/

Application                         /route/{id}/

                                  /passenger/{id}/

                                    State and
                                  Representation
Addressable
                                             Resources

                       GET /booking/123/
                                            /booking/{id}/

Application                                  /route/{id}/
                            200 OK
                                           /passenger/{id}/
  id: 123,
  pickupTime: ‘2010-12-13T09:00:00’,
  passenger: {                               State and
     link: {
        href: ‘/passenger/234’,            Representation
        rel: ‘related’
     }
  }
REST = HTTP Used Right

REST was “developed” in parallel with the HTTP/1.1
protocol
Caching and conditional GET
Proxies
HTTP headers (e.g.content negotiation)
HTTP methods
Everything Is a Resource




    There shall be nothing else
Everything Is a Resource



         ROA
    There shall be nothing else
Everything Is a Resource
•Version 1.0.3 of the software release
•The latest version of the software release
•Search results for the word ‘Galactica’
•The next prime number after 1024
•The relationship between Alice and Bob
•A list of open bugs in the bug database

        There shall be nothing else
Clean and Descriptive URIs
Clean and Descriptive URIs
/software/releases/1.0.3.tar.gz
/software/releases/latest.tar.gz
/search/Galactica
/nextprime/1024
/relationships/Alice;Bob
/bugs/by-state/open
State(lessness)


Application vs. Resource
The Uniform Interface
The Uniform Interface

       GET - safe, idempotent
       PUT - idempotent
       DELETE - idempotent
       POST - “complex”
The Uniform Interface

      200 - OK
      201 - Created
      301 - Moved Permanently
      400 - Bad Request
      404 - Not Found
      409 - Conflict
      500 - Internal Server Error
Connectedness


                    passenger



          booking



  route
Hypermedia as the Engine
of Application State

                     passenger



           booking



  route
Problems?
Transactions
Asynchronous tasks
Batch jobs
Relationships between
resources
Partial updates
Partial representations
REST                     WS*
Embraces HTTP            Ignores HTTP
No bandwidth overhead    Good tool support
Simplicity               WSDL
Web already is RESTful   “Standards”
HTTPS / HTTP Diges,      Plethora of Security
OAuth                    Standards
Why?
REST overview
REST overview

Contenu connexe

Similaire à REST overview

Secure Mashups
Secure MashupsSecure Mashups
Secure Mashups
kriszyp
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8
Andrei Jechiu
 

Similaire à REST overview (12)

Rest
RestRest
Rest
 
How RESTful Is Your REST?
How RESTful Is Your REST?How RESTful Is Your REST?
How RESTful Is Your REST?
 
Clean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NETClean up this mess - API Gateway & Service Discovery in .NET
Clean up this mess - API Gateway & Service Discovery in .NET
 
rest-api-basics.pptx
rest-api-basics.pptxrest-api-basics.pptx
rest-api-basics.pptx
 
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
apidays Helsinki & North 2023 -Design first or first design?, Patrick Brosse,...
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Secure Mashups
Secure MashupsSecure Mashups
Secure Mashups
 
TripThru_API_Doc_v1
TripThru_API_Doc_v1TripThru_API_Doc_v1
TripThru_API_Doc_v1
 
Services Stanford 2012
Services Stanford 2012Services Stanford 2012
Services Stanford 2012
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with Oracle
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using Jersey
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

REST overview

  • 1.
  • 2. Web Services Web Service API : 80 (Legacy) System
  • 3. Web Services Web Service API : 80 (Legacy) System
  • 4. The Types of Web Services Big Web Services WS-Notification REST WS-Security RPC style WSDL REST-RPC hybrid SOAP REST
  • 6. Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1.
  • 7. Bookings Application HTTP Routes Passengers
  • 8. Resources Bookings Application HTTP Routes Passengers
  • 9. Resources POST /booking/{id}/ GET Application /route/{id}/ PUT DELETE /passenger/{id}/
  • 10. Addressable Resources POST /booking/{id}/ GET Application /route/{id}/ PUT DELETE /passenger/{id}/
  • 11. Uniform Addressable Interface Resources POST /booking/{id}/ GET Application /route/{id}/ PUT DELETE /passenger/{id}/
  • 12. Addressable Resources GET /booking/123/ /booking/{id}/ Application /route/{id}/ /passenger/{id}/
  • 13. Addressable Resources GET /booking/123/ /booking/{id}/ Application /route/{id}/ /passenger/{id}/ State and Representation
  • 14. Addressable Resources GET /booking/123/ /booking/{id}/ Application /route/{id}/ 200 OK /passenger/{id}/ id: 123, pickupTime: ‘2010-12-13T09:00:00’, passenger: { State and link: { href: ‘/passenger/234’, Representation rel: ‘related’ } }
  • 15. REST = HTTP Used Right REST was “developed” in parallel with the HTTP/1.1 protocol Caching and conditional GET Proxies HTTP headers (e.g.content negotiation) HTTP methods
  • 16. Everything Is a Resource There shall be nothing else
  • 17. Everything Is a Resource ROA There shall be nothing else
  • 18. Everything Is a Resource •Version 1.0.3 of the software release •The latest version of the software release •Search results for the word ‘Galactica’ •The next prime number after 1024 •The relationship between Alice and Bob •A list of open bugs in the bug database There shall be nothing else
  • 20. Clean and Descriptive URIs /software/releases/1.0.3.tar.gz /software/releases/latest.tar.gz /search/Galactica /nextprime/1024 /relationships/Alice;Bob /bugs/by-state/open
  • 23. The Uniform Interface GET - safe, idempotent PUT - idempotent DELETE - idempotent POST - “complex”
  • 24. The Uniform Interface 200 - OK 201 - Created 301 - Moved Permanently 400 - Bad Request 404 - Not Found 409 - Conflict 500 - Internal Server Error
  • 25. Connectedness passenger booking route
  • 26. Hypermedia as the Engine of Application State passenger booking route
  • 27. Problems? Transactions Asynchronous tasks Batch jobs Relationships between resources Partial updates Partial representations
  • 28. REST WS* Embraces HTTP Ignores HTTP No bandwidth overhead Good tool support Simplicity WSDL Web already is RESTful “Standards” HTTPS / HTTP Diges, Plethora of Security OAuth Standards
  • 29. Why?