SlideShare a Scribd company logo
1 of 3
Download to read offline
REST stands for REpresentational State Transfer. It is most popular architecture used in cloud based
servers and is preferred over SOAP (Standard Object Access Protocol).
To put it straight, a peculiar SOAP request consists of XML file like:
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<isbn>54379678</isbn>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catlog>
and a peculiar REST URL will look like: http://books.com/GambardellaMatthew/54379678
This clarifies how easy it is to use REST. REST is HTTP based
The URL above can be suitably modified to suit your need.
REST request consists of two parts, Verb and Content. Verb tells us what to do on the contents.
This is just like a Cellphone box with instruction manual, cellphone is the content and manual is the
VERB.
Peculiar characteristics of REST explained in short:
Every resource on the server can be reached by a unique URI like the above:
http://books.com/GambardellaMatthew/54379678
The message has the verb embedded in it, and the resource is a mere storage. You can retrieve a small
portion of a database, depending on the parameters you pass and the format
You need not bother about where and how is the data is stored. You can get the same chunk or data
either in XML or JSON or CSV, either encoded in UTF-8 or some other
encoding.
REST web services are "Stateless". The server doesn't bother once it sends the response to the client.
While shopping on some online shopping site, you query for some particular item and you add it to
your cart. The "cart" is a thing that resides on your machine and not on the server. (This is the most
common way of storing cart. There are "Persistent shopping Carts" which store the cart on the server)
If you add some 25 items to your cart and then if you clear your cookies, cache etc, all your efforts go
waste and you have to satrt all over again. Statelessness makes things simple a all the requests in HTTP
request sequence don't create confusion. HTTP is itself stateless and REST can easily marry with
HTTP.
REST is language neutral. You can implement in C#, Java, Python or language of your choice.
REST is cacheable. What is a Cache? Cache is some place other than the server itself, where the
response from server is stored temporarily. It can be on the end client, or at some other intermittent
server. If you want to experience the effect of cache, do a thing. Open some dense web page. (Unlike
google.com, contents on which are very few). Notice the time it take to fully load the page. Now, close
the page and gain notice the time. Now clear the cache of your browser. If you are using Chrome:
http://www.technipages.com/google-chrome-clear-cache , similar things can be done on Firefox, Opera
or other browsers.
ketkaravinash@yahoo.com
Now again load the page. The page will take slightly longer than previous. This is because, now the
page is loaded from the server and not from the cache that is stored on your machine. If you are a
developer, you always have to disable the cache so that the changes you make in your PHP, Javascript
code or if you make changes in the images on your web page, they get reflected in the browser.
Brief description about Verb part of the REST request:
GET : GET request is fired for GETting something (Pardon the pun) . When you type the URL like
http://google.com in your browser address bar, you are in fact requesting, "Go, GET me the search
engine facility from the google server".
Google and other search engines like Bing, continously crowl the web and "GET" information about
what is stored on different web pages at different web sites. Website owners have control over what to
make available to which engines, or completely hide some or all resources (that is, pages, images,
documents etc).
GET verb makes changes at the client side, ie the browser. It doesn't make any change at the server.
Search engines naturally shouldn't be allowed to insert, modify or delete anything on any site they
crawl. If you open a website and hit the refresh button of your browser n number of times, it doesn't
make any difference at the server. If you search 100 different terms using google, you, by your own
will cannot make any change at the server. But server can volunteerly make changes in its state, like
storing serch terms with IP address, your browsing habits reported by the cookies etc.
POST: POST is a verb designed for "creating" something at the server. You are filling a registration
form with columns like Nmae, Surname, address, email etc, on the website. You fill all the columns
and hit the "Register" button. Your browser then makes "POST" request to the server. Now again, it is
upto the server to allow your POST request to make changes in its state.
Your IP address is also sent with the POST request. If your IP indicates that you are from particular
region and the server doesn't allow POST request from that region, it communicates it to the client. (or
is supposed to communicate so to the client in the words comprehencible to the client.)
GET and POST are most widely used verbs in the REST. Daily life anology for these is telephonic IVR
(Interactive Voice Response). You dial the number of some utility helpline,
say, your cellphone provider. You want to GET something from other end. IVR responds and asks you
to dial some number. While dialing the number, you are POSTing something. The IVR in response to
your answer, provides the information. Now again you are GETting the information. When you want to
change some of your account options, you POST the information. Again, after checking the
information for some preset conditions, the IVR may reject the request and ask you to provide in
information again, or it may accept the request and change the state of the database.
Another thing that makes this work is the RESPECT FOR PROTOCOL. I say "Rkdfkldu". Did you
understand? surely not because I speak Klnj language and you speak Jyuk language.
If we both speak English, we both express our planet as Earth. These are liguistic protocol. There also
are cultural protocol. Different gustures mean differntly across cultures. When you show your thumb,
you may be warmly greeted somewhere, and somewhere you may bet beaten. One should be especialy
careful while using circasm and make sure
the server has ability to know the protocol, and not interpret it as insult.
Other verbs used in REST are: PUT, UPDATE and DELETE.
ketkaravinash@yahoo.com
PUT: PUT is silimilar to POST. Both PUT and POST send data to the server. Difference lies in what
happens when the same contents are sent twice to the server. If you are already registered your email on
a particular server, the server refuses your request and doesn't create a new record while using PUT.
But if your email exists and your phone number changes, PUT updates the existing record and doesn't
create a new one. PUT is used for UPDATION an POST for creation.
DELETE, as the name implies, deletes data from the server. Ofcourse, client can request a DELETE
but cannot force it. Server can schedule the DELETE at some suitable time, say
time when there is less load on the server. DELETE can be denied if the resource is critical or a
particular client doesn't have delete previllege for that resource. Facebook keeps the data for some
period after account closure for legal reasons.
ketkaravinash@yahoo.com

