SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
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

Mais conteúdo relacionado

Semelhante a REST overview

Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsCarol McDonald
 
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 .NETMarcin Tyborowski
 
rest-api-basics.pptx
rest-api-basics.pptxrest-api-basics.pptx
rest-api-basics.pptxFikiRieza2
 
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,...apidays
 
Secure Mashups
Secure MashupsSecure Mashups
Secure Mashupskriszyp
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleEmiliano Pecis
 
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 JerseyPayal Jain
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8Andrei Jechiu
 

Semelhante a REST overview (12)

Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
 
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
 

Último

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 RobisonAnna Loughnan Colquhoun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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 MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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 SolutionsEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Último (20)

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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

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?