SlideShare a Scribd company logo
1 of 2
REST
 What is REST...?
Thisarticle presumesbasicunderstandingof how internetworks,whatwebappsare,whata webservice isanda
some basicunderstandingof networking.
Representational State Transfer(REST) isa designarchitecture fornetworkedapplicationsorsystems.Inthe
REST designarchitecture aclientprogressesthroughanapplicationbyselectinglinks,alsoknownasstate
transitions.Eachlinkselectedbythe clientreturnsarepresentation of the selectedresource.Also,witheach
resource representationthe clientapplicationtransfersstate,andresultsinausable webpage beingtransferred
and rendered.
In the REST designarchitecture,aresource iscreatedforeveryservice thatanapplicationprovides,witheach
resource identifiedbyaURL. A clientcan reference the resource usingthe URL.The returnedrepresentationof
the resource isfurtherlinkedtomore information,allowingthe clienttodrill downasfaras necessarytoget
more detailedinformation.The clientcanaccessandperformoperationsonavailableresourceswithstandard
HTTP methods,suchas GET, POST, PUT, and DELETE.
 REST stands forRepresentational State Transfer
 Main aspects are
1. It isa "resource-based"webarchitecture
 We thinkof “resources”(ornouns) v/s“actions”/“methods” asinSOAPRPC. We thinkin
termsof verbs.
 Resource = URI, that is,UniformResource Identifier.Itisa stringof charactersusedto
identifythe resource.Suchidentificationenablesinteractionwithrepresentationsof the
resource overa network,typicallyworldwideweb,usingspecificprotocols.
2. Representations
 It signifies howresourcesgetmanipulated withhelpof API
 Representationsgettransferredbetweenclient-server
 Example:Resource=person(sayTodd), Service=GET, Representation=infoinJSON orXML
format.
 Typicallyformatssuchas JSON,XML, CSV,HTML. etc. are usedtoconveyrepresentations.
 There are six importantconstraints forRESTful architecture.Theseare
1. Uniforminterface
 Client-serverinterface
 URI
 Actionsallowed withURI = GET,PUT, POST, DELETE (these are CRUD functionalities)
 POST=create or append;PUT=create or replace
 HTTP response foranyaction isrequiredtobe the http statusand response body
2. Stateless
 Servershouldcontainnoclientstate;everyclientrequestisindependent.
 Serveris idempotent(detail innextsection)
3. Client-Server
4. Cacheable
 Serverresponsesare cacheable
5. Layered system
 Client-serverconnectionis layered (scalability)
6. Code on demand
 Servercan “optionally”sendJavaScriptor Javaappletcode snippettoexecute onclient
 A web-service isasoftware thatmakesitself available overHTTPand usesstandardXML or JSON based
communicationprotocol andgetrequest/response acrossclient-server.Platformindependent,language
independent,loose coupling,supportsRPC…
 Idempotence
For a RESTful service call to be idempotent,clientscan make that same call repeatedlywhile producingthe same
result.Making multiple identical requestshasthe same effectas making a single request. While idempotent
operationsproduce same resultonserver(noside effects),the response itselfmaynot be same.
The PUT and DELETE methodsare definedtobe idempotent.
(There is a caveaton DELETE. The problemwith DELETE, which if successfulwould normally return a 200 (OK) or204
(No Content),willoften return a 404 (NotFound) on subsequentcalls,unlesstheservice is configured to "mark"
resourcesfordeletion without actually deleting them. However,when theservice actually deletes the resource,the
nextcall will notfind the resourceto delete it and return a 404. However,the stateon the serveris thesame after
each DELETE call, butthe responseis different.)
GET, HEAD,OPTIONSand TRACEmethodsare definedassafe,meaningtheyare onlyintendedforretrievingdata.
Thismakesthemidempotentaswell since multiple,identical requestswill behave the same.
HTTP Method Idempotent Safe
OPTIONS yes yes
GET yes yes
HEAD yes yes
PUT yes no
POST no no
DELETE yes no
PATCH no no
 References
1. http://www.tutorialspoint.com/webservices/what_are_web_services.htm
- Specificallythe RESTsection
2. https://access.redhat.com/site/documentation/en-US/OpenShift/2.0/html-
single/REST_API_Guide/index.html#sect-API_Guide-General_API-Link_Navigation
3. https://access.redhat.com/site/documentation/en-US/OpenShift/2.0/html-
single/REST_API_Guide/index.html#chap-API_Guide-API_Entry_Point

More Related Content

What's hot

Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webserviceDong Ngoc
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigMandakini Kumari
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Servicesecosio GmbH
 
RESTful services
RESTful servicesRESTful services
RESTful servicesgouthamrv
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilitySanchit Gera
 
Soap vs. rest - which is right web service protocol for your need?
Soap vs. rest -  which is right web service protocol for your need?Soap vs. rest -  which is right web service protocol for your need?
Soap vs. rest - which is right web service protocol for your need?Vijay Prasad Gupta
 
Representational State Transfer (REST)
Representational State Transfer (REST)Representational State Transfer (REST)
Representational State Transfer (REST)David Krmpotic
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core conceptsSindhu VL
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservicesGagandeep Singh
 
WS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and CorrelationWS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and CorrelationJeffrey Hasan
 
Introduction to mule esb's
Introduction to mule esb's Introduction to mule esb's
Introduction to mule esb's F K
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Martin Necasky
 

What's hot (20)

Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Web service
Web serviceWeb service
Web service
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and Scalability
 
Modern web architectural patterns
Modern web architectural patternsModern web architectural patterns
Modern web architectural patterns
 
