SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Integrating Restfully
       Srihari Srinivasan

       ThoughtWorks
Web 2.0

Platform for software development
1   :   3
Primer on REST



 • REST - Representational State Transfer
 • Term coined by Roy Fielding in his Ph.d thesis
Principled Architecture / Design

               of


Large Scale Distributed Systems
Primer on REST



•   Architectural style followed by the Web

•   Its Generic, can be used to build other web-like systems
Qualities


 •   Performance, Scalability, Interoperability

 •   Simplicity, Extensibility

 •   Visibility of Interactions

 •   Reliability
REST intentionally places
Constraints on the system to achieve Desired Properties
REST - What it is not


 •   Not a standard, an architectural style

 •   Standards based on this style - HTTP, ATOM

 •   Ignores implementation details of components and protocol syntax
REST - What it is not

•   Not the ONLY style for governing network interactions.

    •   Event Driven Architectures

    •   Message Oriented Architecture

    •   and good old RPC...

•   Most large systems have hybrid styles, one style may dominate though!
REST Constraints
REST Constraints
•   Client-Server

•   Statelessness

•   Caching

•   Layered System

•   Uniform Interface

•   Code on Demand (optional)
Client-Server Style of Interactions


•   Based on the principle of separation of concerns

•   Client and Server can be developed, maintained and scaled independently

•   Desired Properties : Simplicity, Scalability, Portability of user interfaces
Uniform Interface


•   The central/distinguishing feature of REST

•   Most Controversial !
Uniform Interfaces are opposed to Specialized Interfaces
Specialized Interfaces
Employee Service
                          createEmployee(....)

                          updateEmployee(....)

                    getEmployeeDetails(identifier)

                   transferEmployee(identifier, to, ...)

                      deleteEmployee(identifier)
What happens when lots of such special interfaces
          float in a distributed system ?
Specialization Consequences
 •   Clients have to know

     •   Method names, parameters

     •   Semantics of the methods

     •   Possibly the order of method calls

 •   Each service interface is a new custom application protocol

 •   Clients cannot be generic
Specialization Consequences


 •   RPC style tries to map local computing notions to distribute operations

 •   Leads to data specialization

 •   Therefore couples format of the data to the interface
How does the Uniform Interface constraint help ?
Consequences of Specializing

 •   RPC/Service style interfaces promote specialization along two
     dimensions

      •   Operations

      •   Data
More Constraints
REST discourages sending ad hoc messages,
    invoking special purpose functions
Resources

•   Key Abstraction, Basic Unit of information

•   Can be anything interesting

    •   spreadsheet, image, xml file, transaction etc

•   Uniquely identifiable via a URI
Resources

•   Manipulated using representations - quot;Pass-by-valuequot; semantics

•   All resources manipulated via a limited set of standard functions/
    operations

    •   In HTTP we have GET, POST, PUT & DELETE with well defined
        semantics for each
Resources

•   Representations can be in any format

•   Self describing messages help specify preferred formats

•   Clients can even negotiate on formats with servers
How can a limited number of interfaces suffice
              to perform many
       domain specific operations ?
Resources
•   REST promotes replacing the quot;do somethingquot; concept with a quot;make
    something soquot; concept

•   “What” and not “How”

•   Think Declarative, instead of Imperative
Hypermedia as the engine of application state
Hypermedia

•   Representations must contain next steps/transitions a resource can
    make from the current state

•   Use hyperlinks to define these transitions
Resource Orientation
 •   HTTP GET from http://server.com/employees/name

 •   HTTP POST to http://server.coms/employees

 •   HTTP PUT to http://server.com/employees/name

 •   HTTP POST to http://server.com/employees/name/transfer

 •   HTTP DELETE to http://server.com/employees/name
Resource Orientation
•   Model Resources, instead of services

•   Assign identifiers to resources

•   Expose uniform operations on resources based on your chosen
    protocol/framework

•   Support multiple formats - “One size does not fit all”

•   Leverage hypermedia to traverse through finite states
Summary

•   REST tries to reveal the distribution in distributed systems