More Related Content

What's hot

What's hot (20)

GET and POST in PHP
GET and POST in PHPGET and POST in PHP
GET and POST in PHP
 
RESTful JSON web databases
RESTful JSON web databasesRESTful JSON web databases
RESTful JSON web databases
 
Lesson 19 upload your page
Lesson 19 upload your pageLesson 19 upload your page
Lesson 19 upload your page
 
Deploy and Publish Web Service
Deploy and Publish Web ServiceDeploy and Publish Web Service
Deploy and Publish Web Service
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
Get_vs_Post
Get_vs_PostGet_vs_Post
Get_vs_Post
 
Hosting
HostingHosting
Hosting
 
Html
HtmlHtml
Html
 
HTML CSS web engineering slides topics
HTML CSS web engineering slides topicsHTML CSS web engineering slides topics
HTML CSS web engineering slides topics
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
 
Get method and post method
Get method and post methodGet method and post method
Get method and post method
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Scalable Reliable Secure REST
Scalable Reliable Secure RESTScalable Reliable Secure REST
Scalable Reliable Secure REST
 
Website Planning & Designing By Er. Kapil Bhargava
Website Planning & Designing By Er. Kapil BhargavaWebsite Planning & Designing By Er. Kapil Bhargava
Website Planning & Designing By Er. Kapil Bhargava
 
Develop webservice in PHP
Develop webservice in PHPDevelop webservice in PHP
Develop webservice in PHP
 
Browsers_SameOriginPolicy_CORS_ContentSecurityPolicy
Browsers_SameOriginPolicy_CORS_ContentSecurityPolicyBrowsers_SameOriginPolicy_CORS_ContentSecurityPolicy
Browsers_SameOriginPolicy_CORS_ContentSecurityPolicy
 
Presentation3
Presentation3Presentation3
Presentation3
 
DNS 101 for Non-Techs
DNS 101 for Non-TechsDNS 101 for Non-Techs
DNS 101 for Non-Techs
 
Same origin policy
Same origin policySame origin policy
Same origin policy
 
Lecture19
Lecture19Lecture19
Lecture19
 

Viewers also liked

DoSell vision, services overview
DoSell vision, services overviewDoSell vision, services overview
DoSell vision, services overviewLabSharegroup
 
Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"
Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"
Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"Iuliia Usatiuk
 
完美激励——使能加水系统
完美激励——使能加水系统完美激励——使能加水系统
完美激励——使能加水系统naturalzx
 
Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...
Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...
Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...ONE BDS
 
実はできているWebアクセシビリティ 007
実はできているWebアクセシビリティ 007実はできているWebアクセシビリティ 007
実はできているWebアクセシビリティ 007株式会社トライブ
 
Entrepreneurship & Innovation 2006 -Agenda & Planner
Entrepreneurship & Innovation 2006 -Agenda & PlannerEntrepreneurship & Innovation 2006 -Agenda & Planner
Entrepreneurship & Innovation 2006 -Agenda & PlannerArturo Pelayo
 
