SlideShare ist ein Scribd-Unternehmen logo
1 von 29
REST based Web Services
• Overall Web Services architecture consists of many layers including
protocols and standards for security and reliability.
• Therefore it becomes complicated and time/resource consuming for
developers of simple web services.
• Web Services can be implemented in Web environments too, on top of
basic Web technologies such as HTTP, Simple Mail Transfer Protocol
(SMTP), and so on.
REpresentational State Transfer (REST) has gained widespread
acceptance across the Web as a simpler alternative to SOAP and WSDL
based Web services.
REST defines a set of architectural principles by which you can design
Web services that focus on a system’s resources, including how resource
states are addressed and transferred over HTTP by a wide range of
clients written in different languages.
Simply put, it is the architecture of the Web.
REST has emerged in the last several years alone as a predominant Web service design
model.
REST has had such a large impact on the Web that it has mostly displaced SOAP- and
WSDL-based interface design because it’s a considerably simpler style to use.
REST is preferable in problem domains that are query intense or that require exchange of
large grain chunks of data.
Basically, you would want to use RESTful web services for integration over the web.
SOAP and WSDL based Web services (“Big” Web services) are preferable in
areas that require asynchrony and various qualities of services.
Finally, SOAP-based custom interfaces enable straightforward creation of
new services based on choreography.
Therefore, you will use big web services in enterprise application integration
scenarios that have advanced quality of service (QoS) requirements.
What is REST?
“Representational State Transfer is intended to evoke an image of how a
well-designed web application behaves: a network of web pages (a virtual
state-machine), where the user progresses through an application by
selecting links (state transitions), resulting in the next page ( representing the
next state of the application) being transferred to the user and rendered for
their use.
REST- An Architectural Style of Networked System
Underlying Architectural model of the World Wide Web.
Guiding framework for Web protocol standards.
RESR based web services
Online shopping
Search services
Dictionary services.
Characteristics of a REST based network
Client-Server: a pull-based interaction style (Client request data from servers as
and when needed).
Stateless: each request from client to server must contain all the information
necessary to understand the request, and cannot take advantage of any stored
context on the server.
Cache: to improve network efficiency, responses must be capable of being
labelled as caheable or non-cacheable.
Uniform interface: all resources are accessed with a generic interface (e.g.,
HTTP GET, POST, PUT, DELETE).
Named resources: the system is comprised of resources which are named using a URL.
Interconnected resource representation: the representations of the resources are
interconnected using URLs, thereby enabling a client to progress from one state to another.
The characteristics of the restful web services are as below:
The restful web services have a pull-based client-server interaction manner.
Every request from the client to the server must possess the required data to understand the
request and it cannot take the profit of any saved content on the server.
To advance or develop the network efficiency outputs it must be capable of being labelled
as cacheable or non-cacheable.
Principles of REST web service design
• Identify all the conceptual entities that we wish to expose as services.
(Examples we saw include resources such as : parts list, detailed part data,
purchase order)
• Create a URL to each resource.
• Categorize our resources according to whether clients can just receive a
representation of the resource (using an HTTP GET), or whether clients can
modify (add to) the resource using HTTP POST, PUT and/or DELETE).
• All resources accessible via HTTP GET should be side-effect free. That is, the resource
should just return a representation of the resource. Invoking the resource should not result
in modifying the resource.
• Put hyperlinks within resource representations to enable clients to drill down for more
information, and/or to obtain related information.
• Design to reveal data gradually. Don’t reveal everything in a single response document.
Provide hyperlinks to obtain more details.
• Specify the format of response data using a schema (DTD, W3C Schema, RelaxNG or
Schematron). For those services that require a POST or PUT to it, also provide a schema
to specify the format of the response.
• Describe how our services are to be invoked using either a WDL document or simply an
HTML document.
Principles of Restful Web Services:
The principles of the restful web services are as follows:
• REST network is a key for designing the web services.
• It requires or needs to create a URL for every device.
• The resources have to be arranged in a format that helps the client.
• The resources accessible through HTTP should be free of side effect.
• The hyperlinks should be kept within the representation of resources.
• The design should be in a manner that reveals the information gradually.
Advantages of Restful Web Services:
The advantages of restful web services are as follows:
• The restful web services have the scalable equipment interactions.
• It possesses the general interfaces.
• It can independently deploy the connections.
• It decreases the interaction latency.
• It strengthens or improves the security.
• It has the feature of safe encapsulation of legacy systems.
• It sustains the proxies and gateways as information transformation and caching
equipment.
• Restful web services scale to a huge number of clients.
• It enables the alienate of information in streams that possess infinite size.
Disadvantages of Restful Web Services:
The disadvantages of restful web services are as follows:
• It destroys few advantages of other architectures.
• Restful web services have a state of interaction with an FTP site.
• It contains a single interface for everything.
• It reduces the performances of the new by enhancing the repetitive
information.
Why are Restful Web Services so popular?
Restful Web Services have become popular due to the below-mentioned
reasons:
• Its heterogeneous language environment has made it very popular.
• It assists web applications in different programming languages for better
communication.
• The web applications reside in a variety of environments with the
assistance of Restful services.
REST Web Services
RESTful Web Services
• In the web services terms, REpresentational State Transfer (REST) is a
stateless client-server architecture in which the web services are viewed as
resources and can be identified by their URIs.
• Web service clients that want to use these resources access via globally
defined set of remote methods that describe the action to be performed on
the resource.
• In the REST architecture style, clients and servers exchange
representations of resources by using a standardized interface and
protocol.
• REST isn't protocol specific, but when people talk about REST they
usually mean REST over HTTP.
• The response from server is considered as the representation of the
resources (that can be generated from one resource or more number of
resources).
• RESTFul web services are based on HTTP methods and the concept of
REST. A RESTFul web service typically defines the base URI for the
services, the supported MIME-types (XML, text, JSON, user-defined, ...)
and the set of operations (POST, GET, PUT, DELETE) which are
supported. A concrete implementation of a REST Web service follows four
basic design principles:
Use HTTP methods explicitly.
Be stateless.
Expose directory structure-like URIs.
Transfer XML, JavaScript Object Notation (JSON), or both.
JAX-RS - Java API for RESTful Web Services, is a set of APIs to develop
REST service. JAX-RS is part of the Java EE, and make developers to
develop REST web application easily. There are two main implementation of
JAX-RS API: Jersey and RESTEasy Jersey is the open source, production
quality,
JAX-RS (JSR 311) Reference Implementation for building RESTful Web
services. But, it is also more than the Reference Implementation. Jersey
provides an API so that developers may extend Jersey to suit their needs.
Differences between SOAP and REST
No SOAP REST
1. SOAP is a protocol REST is an architectural style.
2. SOAP stands for Simple Object
Access Protocol.
REST stands for REpresentational State
Transfer.
3. SOAP can't use REST because it is a
protocol.
REST can use SOAP web services
because it is a concept and can use any
protocol like HTTP, SOAP
4. SOAP uses services interfaces to
expose the business logic
REST uses URI to expose business logic.
5. JAX-WS is the java API for SOAP
web services.
JAX-RS is the java API for RESTful web
services.
6. SOAP defines standards to be
strictly followed.
REST does not define too much
standards like SOAP.
7. SOAP requires more bandwidth
and resources than REST.
REST requires less bandwidth and
resources than SOAP.
8. SOAP defines its own security. RESTful web services inherits security
measures from the underlying
transport.
9. SOAP permits XML data format
only
REST permits different data format such
as Plain text, HTML, XML, JSON etc.
10. SOAP is less preferred than
REST
REST more preferred than SOAP
SOAP vs REST based Web Services
SOAP Web Services
Advantages:
WS Security: SOAP defines its own security known as WS Security which adds some
enterprise security features. Supports identity through intermediaries, not just point to point
(SSL). It also provides a standard implementation of data integrity and data privacy.
Atomic Transaction: SOAP supports ACID (Atomicity, Consistency, Isolation, Durability)
compliant transactions. Internet apps generally don’t need this level of transactional reliability,
enterprise apps sometimes do.
Reliable Messaging: SOAP has successful/retry logic built in and provides end-to-end
reliability even through SOAP intermediaries.
Disadvantages:
Slow: SOAP uses XML format that must be parsed to be read. It defines many
standards that must be followed while developing the SOAP applications.
So it is slow and consumes more bandwidth and resource.
WSDL dependent: SOAP uses WSDL and doesn't have any other mechanism
to discover the service.
RESTful Web Services
Advantages:
Fast: RESTful Web Services are fast because there is no strict
specification like SOAP. It consumes less bandwidth and resource.
Can use SOAP: RESTful web services can use SOAP web services as the
implementation.
Permits different data format: RESTful web service permits different
data format such as Plain Text, HTML, XML and JSON.
Disadvantages:
ACID Transactions: REST supports transactions, but it isn’t as comprehensive and
isn’t ACID compliant.
REST is limited by HTTP itself which can’t provide two-phase commit across
distributed transactional resources, but SOAP can.
WS Security: REST supports just a standard security technology for establishing an
encrypted link between a server and a client SSL (Secure Sockets Layer).
Reliable Messaging: REST doesn’t have a standard messaging system and expects
clients to deal with communication failures by retrying.
even though REST is more popular and preferable for Web apps and Web based
services, SOAP is still useful and important for some enterprise solutions and highly
reliable applications (e.g. bank clients, etc.)
REST Web Services are:
Modern
Light weight
Use a lot of concepts behind HTTP
When to choose REST?
• REST should be chosen when you have to develop a highly secure and
complex API, which supports different protocols.
• Although SOAP may be a good choice, REST may be better when you have
to develop lightweight APIs with great performance and support for CURD
operations.