•   Popularizes HTTP outside the browser

•   Reminds us that HTTP is not a transport protocol

•   The ideas of REST have merit even if you are doing classic SOA

•   Not easy to grok, requires unlearning and relearning!
</presentation>

Weitere ähnliche Inhalte

Was ist angesagt?

Web Services
Web ServicesWeb Services
Web ServicesRTigger
 
Understanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differencesUnderstanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differencesBhavendra Chavan
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST Ram Awadh Prasad, PMP
 
Sql Server Service Broker In The Real World
Sql Server Service Broker In The Real WorldSql Server Service Broker In The Real World
Sql Server Service Broker In The Real WorldQuest Software
 
Hypermedia APIs: The Rest of REST
Hypermedia APIs: The Rest of RESTHypermedia APIs: The Rest of REST
Hypermedia APIs: The Rest of RESTChris Marinos
 
[WSO2Con EU 2017] Ballerina: Exploring Data Integration
[WSO2Con EU 2017] Ballerina: Exploring Data Integration[WSO2Con EU 2017] Ballerina: Exploring Data Integration
[WSO2Con EU 2017] Ballerina: Exploring Data IntegrationWSO2
 
Introduction to web services
Introduction to web servicesIntroduction to web services
Introduction to web servicesNitin Kumar Yadav
 
SQL Server Service Broker – A Competent Architecture by Microsoft
SQL Server Service Broker – A Competent Architecture by MicrosoftSQL Server Service Broker – A Competent Architecture by Microsoft
SQL Server Service Broker – A Competent Architecture by Microsoftsara stanford
 
[WSO2Con EU 2017] Introduction to Ballerina
[WSO2Con EU 2017] Introduction to Ballerina[WSO2Con EU 2017] Introduction to Ballerina
[WSO2Con EU 2017] Introduction to BallerinaWSO2
 
Introduction to REST
Introduction to RESTIntroduction to REST
Introduction to RESTkumar gaurav
 
RESTful Web Services with Spring MVC
RESTful Web Services with Spring MVCRESTful Web Services with Spring MVC
RESTful Web Services with Spring MVCdigitalsonic
 

Was ist angesagt? (20)

Soap Vs Rest
Soap Vs RestSoap Vs Rest
Soap Vs Rest
 
Web Services
Web ServicesWeb Services
Web Services
 
Web Services
Web ServicesWeb Services
Web Services
 
Understanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differencesUnderstanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differences
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
 
Sql Server Service Broker In The Real World
Sql Server Service Broker In The Real WorldSql Server Service Broker In The Real World
Sql Server Service Broker In The Real World
 
Hypermedia APIs: The Rest of REST
Hypermedia APIs: The Rest of RESTHypermedia APIs: The Rest of REST
Hypermedia APIs: The Rest of REST
 
SQL Server Service Brokers
SQL Server Service BrokersSQL Server Service Brokers
SQL Server Service Brokers
 
[WSO2Con EU 2017] Ballerina: Exploring Data Integration
[WSO2Con EU 2017] Ballerina: Exploring Data Integration[WSO2Con EU 2017] Ballerina: Exploring Data Integration
[WSO2Con EU 2017] Ballerina: Exploring Data Integration
 
Introduction to web services
Introduction to web servicesIntroduction to web services
Introduction to web services
 
Web services
Web servicesWeb services
Web services
 
SQL Server Service Broker – A Competent Architecture by Microsoft
SQL Server Service Broker – A Competent Architecture by MicrosoftSQL Server Service Broker – A Competent Architecture by Microsoft
SQL Server Service Broker – A Competent Architecture by Microsoft
 
[WSO2Con EU 2017] Introduction to Ballerina
[WSO2Con EU 2017] Introduction to Ballerina[WSO2Con EU 2017] Introduction to Ballerina
[WSO2Con EU 2017] Introduction to Ballerina
 
Rest vs Soap
Rest vs SoapRest vs Soap
Rest vs Soap
 
Introduction to REST
Introduction to RESTIntroduction to REST
Introduction to REST
 