Estudio económico de América Latina y el Caribe 2008-2009
Estudio económico de América Latina y el Caribe 2008-2009Estudio económico de América Latina y el Caribe 2008-2009
Estudio económico de América Latina y el Caribe 2008-2009CEPAL, Naciones Unidas
 
Защита прав ребенка
Защита прав ребенкаЗащита прав ребенка
Защита прав ребенкаDerjava
 
Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...
Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...
Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...Iuliia Usatiuk
 
Ghid practic de comunicare test
Ghid practic de comunicare testGhid practic de comunicare test
Ghid practic de comunicare testanpizone
 
օրգանիզմների անհատական զարգազոընը
օրգանիզմների անհատական զարգազոընըօրգանիզմների անհատական զարգազոընը
օրգանիզմների անհատական զարգազոընըAslanian ZHora
 
վերածնունդ 1
վերածնունդ 1վերածնունդ 1
վերածնունդ 1Aslanian ZHora
 

Viewers also liked (19)

DoSell vision, services overview
DoSell vision, services overviewDoSell vision, services overview
DoSell vision, services overview
 
Un modelo para integrar
Un modelo para integrarUn modelo para integrar
Un modelo para integrar
 
Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"
Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"
Презентация "1С:Управление небольшой фирмой. Новое в версии 1.6.1"
 
完美激励——使能加水系统
完美激励——使能加水系统完美激励——使能加水系统
完美激励——使能加水系统
 
Mentira original ensayo
Mentira original ensayoMentira original ensayo
Mentira original ensayo
 
Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...
Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...
Liền kề Pandora - Liền kề Triều Khúc. Cập nhật mới nhất bảng hàng thông tin, ...
 
WearTest_Welcome_Guide_12
WearTest_Welcome_Guide_12WearTest_Welcome_Guide_12
WearTest_Welcome_Guide_12
 
Sylabus
SylabusSylabus
Sylabus
 
Informatica 2 [reparado]
Informatica 2 [reparado]Informatica 2 [reparado]
Informatica 2 [reparado]
 
実はできているWebアクセシビリティ 007
実はできているWebアクセシビリティ 007実はできているWebアクセシビリティ 007
実はできているWebアクセシビリティ 007
 
Entrepreneurship & Innovation 2006 -Agenda & Planner
Entrepreneurship & Innovation 2006 -Agenda & PlannerEntrepreneurship & Innovation 2006 -Agenda & Planner
Entrepreneurship & Innovation 2006 -Agenda & Planner
 
Estudio económico de América Latina y el Caribe 2008-2009
Estudio económico de América Latina y el Caribe 2008-2009Estudio económico de América Latina y el Caribe 2008-2009
Estudio económico de América Latina y el Caribe 2008-2009
 
2015
20152015
2015
 
Защита прав ребенка
Защита прав ребенкаЗащита прав ребенка
Защита прав ребенка
 
Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...
Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...
Презентация "Ценообразование в 1С:ERP и 1С:Рознице, различия и особенности со...
 
Ghid practic de comunicare test
Ghid practic de comunicare testGhid practic de comunicare test
Ghid practic de comunicare test
 
օրգանիզմների անհատական զարգազոընը
օրգանիզմների անհատական զարգազոընըօրգանիզմների անհատական զարգազոընը
օրգանիզմների անհատական զարգազոընը
 
վերածնունդ 1
վերածնունդ 1վերածնունդ 1
վերածնունդ 1
 
EL SIAF Y SIGA EN EL MARCO DE LA MODERNIZACIÓN DE LA GESTIÓN PÚBLICA
EL SIAF Y SIGA EN EL MARCO DE LA MODERNIZACIÓN  DE LA GESTIÓN PÚBLICAEL SIAF Y SIGA EN EL MARCO DE LA MODERNIZACIÓN  DE LA GESTIÓN PÚBLICA
EL SIAF Y SIGA EN EL MARCO DE LA MODERNIZACIÓN DE LA GESTIÓN PÚBLICA
 

Similar to Introduction to Rest Protocol

What are restful web services?
What are restful web services?What are restful web services?
What are restful web services?Aparna Sharma
 
Jmp206 Web Services Bootcamp Final Draft
Jmp206   Web Services Bootcamp Final DraftJmp206   Web Services Bootcamp Final Draft
Jmp206 Web Services Bootcamp Final DraftBill Buchan
 