Weitere ähnliche Inhalte

Ähnlich wie REST Introduction.ppt

Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Aravindharamanan S
 
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archunit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archsudharani127782
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-servicesIjirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-servicesIJIR JOURNALS IJIRUSA
 
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
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfAparna Sharma
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-servicesrporwal
 
IRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET Journal
 
Cordova training - Day 8 - REST API's
Cordova training - Day 8 - REST API'sCordova training - Day 8 - REST API's
Cordova training - Day 8 - REST API'sBinu Paul
 
What are restful web services?
What are restful web services?What are restful web services?
What are restful web services?Aparna Sharma
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservicesGagandeep Singh
 
RESTfulll web services
RESTfulll web servicesRESTfulll web services
RESTfulll web servicesJuan Sandoval
 
Rest webservice ppt
Rest webservice pptRest webservice ppt
Rest webservice pptsinhatanay
 
RESTful services
RESTful servicesRESTful services
RESTful servicesPedram Bashiri
 
RESTful API by abubakar
RESTful API by abubakarRESTful API by abubakar
RESTful API by abubakarKenAndTea
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful ServicesDamian T. Gordon
 
Rest web service
Rest web serviceRest web service
Rest web serviceHamid Ghorbani
 

Ähnlich wie REST Introduction.ppt (20)

Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0
 
