0% found this document useful (0 votes)
9 views1 page

Service-Oriented Software Engineering

Uploaded by

Neda'a Hamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Service-Oriented Software Engineering

Uploaded by

Neda'a Hamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Service-oriented Software Engineering

The big picture


A web service is an instance of a more general notion of a service: "an act or performance
offered by one party to another. Although the process may be tied to a physical product, the
performance is essentially intangible and does not normally result in ownership of any of the
factors of production."The essence of a service, therefore, is that the provision of the service
is independent of the application using the service. Service providers can develop
specialized services and offer these to a range of service users from different organizations.

Web Service

Intangible
Non-ownership Performance
The concept that service The essence of service
does not confer delivery without physical
ownership of production ownership.
factors.

Service Offering
The act of providing a
service to another party.

Services are reusable components that are independent (no requires interface) and are
loosely coupled. A web service is:A loosely coupled, reusable software component that
encapsulates discrete functionality, which may be distributed and programmatically accessed.
A web service is a service that is accessed using standard Internet and XML-based protocols.
Services are platform and implementation-language independent.

Reusable Component Independent

Encapsulates Functionality No Interface Requirements


Distributed Access Self-Contained

Web Service
Platform Independent Loosely Coupled

Language Agnostic Minimal Coupling


Cross-Platform Interoperability

Standard Protocols

Internet Protocols
XML-Based Protocols

Benefits of a service-oriented approach:


• Services can be offered by any service provider inside or outside of an organization
so organizations can create applications by integrating services from a range of
providers.
• The service provider makes information about the service public so that any
authorized user can use the service.
• Applications can delay the binding of services until they are deployed or until
execution. This means that applications can be reactive and adapt their operation to
cope with changes to their execution environment.
• Opportunistic construction of new services is possible. A service provider may
recognize new services that can be created by linking existing services in innovative
ways.
• Service users can pay for services according to their use rather than their provision.
Instead of buying a rarely-used component, the application developers can use an
external service that will be
Advantages of paid for only when required.
Service-Oriented Software Engineering
• Applications can be made smaller, which is particularly important for mobile devices
with limited processing and memory capabilities. Computationally-intensive
Offloading
processing can be offloaded to external services. Integration of
Processing External Services

Heavy processing Services can be


tasks can be sourced from
outsourced various providers

Usage-Based Public
Payment Accessibility

Users pay only for Services are


the services they available to
use authorized users

New Service Reactive


Creation Applications
Applications can
New services can
adapt to
be formed from
environmental
existing ones
changes

Service-oriented architectures
Service-oriented software engineering is as significant as object-oriented software
engineering. Building applications based on services allows companies and other
organizations to cooperate and make use of each other's business functions. Service-based
applications may be constructed by linking services from various providers using either a
standard programming language or a specialized workflow language.

Services
Executed on
Different
Need to
Computers
Build Link Services Standard
Service- from Various Protocols for
oriented Providers Communication
Different
Applications Service
Providers

Service-oriented architecture (SOA) is a means of developing distributed systems where


the components are stand-alone services. Services may execute on different computers
from different service providers. Standard protocols have been developed to support service
communication and information exchange.

Different
Computers

Service-
Different
oriented Stand-alone
Service
Architecture Services
Providers
(SOA) Service
Communication
Standard
Protocols
Information
Exchange

Benefits of SOA:
• Services can be provided locally or outsourced to external providers
• Services are language-independent
• Investment in legacy systems can be preserved
• Inter-organizational computing is facilitated through simplified information exchange

Advantages of Service-Oriented Architecture

Local or
Language
Outsourced
Independence
Services

Simplified
Legacy System
Information
Preservation
Exchange

Key standards:
• SOAP (Simple Object Access Protocol): a message exchange standard that supports
service communication
• WSDL (Web Service Definition Language): allows a service interface and its bindings
to be defined
• WS-BPEL (Web Services Business Process Execution Language): a standard for
workflow languages used to define service composition

SOAP (Simple Object Access


Protocol)
Web Services Standards WSDL (Web Service Definition
Language)
WS-BPEL (Web Services
Business Process Execution
Language)

WS-BPEL SOAP
A standard for workflow A message exchange
languages used to define standard that supports
service composition service communication

WSDL
Allows a service
interface and its
bindings to be defined

Existing approaches to software engineering have to evolve to reflect the service-oriented