RESTful Web Services with Spring MVC
RESTful Web Services with Spring MVCRESTful Web Services with Spring MVC
RESTful Web Services with Spring MVC
 
Understanding Web services
Understanding Web servicesUnderstanding Web services
Understanding Web services
 
Wcf v1-day1
Wcf v1-day1Wcf v1-day1
Wcf v1-day1
 
Java web services
Java web servicesJava web services
Java web services
 
Web services for banks
Web services for banksWeb services for banks
Web services for banks
 

Ähnlich wie Integrating RESTfully

ReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... YawnReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... Yawnozten
 
Rest Reuse And Serendipity
Rest Reuse And SerendipityRest Reuse And Serendipity
Rest Reuse And SerendipityQConLondon2008
 
RESTful Approaches to Financial Systems Integration
RESTful Approaches to Financial Systems IntegrationRESTful Approaches to Financial Systems Integration
RESTful Approaches to Financial Systems IntegrationKirkWylie
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipitydeimos
 
Applications of the REST Principle
Applications of the REST PrincipleApplications of the REST Principle
Applications of the REST Principleelliando dias
 
Enterprise Data Services for Strategic SOA
Enterprise Data Services for Strategic SOAEnterprise Data Services for Strategic SOA
Enterprise Data Services for Strategic SOAsumedha.r
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIPankaj Bajaj
 
A RESTful introduction
A RESTful introductionA RESTful introduction
A RESTful introductionDaniel Toader
 
Service Oriented Architecture
Service Oriented Architecture Service Oriented Architecture
Service Oriented Architecture Prabhat gangwar
 
Remote Procedure Call over DDS - London Connext DDS Conference
Remote Procedure Call over DDS - London Connext DDS Conference Remote Procedure Call over DDS - London Connext DDS Conference
Remote Procedure Call over DDS - London Connext DDS Conference Gerardo Pardo-Castellote
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 
Apache Thrift, a brief introduction
Apache Thrift, a brief introductionApache Thrift, a brief introduction
Apache Thrift, a brief introductionRandy Abernethy
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webserviceDong Ngoc
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svenssonrajivmordani
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 

Ähnlich wie Integrating RESTfully (20)

ReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... YawnReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... Yawn
 
Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289
 
Rest Reuse And Serendipity
Rest Reuse And SerendipityRest Reuse And Serendipity
Rest Reuse And Serendipity
 
RESTful Approaches to Financial Systems Integration
RESTful Approaches to Financial Systems IntegrationRESTful Approaches to Financial Systems Integration
RESTful Approaches to Financial Systems Integration
 
Steve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And SerendipitySteve Vinoski Rest And Reuse And Serendipity
Steve Vinoski Rest And Reuse And Serendipity
 
Applications of the REST Principle
Applications of the REST PrincipleApplications of the REST Principle
Applications of the REST Principle
 
Enterprise Data Services for Strategic SOA
Enterprise Data Services for Strategic SOAEnterprise Data Services for Strategic SOA
Enterprise Data Services for Strategic SOA
 
REST != WebAPI
REST != WebAPIREST != WebAPI
REST != WebAPI
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
 
Rest api design
Rest api designRest api design
Rest api design
 
A RESTful introduction
A RESTful introductionA RESTful introduction
A RESTful introduction
 
Service Oriented Architecture
Service Oriented Architecture Service Oriented Architecture
Service Oriented Architecture
 
Remote Procedure Call over DDS - London Connext DDS Conference
Remote Procedure Call over DDS - London Connext DDS Conference Remote Procedure Call over DDS - London Connext DDS Conference
Remote Procedure Call over DDS - London Connext DDS Conference
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
Apache Thrift, a brief introduction
Apache Thrift, a brief introductionApache Thrift, a brief introduction
Apache Thrift, a brief introduction
 
Five API Styles
Five API StylesFive API Styles
Five API Styles
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svensson
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 