Unit 2
Unit 2Unit 2
Unit 2
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archunit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-servicesIjirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
 
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
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-services
 
IRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce Site
 
Cordova training - Day 8 - REST API's
Cordova training - Day 8 - REST API'sCordova training - Day 8 - REST API's
Cordova training - Day 8 - REST API's
 
What are restful web services?
What are restful web services?What are restful web services?
What are restful web services?
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservices
 
RESTfulll web services
RESTfulll web servicesRESTfulll web services
RESTfulll web services
 
Rest webservice ppt
Rest webservice pptRest webservice ppt
Rest webservice ppt
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
RESTful API by abubakar
RESTful API by abubakarRESTful API by abubakar
RESTful API by abubakar
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 

Mehr von KGSCSEPSGCT

Introduction to Distributed Systems
Introduction to Distributed SystemsIntroduction to Distributed Systems
Introduction to Distributed SystemsKGSCSEPSGCT
 
Unit4_Managing Contracts.ppt
Unit4_Managing Contracts.pptUnit4_Managing Contracts.ppt
Unit4_Managing Contracts.pptKGSCSEPSGCT
 
WSstandards.ppt
WSstandards.pptWSstandards.ppt
WSstandards.pptKGSCSEPSGCT
 
3-SchemaExamples.pdf
3-SchemaExamples.pdf3-SchemaExamples.pdf
3-SchemaExamples.pdfKGSCSEPSGCT
 