approach to software development:
• Service engineering (software development for reuse): the development of
dependable, reusable services.
• Software development with services (software development with reuse): the
development of dependable software where services are the fundamental
components.

Evolving Software Engineering Approaches

Software
Development with Service
Services Engineering
Emphasizes
Focuses on
developing
creating
software where
dependable,
services are core
reusable services
components

A service can be defined as:A loosely coupled, reusable software component that
encapsulates discrete functionality which may be distributed and programmatically accessed.
A web service is a service that is accessed using standard Internet and XML-based protocols.

Service

Loosely Reusable Encapsulates Distributed Programmatically Web Service


Coupled Discrete Accessed
Functionality

Standard XML-based
Internet Protocols
Protocols

A critical distinction between a service and a component as defined in CBSE is that services
are independent. Services do not have a 'requires' interface. Services rely on message-based
communication with messages expressed in XML.

Choose the appropriate architectural element for system design

Service Component
Enables independent, Requires interface for
message-based interaction
communication

The service interface is defined in a service description expressed in WSDL (Web Service
Description Language). The WSDL specification defines:
• What operations the service supports and the format of the messages that are sent
and received by the service. The 'what' part of a WSDL document, called an interface,
specifies what operations the service supports, and defines the format of the
messages that are sent and received by the service.

Supported
Operations
Interface
Message
WSDL Formats
Operations
Document

Message
Formats

• How the service is accessed - that is, the binding maps the abstract interface onto a
concrete set of protocols. The 'how' part of a WSDL document, called a binding, maps
the abstract interface to a concrete set of protocols. The binding specifies the
technical details of how to communicate with a Web service.

Technical
WSDL Abstract Concrete
Binding Communication
Document Interface Protocol Set
Details

• Where the service is located. This is usually expressed as a URI (Universal Resource
Identifier). The 'where' part of a WSDL document describes the location of a specific
Web service implementation (its endpoint).

WSDL Document Endpoint

Service Description URI


Web Service
Location Details Service Implementation
Location

Understanding WSDL Components

Endpoint Interface

Defines
Specifies service
operations and
location
message formats

Binding
Maps interface to
protocols

RESTful services
Current web services standards have been criticized as 'heavyweight' standards that are
over-general and inefficient. REST (REpresentational State Transfer) is an architectural style
based on transferring representations of resources from a server to a client. This style
underlies the web as a whole and is simpler than SOAP/WSDL for implementing web
services. RESTful services involve a lower overhead than so-called 'big web services' and are
used by many organizations implementing service-based systems.

Architectural Style Resource Representation

Simple Design Server to Client


Stateless Communication Representations

REST
Overhead Web Services

Lower Overhead REST vs SOAP/WSDL


Efficiency Service-based Systems

Usage

Organizations
Service-based Applications

The fundamental element in a RESTful architecture is a resource. Essentially, a resource is


simply a data element such as a catalogue, a medical record, or a document. In general,
resources may have multiple representations i.e. they can exist in different formats.

RESTful Architecture

Resource Representations
The core data element Different formats in
in RESTful systems, which resources can
representing various exist, enhancing
data types. flexibility.

Resource operations:
• Create - bring the resource into existence.
• Read - return a representation of the resource.
• Update - change the value of the resource.
• Delete - make the resource inaccessible.

Create Read

Initialization Data Retrieval


Instantiation Representation
Resource
Delete Operations Update

Access Removal Modification


Inaccessibility Value Change

The Web is an example of a system that has a RESTful architecture. Web pages are
resources, and the unique identifier of a web page is its URL.
• POST: is used to create a resource. It has associated data that defines the resource.
• GET: is used to read the value of a resource and return that to the requestor in the
specified representation, such as XHTML, that can be rendered in a web browser.
• PUT: is used to update the value of a resource.
• DELETE: is used to delete the resource.

HTTP
Methods

POST GET PUT DELETE

Create Read Update Delete


Resource Resource Resource Resource

Disadvantages of RESTful approach:


• When a service has a complex interface and is not a simple resource, it can be difficult
to design a set of RESTful services to represent this.
• There are no standards for RESTful interface description so service users must rely on
informal documentation to understand the interface.
• When you use RESTful services, you have to implement your own infrastructure for
monitoring and managing the quality of service and the service reliability.

Infrastructure Requirements Complex Interface Design

Monitoring Difficult to Design


Disadvantages
Quality of Service Not a Simple Resource
of RESTful
Service Reliability Approach

