0% found this document useful (0 votes)
15 views

CS 511 Service Oriented Computing_v1

Uploaded by

JANVI GUPTA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

CS 511 Service Oriented Computing_v1

Uploaded by

JANVI GUPTA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Service Oriented Computing

What is Service Oriented Computing?


 It is the paradigm for distributed computing to
enable application networks.
 This paradigm adopts the concept of services as the
main building blocks of application and system
development.
 Service orientation expresses applications and
software systems as aggregations of services that are
coordinated within a service-oriented architecture
(SOA).
 One of the most popular expressions of service
orientation is represented by Web Services.
Example of SOC?
JAVA C# GO PYTHON

Service A Service B Service C Service D


Addition Subtraction Multiplication
Division

PERL

ADD SUB ADD


PHP
MUL DIV SUB
What is a Service?
 A service encapsulates a program code that provides
a set of related functions that can be reused and
easily integrated into large and complex applications.

 Virtually any piece of code that performs a task can


be turned into a service and expose its functionalities
through a network-accessible protocol.
Characteristics of a Service
 Service invocation is explicit
 Reusable
 Programming language independent
 Location transparent
 Services share schema and contracts, not class or
interface definitions.
 Services are autonomous.
Service Oriented Architecture (SOA)
 SOA is a software architecture style that supports
service orientation.

 It organizes a software system into a collection of


interacting services.

 It is important to note that SOA is not a product but is


an architectural style.
Catalogue Example
Catalogue Example
Non SOA approach

Converter Product

Location
Catalogue Example
SOA approach

Converter Product

Location
Service Oriented Architecture (SOA)
 There are two major roles within SOA:
 Service Provider
 Service Consumer
 The service provider is the maintainer of the service and the
organization that implements and makes available one or more
services for others to use.
 The provider can publish them in a registry, together with a
service contract that specifies the nature of the service.
 The service consumer can locate the service metadata in the
registry and develop the required client components to bind
and use the service.
Service Oriented Architecture (SOA)

Service
Registry

Discover Service Publish Service

Request for Service


Service Service
Consumer Provider
Send Response
Characteristics of a SOA platforms
 Standardized service contract
 Service description documents that defines service access
point and nature of service.
 Loose coupling
 A service can easily replaced by other in a SOA platform.
 Abstraction
 Hides implementation logic of services.
 Reusability
 It is possible to leverage third-party services to deliver
required functionality by paying an appropriate fee rather
developing the same capability in-house
Characteristics of a SOA platforms
 Autonomy
 There is no need to know about implementation of
services by service consumer in SOA.
 Lack of state
 SOA does not store state of services and based on
stateless principle.
 Discoverability
 Services can be effectively discovered using service
description documents.
 Composability
 SOA are based on services that can be integrated easily.
Realization of SOA
 SOA can be realized through several technologies.
 The first implementation of SOA is CORBA and DCOM.
 Common Object Request Broker Architecture.
 Distributed Component Object Model.
 Nowadays, SOA is mostly realized through Web
services technology.
 Web services are used in cloud computing to realize
Service Oriented Architecture for cloud services.
Web Services
Web Services (WS)
 Web Services uses Internet Technologies and standards to
implement SOA.
 Following Facts make web service a prominent for SOA:
 Interoperability
 Based on well-known and vendor independent
standards.
 Quick and easy integration of heterogeneous services.
 Web services are made accessible by being hosted in a
Web server.
Web Service Architecture

Web Service
Registry
Discover Service
Universal
Publish Service
Description
Web Service
Discovery and
Definition Language
Integration (UDDI)
(WSDL)

Request for Service


HTTP
Web Service Web Service
Consumer Provider
Send Response
HTTP
Web Services Technologies Stack
Web Service Flow Language (WSFL) Web Service Flow

Static UDDI Service Discovery

Direct UDDI Service Publication

WSDL Service Description

SOAP, XML, JSON Message Format

HTTP, FTP, SMTP, MQ etc… Network

The backbone of all these technologies is XML.


Types of Web Services
 Based on service invocation technology, web services
are categorized in two types:
 SOAP Web Service
 RESTful Web Service

 Simple Object Access Protocol


 REpresentational State Transfer
Simple Object Access Protocol (SOAP)
 It is a protocol used for Web service method
invocation.
 It is an application layer protocol.
 Uses XML-based language for exchanging structured
information.
 It also uses message transfer protocols of application
layer HTTP, SMTP or FTP for communication.
 SOAP only provides the structure of messages.
SOAP Message Structure
 A SOAP message is an ordinary XML document containing the following
elements:
 Envelope
 Defines the start and the end of the message.
 It is a mandatory element.

 Header
 Contains any optional attributes of the message.
 It is an optional element.

 Body
 Contains the XML data comprising the message.
 It is a mandatory element.

 Fault
 Provides information about errors.
 It is an optional element.
SOAP Message Structure
 A SOAP message elements are declared in the default
namespace for the SOAP envelope−
http://www.w3.org/2001/12/soap-envelope

 Namespace for SOAP encoding and data types is−


http://www.w3.org/2001/12/soap-encoding
<?xml version = "1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV =
"http://www.w3.org/2001/12/soap-envelope"
xmlns:encodingStyle =
"http://www.w3.org/2001/12/soap-encoding">
<SOAP-ENV:Header>
... ...
</SOAP-ENV:Header>
<SOAP-ENV:Body>
... ...
<SOAP-ENV:Fault>
... ...
</SOAP-ENV:Fault>
...
</SOAP-ENV:Body>
</SOAP_ENV:Envelope>
SOAP Example

Web Service
Registry
Discover Service
Universal
Publish Service
Description
Web Service
Discovery and
Definition Language
Integration (UDDI)
(WSDL)

SOAP Request Message


HTTP
Temperature Temperature
Client App Web Service
SOAP Response Message
HTTP
SOAP Request Message
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">

<soap:Body xmlns:m="http://www.example.org/temp">
<m:GetTemp>
<m:CityName> Jaipur </m:CityName>
</m:GetTemp>
</soap:Body>

</soap:Envelope>
SOAP Response Message
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">

<soap:Body xmlns:m="http://www.example.org/temp">
<m:GetTempResponse>
<m:Temp> 29.1 </m:Temp>
</m:GetTempResponse>
</soap:Body>

</soap:Envelope>
RESTful Web Service
 RESTful Web Serives are based on RESTful architecute.
 According to REST:
 Each resource have a unique Id (URI).
 REST provides a model for designing network-based
software systems utilizing the client/ server model.
 A client sends a request over HTTP using the
standard HTTP methods.
 The server issues a response that includes the
representation of the resource.
RESTful Web Service
 HTTP methods are:
 GET - Request to access resource
 PUT - Update a resource
 POST - Create a resource
 DELETE - Delete a resouce
 The content of data is still transmitted using XML as part
of the HTTP content.
 REST represents a lightweight alternative to SOAP.
SOAP vs REST
SOAP REST
Requires XML parser. XML can be replaced by JSON.
Protocol Architectural Style
Can work without HTTP. Relies on HTTP.
Sophisticated tools required. Not required
More Secure Less Secure
It is less productive More Productive
Service Orientation and Cloud Computing
 Web services and Web2.0 - related technologies
constitute a fundamental building block for cloud
computing systems and applications.

 Web 2.0 applications are the front end of cloud


computing systems.

 Deliver services via Web service.

 Service orientation constitutes a natural approach to


shaping cloud computing systems.

You might also like