Converting DTDs to XML Schemas.pdf
Converting DTDs to XML Schemas.pdfConverting DTDs to XML Schemas.pdf
Converting DTDs to XML Schemas.pdfKGSCSEPSGCT
 
XSL- XSLT.pdf
XSL- XSLT.pdfXSL- XSLT.pdf
XSL- XSLT.pdfKGSCSEPSGCT
 
XML-INTRODUCTION.pdf
XML-INTRODUCTION.pdfXML-INTRODUCTION.pdf
XML-INTRODUCTION.pdfKGSCSEPSGCT
 
XML Schema.pdf
XML Schema.pdfXML Schema.pdf
XML Schema.pdfKGSCSEPSGCT
 

Mehr von KGSCSEPSGCT (12)

Introduction to Distributed Systems
Introduction to Distributed SystemsIntroduction to Distributed Systems
Introduction to Distributed Systems
 
Unit4_Managing Contracts.ppt
Unit4_Managing Contracts.pptUnit4_Managing Contracts.ppt
Unit4_Managing Contracts.ppt
 
WSstandards.ppt
WSstandards.pptWSstandards.ppt
WSstandards.ppt
 
UDDI.ppt
UDDI.pptUDDI.ppt
UDDI.ppt
 
ROA.ppt
ROA.pptROA.ppt
ROA.ppt
 
3-SchemaExamples.pdf
3-SchemaExamples.pdf3-SchemaExamples.pdf
3-SchemaExamples.pdf
 
Converting DTDs to XML Schemas.pdf
Converting DTDs to XML Schemas.pdfConverting DTDs to XML Schemas.pdf
Converting DTDs to XML Schemas.pdf
 
XSL- XSLT.pdf
XSL- XSLT.pdfXSL- XSLT.pdf
XSL- XSLT.pdf
 
XML-INTRODUCTION.pdf
XML-INTRODUCTION.pdfXML-INTRODUCTION.pdf
XML-INTRODUCTION.pdf
 
XSLT.ppt
XSLT.pptXSLT.ppt
XSLT.ppt
 
2-DTD.ppt
2-DTD.ppt2-DTD.ppt
2-DTD.ppt
 
XML Schema.pdf
XML Schema.pdfXML Schema.pdf
XML Schema.pdf
 

KĂźrzlich hochgeladen

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto GonzĂĄlez Trastoy
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 