An introduction to HTTP/2 & Service Workers for SEOs
An introduction to HTTP/2 & Service Workers for SEOsAn introduction to HTTP/2 & Service Workers for SEOs
An introduction to HTTP/2 & Service Workers for SEOsTom Anthony
 
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...Distilled
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0megrhi haikel
 
Lotusphere 2008 - Jumpstart 206 - Web Services Bootcamp
Lotusphere 2008 - Jumpstart 206 - Web Services BootcampLotusphere 2008 - Jumpstart 206 - Web Services Bootcamp
Lotusphere 2008 - Jumpstart 206 - Web Services BootcampBill Buchan
 
jmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstartjmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services JumpstartBill Buchan
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web servicesNeil Ghosh
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick IntroSascha Wenninger
 
Application server vs Web Server
Application server vs Web ServerApplication server vs Web Server
Application server vs Web ServerGagandeep Singh
 
Purpose and principles of web server and application server
Purpose and principles of web server and application serverPurpose and principles of web server and application server
Purpose and principles of web server and application serverJames Brown
 

Similar to Introduction to Rest Protocol (20)

Restful web services
Restful web servicesRestful web services
Restful web services
 
What are restful web services?
What are restful web services?What are restful web services?
What are restful web services?
 
Jmp206 Web Services Bootcamp Final Draft
Jmp206   Web Services Bootcamp Final DraftJmp206   Web Services Bootcamp Final Draft
Jmp206 Web Services Bootcamp Final Draft
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
Servlet & jsp
Servlet  &  jspServlet  &  jsp
Servlet & jsp
 
An introduction to HTTP/2 & Service Workers for SEOs
An introduction to HTTP/2 & Service Workers for SEOsAn introduction to HTTP/2 & Service Workers for SEOs
An introduction to HTTP/2 & Service Workers for SEOs
 
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0
 
Lotusphere 2008 - Jumpstart 206 - Web Services Bootcamp
Lotusphere 2008 - Jumpstart 206 - Web Services BootcampLotusphere 2008 - Jumpstart 206 - Web Services Bootcamp
Lotusphere 2008 - Jumpstart 206 - Web Services Bootcamp
 
jmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstartjmp206 - Lotus Domino Web Services Jumpstart
jmp206 - Lotus Domino Web Services Jumpstart
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
Web services - REST and SOAP
Web services - REST and SOAPWeb services - REST and SOAP
Web services - REST and SOAP
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick Intro
 
REST Servers in Delphi XE Using DataSnap
REST Servers in Delphi XE Using DataSnapREST Servers in Delphi XE Using DataSnap
REST Servers in Delphi XE Using DataSnap
 
Application server vs Web Server
Application server vs Web ServerApplication server vs Web Server
Application server vs Web Server
 
Purpose and principles of web server and application server
Purpose and principles of web server and application serverPurpose and principles of web server and application server
Purpose and principles of web server and application server
 
Web server
Web serverWeb server
Web server
 
0130225347
01302253470130225347
0130225347
 

Recently uploaded

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
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
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
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
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
 
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
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
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
 
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
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 

Recently uploaded (20)

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
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
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
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
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
 
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
 
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
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
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
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 