Kürzlich hochgeladen

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Integrating RESTfully

  • 1. Integrating Restfully Srihari Srinivasan ThoughtWorks
  • 2. Web 2.0 Platform for software development
  • 3.
  • 4.
  • 5. 1 : 3
  • 6. Primer on REST • REST - Representational State Transfer • Term coined by Roy Fielding in his Ph.d thesis
  • 7.
  • 8. Principled Architecture / Design of Large Scale Distributed Systems
  • 9. Primer on REST • Architectural style followed by the Web • Its Generic, can be used to build other web-like systems
  • 10. Qualities • Performance, Scalability, Interoperability • Simplicity, Extensibility • Visibility of Interactions • Reliability
  • 11. REST intentionally places Constraints on the system to achieve Desired Properties
  • 12. REST - What it is not • Not a standard, an architectural style • Standards based on this style - HTTP, ATOM • Ignores implementation details of components and protocol syntax
  • 13. REST - What it is not • Not the ONLY style for governing network interactions. • Event Driven Architectures • Message Oriented Architecture • and good old RPC... • Most large systems have hybrid styles, one style may dominate though!
  • 15. REST Constraints • Client-Server • Statelessness • Caching • Layered System • Uniform Interface • Code on Demand (optional)
  • 16. Client-Server Style of Interactions • Based on the principle of separation of concerns • Client and Server can be developed, maintained and scaled independently • Desired Properties : Simplicity, Scalability, Portability of user interfaces
  • 17. Uniform Interface • The central/distinguishing feature of REST • Most Controversial !
  • 18. Uniform Interfaces are opposed to Specialized Interfaces
  • 19. Specialized Interfaces Employee Service createEmployee(....) updateEmployee(....) getEmployeeDetails(identifier) transferEmployee(identifier, to, ...) deleteEmployee(identifier)
  • 20. What happens when lots of such special interfaces float in a distributed system ?
  • 21. Specialization Consequences • Clients have to know • Method names, parameters • Semantics of the methods • Possibly the order of method calls • Each service interface is a new custom application protocol • Clients cannot be generic
  • 22. Specialization Consequences • RPC style tries to map local computing notions to distribute operations • Leads to data specialization • Therefore couples format of the data to the interface
  • 23. How does the Uniform Interface constraint help ?
  • 24. Consequences of Specializing • RPC/Service style interfaces promote specialization along two dimensions • Operations • Data
  • 26. REST discourages sending ad hoc messages, invoking special purpose functions
  • 27. Resources • Key Abstraction, Basic Unit of information • Can be anything interesting • spreadsheet, image, xml file, transaction etc • Uniquely identifiable via a URI
  • 28. Resources • Manipulated using representations - quot;Pass-by-valuequot; semantics • All resources manipulated via a limited set of standard functions/ operations • In HTTP we have GET, POST, PUT & DELETE with well defined semantics for each
  • 29. Resources • Representations can be in any format • Self describing messages help specify preferred formats • Clients can even negotiate on formats with servers
  • 30. How can a limited number of interfaces suffice to perform many domain specific operations ?
  • 31. Resources • REST promotes replacing the quot;do somethingquot; concept with a quot;make something soquot; concept • “What” and not “How” • Think Declarative, instead of Imperative
  • 32. Hypermedia as the engine of application state
  • 33. Hypermedia • Representations must contain next steps/transitions a resource can make from the current state • Use hyperlinks to define these transitions
  • 34. Resource Orientation • HTTP GET from http://server.com/employees/name • HTTP POST to http://server.coms/employees • HTTP PUT to http://server.com/employees/name • HTTP POST to http://server.com/employees/name/transfer • HTTP DELETE to http://server.com/employees/name
  • 35. Resource Orientation • Model Resources, instead of services • Assign identifiers to resources • Expose uniform operations on resources based on your chosen protocol/framework • Support multiple formats - “One size does not fit all” • Leverage hypermedia to traverse through finite states
  • 36. Summary • REST tries to reveal the distribution in distributed systems • Popularizes HTTP outside the browser • Reminds us that HTTP is not a transport protocol • The ideas of REST have merit even if you are doing classic SOA • Not easy to grok, requires unlearning and relearning!