Soap vs. rest - which is right web service protocol for your need?
Soap vs. rest -  which is right web service protocol for your need?Soap vs. rest -  which is right web service protocol for your need?
Soap vs. rest - which is right web service protocol for your need?
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
Wsdl
WsdlWsdl
Wsdl
 
Representational State Transfer (REST)
Representational State Transfer (REST)Representational State Transfer (REST)
Representational State Transfer (REST)
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservices
 
Web Service
Web ServiceWeb Service
Web Service
 
WS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and CorrelationWS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
WS-Addressing: Enabling Transport-Neutral Message Addressing and Correlation
 
Introduction to mule esb's
Introduction to mule esb's Introduction to mule esb's
Introduction to mule esb's
 
Mule soft ppt 2
Mule soft ppt  2Mule soft ppt  2
Mule soft ppt 2
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
 

Similar to REST Architecture Explained (20)

Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Unit 2
Unit 2Unit 2
Unit 2
 
What are restful web services?
What are restful web services?What are restful web services?
What are restful web services?
 
JAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with Java
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2
 
Lab7 paper
Lab7 paperLab7 paper
Lab7 paper
 
C# REST API
C# REST APIC# REST API
C# REST API
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
 
Rest surekha
Rest surekhaRest surekha
Rest surekha
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Mule soft ppt 3
Mule soft ppt  3Mule soft ppt  3
Mule soft ppt 3
 

Recently uploaded

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

REST Architecture Explained

  • 1. REST  What is REST...? Thisarticle presumesbasicunderstandingof how internetworks,whatwebappsare,whata webservice isanda some basicunderstandingof networking. Representational State Transfer(REST) isa designarchitecture fornetworkedapplicationsorsystems.Inthe REST designarchitecture aclientprogressesthroughanapplicationbyselectinglinks,alsoknownasstate transitions.Eachlinkselectedbythe clientreturnsarepresentation of the selectedresource.Also,witheach resource representationthe clientapplicationtransfersstate,andresultsinausable webpage beingtransferred and rendered. In the REST designarchitecture,aresource iscreatedforeveryservice thatanapplicationprovides,witheach resource identifiedbyaURL. A clientcan reference the resource usingthe URL.The returnedrepresentationof the resource isfurtherlinkedtomore information,allowingthe clienttodrill downasfaras necessarytoget more detailedinformation.The clientcanaccessandperformoperationsonavailableresourceswithstandard HTTP methods,suchas GET, POST, PUT, and DELETE.  REST stands forRepresentational State Transfer  Main aspects are 1. It isa "resource-based"webarchitecture  We thinkof “resources”(ornouns) v/s“actions”/“methods” asinSOAPRPC. We thinkin termsof verbs.  Resource = URI, that is,UniformResource Identifier.Itisa stringof charactersusedto identifythe resource.Suchidentificationenablesinteractionwithrepresentationsof the resource overa network,typicallyworldwideweb,usingspecificprotocols. 2. Representations  It signifies howresourcesgetmanipulated withhelpof API  Representationsgettransferredbetweenclient-server  Example:Resource=person(sayTodd), Service=GET, Representation=infoinJSON orXML format.  Typicallyformatssuchas JSON,XML, CSV,HTML. etc. are usedtoconveyrepresentations.  There are six importantconstraints forRESTful architecture.Theseare 1. Uniforminterface  Client-serverinterface  URI  Actionsallowed withURI = GET,PUT, POST, DELETE (these are CRUD functionalities)  POST=create or append;PUT=create or replace  HTTP response foranyaction isrequiredtobe the http statusand response body 2. Stateless  Servershouldcontainnoclientstate;everyclientrequestisindependent.  Serveris idempotent(detail innextsection) 3. Client-Server 4. Cacheable  Serverresponsesare cacheable 5. Layered system  Client-serverconnectionis layered (scalability)
  • 2. 6. Code on demand  Servercan “optionally”sendJavaScriptor Javaappletcode snippettoexecute onclient  A web-service isasoftware thatmakesitself available overHTTPand usesstandardXML or JSON based communicationprotocol andgetrequest/response acrossclient-server.Platformindependent,language independent,loose coupling,supportsRPC…  Idempotence For a RESTful service call to be idempotent,clientscan make that same call repeatedlywhile producingthe same result.Making multiple identical requestshasthe same effectas making a single request. While idempotent operationsproduce same resultonserver(noside effects),the response itselfmaynot be same. The PUT and DELETE methodsare definedtobe idempotent. (There is a caveaton DELETE. The problemwith DELETE, which if successfulwould normally return a 200 (OK) or204 (No Content),willoften return a 404 (NotFound) on subsequentcalls,unlesstheservice is configured to "mark" resourcesfordeletion without actually deleting them. However,when theservice actually deletes the resource,the nextcall will notfind the resourceto delete it and return a 404. However,the stateon the serveris thesame after each DELETE call, butthe responseis different.) GET, HEAD,OPTIONSand TRACEmethodsare definedassafe,meaningtheyare onlyintendedforretrievingdata. Thismakesthemidempotentaswell since multiple,identical requestswill behave the same. HTTP Method Idempotent Safe OPTIONS yes yes GET yes yes HEAD yes yes PUT yes no POST no no DELETE yes no PATCH no no  References 1. http://www.tutorialspoint.com/webservices/what_are_web_services.htm - Specificallythe RESTsection 2. https://access.redhat.com/site/documentation/en-US/OpenShift/2.0/html- single/REST_API_Guide/index.html#sect-API_Guide-General_API-Link_Navigation 3. https://access.redhat.com/site/documentation/en-US/OpenShift/2.0/html- single/REST_API_Guide/index.html#chap-API_Guide-API_Entry_Point