Introduction to Rest Protocol

  • 1. REST stands for REpresentational State Transfer. It is most popular architecture used in cloud based servers and is preferred over SOAP (Standard Object Access Protocol). To put it straight, a peculiar SOAP request consists of XML file like: <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <isbn>54379678</isbn> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> </catlog> and a peculiar REST URL will look like: http://books.com/GambardellaMatthew/54379678 This clarifies how easy it is to use REST. REST is HTTP based The URL above can be suitably modified to suit your need. REST request consists of two parts, Verb and Content. Verb tells us what to do on the contents. This is just like a Cellphone box with instruction manual, cellphone is the content and manual is the VERB. Peculiar characteristics of REST explained in short: Every resource on the server can be reached by a unique URI like the above: http://books.com/GambardellaMatthew/54379678 The message has the verb embedded in it, and the resource is a mere storage. You can retrieve a small portion of a database, depending on the parameters you pass and the format You need not bother about where and how is the data is stored. You can get the same chunk or data either in XML or JSON or CSV, either encoded in UTF-8 or some other encoding. REST web services are "Stateless". The server doesn't bother once it sends the response to the client. While shopping on some online shopping site, you query for some particular item and you add it to your cart. The "cart" is a thing that resides on your machine and not on the server. (This is the most common way of storing cart. There are "Persistent shopping Carts" which store the cart on the server) If you add some 25 items to your cart and then if you clear your cookies, cache etc, all your efforts go waste and you have to satrt all over again. Statelessness makes things simple a all the requests in HTTP request sequence don't create confusion. HTTP is itself stateless and REST can easily marry with HTTP. REST is language neutral. You can implement in C#, Java, Python or language of your choice. REST is cacheable. What is a Cache? Cache is some place other than the server itself, where the response from server is stored temporarily. It can be on the end client, or at some other intermittent server. If you want to experience the effect of cache, do a thing. Open some dense web page. (Unlike google.com, contents on which are very few). Notice the time it take to fully load the page. Now, close the page and gain notice the time. Now clear the cache of your browser. If you are using Chrome: http://www.technipages.com/google-chrome-clear-cache , similar things can be done on Firefox, Opera or other browsers. ketkaravinash@yahoo.com
  • 2. Now again load the page. The page will take slightly longer than previous. This is because, now the page is loaded from the server and not from the cache that is stored on your machine. If you are a developer, you always have to disable the cache so that the changes you make in your PHP, Javascript code or if you make changes in the images on your web page, they get reflected in the browser. Brief description about Verb part of the REST request: GET : GET request is fired for GETting something (Pardon the pun) . When you type the URL like http://google.com in your browser address bar, you are in fact requesting, "Go, GET me the search engine facility from the google server". Google and other search engines like Bing, continously crowl the web and "GET" information about what is stored on different web pages at different web sites. Website owners have control over what to make available to which engines, or completely hide some or all resources (that is, pages, images, documents etc). GET verb makes changes at the client side, ie the browser. It doesn't make any change at the server. Search engines naturally shouldn't be allowed to insert, modify or delete anything on any site they crawl. If you open a website and hit the refresh button of your browser n number of times, it doesn't make any difference at the server. If you search 100 different terms using google, you, by your own will cannot make any change at the server. But server can volunteerly make changes in its state, like storing serch terms with IP address, your browsing habits reported by the cookies etc. POST: POST is a verb designed for "creating" something at the server. You are filling a registration form with columns like Nmae, Surname, address, email etc, on the website. You fill all the columns and hit the "Register" button. Your browser then makes "POST" request to the server. Now again, it is upto the server to allow your POST request to make changes in its state. Your IP address is also sent with the POST request. If your IP indicates that you are from particular region and the server doesn't allow POST request from that region, it communicates it to the client. (or is supposed to communicate so to the client in the words comprehencible to the client.) GET and POST are most widely used verbs in the REST. Daily life anology for these is telephonic IVR (Interactive Voice Response). You dial the number of some utility helpline, say, your cellphone provider. You want to GET something from other end. IVR responds and asks you to dial some number. While dialing the number, you are POSTing something. The IVR in response to your answer, provides the information. Now again you are GETting the information. When you want to change some of your account options, you POST the information. Again, after checking the information for some preset conditions, the IVR may reject the request and ask you to provide in information again, or it may accept the request and change the state of the database. Another thing that makes this work is the RESPECT FOR PROTOCOL. I say "Rkdfkldu". Did you understand? surely not because I speak Klnj language and you speak Jyuk language. If we both speak English, we both express our planet as Earth. These are liguistic protocol. There also are cultural protocol. Different gustures mean differntly across cultures. When you show your thumb, you may be warmly greeted somewhere, and somewhere you may bet beaten. One should be especialy careful while using circasm and make sure the server has ability to know the protocol, and not interpret it as insult. Other verbs used in REST are: PUT, UPDATE and DELETE. ketkaravinash@yahoo.com
  • 3. PUT: PUT is silimilar to POST. Both PUT and POST send data to the server. Difference lies in what happens when the same contents are sent twice to the server. If you are already registered your email on a particular server, the server refuses your request and doesn't create a new record while using PUT. But if your email exists and your phone number changes, PUT updates the existing record and doesn't create a new one. PUT is used for UPDATION an POST for creation. DELETE, as the name implies, deletes data from the server. Ofcourse, client can request a DELETE but cannot force it. Server can schedule the DELETE at some suitable time, say time when there is less load on the server. DELETE can be denied if the resource is critical or a particular client doesn't have delete previllege for that resource. Facebook keeps the data for some period after account closure for legal reasons. ketkaravinash@yahoo.com