Lack of Standards

Informal Documentation
Service Users Reliance

Service engineering
Service engineering is the process of developing services for reuse in service-oriented
applications. The service has to be designed as a reusable abstraction that can be used in
different systems. Generally useful functionality associated with that abstraction must be
designed and the service must be robust and reliable. The service must be documented so
that it can be discovered and understood by potential users.

Design as
Reusable
Abstraction

Ensure
Develop
Service Robustness
Reusable
Engineering and
Services
Reliability

Document
for
Discovery

Stages of service engineering include:

Service Engineering

Service Design
Designing logical
interfaces and
implementation
methods for services.
Service Candidate Service
Identification Implementation
Identifying potential Implementing, testing,
services and defining and deploying services
requirements based on for use.
business processes.

• Service candidate identification, where you identify possible services that might be
implemented and define the service requirements. It involves understanding an
organization's business processes to decide which reusable services could support
these processes.

Understand Identify Define Decide on


Business Reusable Service Services to
Processes Services Requirements Implement

• Three fundamental types of service:

• Utility services that implement general functionality used by different business


processes.
• Business services that are associated with a specific business function e.g., in a
university, student registration.
• Coordination services that support composite processes such as ordering.

Utility General
Services Functionality

Three
Specific
Fundamental Business
Business
Types of Services
Functions
Services

Coordination Composite
Services Processes

• Service design, where you design the logical service interface and its implementation
interfaces (SOAP and/or RESTful). Involves thinking about the operations associated
with the service and the messages exchanged. The number of messages exchanged
to complete a service request should normally be minimized. Service state information
may have to be included in messages.

Design Logical
Service
Interface? Include
Design Define SOAP Minimize
Service
Service Service Messages
State
Interface Operations Implement RESTful Exchanged
Information
Communication
Protocols?

• Interface design stages:


• Logical interface design. Starts with the service requirements and defines the
operation names and parameters associated with the service. Exceptions should
also be defined.
• Message design (SOAP). For SOAP-based services, design the structure and
organization of the input and output messages. Notations such as the UML are a
more abstract representation than XML. The logical specification is converted to
a WSDL description.
• Interface design (REST). Design how the required operations map onto REST
operations and what resources are required.

Interface Design Process

Logical
Interface
Message
Design
Design (SOAP) Interface
Design (REST)
Define service
requirements Structure SOAP
and operations messages and Map operations
convert to to REST and
WSDL define
resources

• Service implementation and deployment, where you implement and test the service
and make it available for use. Programming services using a standard programming
language or a workflow language. Services then have to be tested by creating input
messages and checking that the output messages produced are as expected.
Deployment involves publicizing the service and installing it on a web server. Current
servers provide support for service installation.

Publicize
Service
Implement Deploy
Test Service
Service Service
Install on Web Server
Web Server Support

Service composition
Existing services are composed and configured to create new composite services and
applications. The basis for service composition is often a workflow. Workflows are logical
sequences of activities that, together, model a coherent business process. For example,
provide a travel reservation services which allows flights, car hire and hotel bookings to be
coordinated.

Compose New Coherent


Existing
and Composite Workflows Business
Services
Configure Services Process

Service construction by composition:


Formulate outline workflow
In this initial stage of service design, you use the requirements for the composite service as a
basis for creating an 'ideal' service design.
Discover services
During this stage of the process, you search service registries or catalogs to discover what
services exist, who provides these services and the details of the service provision.
Select possible services
Your selection criteria will obviously include the functionality of the services offered. They
may also include the cost of the services and the quality of service (responsiveness,
availability, etc.) offered.
Refine workflow
This involves adding detail to the abstract description and perhaps adding or removing
workflow activities.
Create workflow program
During this stage, the abstract workflow design is transformed to an executable program and
the service interface is defined. You can use a conventional programming language, such as
Java or a workflow language, such as WS-BPEL.
Test completed service or application
The process of testing the completed, composite service is more complex than component
testing in situations where external services are used.

Service Construction by Composition

Test Completed
Service
Create Workflow
Conduct testing on Program
the completed
Transform the
composite service
workflow design into
an executable
program
Refine Workflow
Select Possible
Add detail to the
Services
workflow and adjust
activities Choose services
based on
functionality, cost,
Discover Services and quality
Search for existing
services in registries
Formulate Outline
or catalogs
Workflow
Create an ideal
service design based
on requirements

You might also like