KĂźrzlich hochgeladen (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 

REST Introduction.ppt

  • 1. REST based Web Services
  • 2. • Overall Web Services architecture consists of many layers including protocols and standards for security and reliability. • Therefore it becomes complicated and time/resource consuming for developers of simple web services. • Web Services can be implemented in Web environments too, on top of basic Web technologies such as HTTP, Simple Mail Transfer Protocol (SMTP), and so on.
  • 3. REpresentational State Transfer (REST) has gained widespread acceptance across the Web as a simpler alternative to SOAP and WSDL based Web services. REST defines a set of architectural principles by which you can design Web services that focus on a system’s resources, including how resource states are addressed and transferred over HTTP by a wide range of clients written in different languages.
  • 4. Simply put, it is the architecture of the Web. REST has emerged in the last several years alone as a predominant Web service design model. REST has had such a large impact on the Web that it has mostly displaced SOAP- and WSDL-based interface design because it’s a considerably simpler style to use. REST is preferable in problem domains that are query intense or that require exchange of large grain chunks of data. Basically, you would want to use RESTful web services for integration over the web.
  • 5. SOAP and WSDL based Web services (“Big” Web services) are preferable in areas that require asynchrony and various qualities of services. Finally, SOAP-based custom interfaces enable straightforward creation of new services based on choreography. Therefore, you will use big web services in enterprise application integration scenarios that have advanced quality of service (QoS) requirements.
  • 6. What is REST? “Representational State Transfer is intended to evoke an image of how a well-designed web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page ( representing the next state of the application) being transferred to the user and rendered for their use.
  • 7. REST- An Architectural Style of Networked System Underlying Architectural model of the World Wide Web. Guiding framework for Web protocol standards.
  • 8. RESR based web services Online shopping Search services Dictionary services.
  • 9. Characteristics of a REST based network Client-Server: a pull-based interaction style (Client request data from servers as and when needed). Stateless: each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server. Cache: to improve network efficiency, responses must be capable of being labelled as caheable or non-cacheable. Uniform interface: all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE).
  • 10. Named resources: the system is comprised of resources which are named using a URL. Interconnected resource representation: the representations of the resources are interconnected using URLs, thereby enabling a client to progress from one state to another. The characteristics of the restful web services are as below: The restful web services have a pull-based client-server interaction manner. Every request from the client to the server must possess the required data to understand the request and it cannot take the profit of any saved content on the server. To advance or develop the network efficiency outputs it must be capable of being labelled as cacheable or non-cacheable.
  • 11. Principles of REST web service design • Identify all the conceptual entities that we wish to expose as services. (Examples we saw include resources such as : parts list, detailed part data, purchase order) • Create a URL to each resource. • Categorize our resources according to whether clients can just receive a representation of the resource (using an HTTP GET), or whether clients can modify (add to) the resource using HTTP POST, PUT and/or DELETE).
  • 12. • All resources accessible via HTTP GET should be side-effect free. That is, the resource should just return a representation of the resource. Invoking the resource should not result in modifying the resource. • Put hyperlinks within resource representations to enable clients to drill down for more information, and/or to obtain related information. • Design to reveal data gradually. Don’t reveal everything in a single response document. Provide hyperlinks to obtain more details. • Specify the format of response data using a schema (DTD, W3C Schema, RelaxNG or Schematron). For those services that require a POST or PUT to it, also provide a schema to specify the format of the response. • Describe how our services are to be invoked using either a WDL document or simply an HTML document.
  • 13. Principles of Restful Web Services: The principles of the restful web services are as follows: • REST network is a key for designing the web services. • It requires or needs to create a URL for every device. • The resources have to be arranged in a format that helps the client. • The resources accessible through HTTP should be free of side effect. • The hyperlinks should be kept within the representation of resources. • The design should be in a manner that reveals the information gradually.
  • 14. Advantages of Restful Web Services: The advantages of restful web services are as follows: • The restful web services have the scalable equipment interactions. • It possesses the general interfaces. • It can independently deploy the connections. • It decreases the interaction latency. • It strengthens or improves the security. • It has the feature of safe encapsulation of legacy systems. • It sustains the proxies and gateways as information transformation and caching equipment. • Restful web services scale to a huge number of clients. • It enables the alienate of information in streams that possess infinite size.
  • 15. Disadvantages of Restful Web Services: The disadvantages of restful web services are as follows: • It destroys few advantages of other architectures. • Restful web services have a state of interaction with an FTP site. • It contains a single interface for everything. • It reduces the performances of the new by enhancing the repetitive information.
  • 16. Why are Restful Web Services so popular? Restful Web Services have become popular due to the below-mentioned reasons: • Its heterogeneous language environment has made it very popular. • It assists web applications in different programming languages for better communication. • The web applications reside in a variety of environments with the assistance of Restful services.
  • 18. RESTful Web Services • In the web services terms, REpresentational State Transfer (REST) is a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URIs. • Web service clients that want to use these resources access via globally defined set of remote methods that describe the action to be performed on the resource.
  • 19. • In the REST architecture style, clients and servers exchange representations of resources by using a standardized interface and protocol. • REST isn't protocol specific, but when people talk about REST they usually mean REST over HTTP. • The response from server is considered as the representation of the resources (that can be generated from one resource or more number of resources).
  • 20. • RESTFul web services are based on HTTP methods and the concept of REST. A RESTFul web service typically defines the base URI for the services, the supported MIME-types (XML, text, JSON, user-defined, ...) and the set of operations (POST, GET, PUT, DELETE) which are supported. A concrete implementation of a REST Web service follows four basic design principles: Use HTTP methods explicitly. Be stateless. Expose directory structure-like URIs. Transfer XML, JavaScript Object Notation (JSON), or both.
  • 21. JAX-RS - Java API for RESTful Web Services, is a set of APIs to develop REST service. JAX-RS is part of the Java EE, and make developers to develop REST web application easily. There are two main implementation of JAX-RS API: Jersey and RESTEasy Jersey is the open source, production quality, JAX-RS (JSR 311) Reference Implementation for building RESTful Web services. But, it is also more than the Reference Implementation. Jersey provides an API so that developers may extend Jersey to suit their needs.
  • 22. Differences between SOAP and REST No SOAP REST 1. SOAP is a protocol REST is an architectural style. 2. SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer. 3. SOAP can't use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP 4. SOAP uses services interfaces to expose the business logic REST uses URI to expose business logic. 5. JAX-WS is the java API for SOAP web services. JAX-RS is the java API for RESTful web services.
  • 23. 6. SOAP defines standards to be strictly followed. REST does not define too much standards like SOAP. 7. SOAP requires more bandwidth and resources than REST. REST requires less bandwidth and resources than SOAP. 8. SOAP defines its own security. RESTful web services inherits security measures from the underlying transport. 9. SOAP permits XML data format only REST permits different data format such as Plain text, HTML, XML, JSON etc. 10. SOAP is less preferred than REST REST more preferred than SOAP
  • 24. SOAP vs REST based Web Services SOAP Web Services Advantages: WS Security: SOAP defines its own security known as WS Security which adds some enterprise security features. Supports identity through intermediaries, not just point to point (SSL). It also provides a standard implementation of data integrity and data privacy. Atomic Transaction: SOAP supports ACID (Atomicity, Consistency, Isolation, Durability) compliant transactions. Internet apps generally don’t need this level of transactional reliability, enterprise apps sometimes do. Reliable Messaging: SOAP has successful/retry logic built in and provides end-to-end reliability even through SOAP intermediaries.
  • 25. Disadvantages: Slow: SOAP uses XML format that must be parsed to be read. It defines many standards that must be followed while developing the SOAP applications. So it is slow and consumes more bandwidth and resource. WSDL dependent: SOAP uses WSDL and doesn't have any other mechanism to discover the service.
  • 26. RESTful Web Services Advantages: Fast: RESTful Web Services are fast because there is no strict specification like SOAP. It consumes less bandwidth and resource. Can use SOAP: RESTful web services can use SOAP web services as the implementation. Permits different data format: RESTful web service permits different data format such as Plain Text, HTML, XML and JSON.
  • 27. Disadvantages: ACID Transactions: REST supports transactions, but it isn’t as comprehensive and isn’t ACID compliant. REST is limited by HTTP itself which can’t provide two-phase commit across distributed transactional resources, but SOAP can. WS Security: REST supports just a standard security technology for establishing an encrypted link between a server and a client SSL (Secure Sockets Layer). Reliable Messaging: REST doesn’t have a standard messaging system and expects clients to deal with communication failures by retrying. even though REST is more popular and preferable for Web apps and Web based services, SOAP is still useful and important for some enterprise solutions and highly reliable applications (e.g. bank clients, etc.)
  • 28. REST Web Services are: Modern Light weight Use a lot of concepts behind HTTP
  • 29. When to choose REST? • REST should be chosen when you have to develop a highly secure and complex API, which supports different protocols. • Although SOAP may be a good choice, REST may be better when you have to develop lightweight APIs with great performance and support for CURD operations.