Slide 1.
Chapter 1
Web Services Basics
ST8023 - Web Services:
Principles & Technology
Mike P. Papazoglou
[email protected]
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.2
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service-oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of Web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.3
Service-Oriented Paradigm
• The service-oriented paradigm to programming utilizes
services as the constructs to support the development of
rapid, low-cost and easy composition of distributed
applications.
• A Web service is a programmatically available
application logic exposed over the Internet.
– Any piece of code and any application component deployed on a
system can be transformed into a network-available service.
• Services reflect a new ‘service-oriented’ approach to
programming, based on the idea of composing applications
by discovering and invoking network-available services
rather than building new applications or by invoking
available applications to accomplish some task.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.4
What are Web services?
• A Web service is a self describing, self contained
software module available via a network, such as
the Internet.
• Its purpose is to complete certain task, solves
problems, or conducts transactions on behalf of a
user or application.
• It constitute a distributed computer infrastructure
made up of many different interacting application
modules communicating over a network (private,
public or a single logical system)
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.5
What are Web Services?
Web services perform encapsulated business functions
such as:
1. a self-contained business task – a funds withdrawal or funds
deposit service;
2. a full-fledged business process – the automated purchasing of
office supplies;
3. an application – a life insurance application or demand
forecasts and stock replenishment; or
4. a service-enabled resource – access to a particular back-end
database containing patient medical records.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.6
What are Web Services?
• Can be mixed and matched to create a complete process:
– Enable integration with decreased human interaction, e.g., create
complete enterprise processes, such as supply chain
management, procurement, logistics, etc.
– Both new and extensions to existing applications
• Available to a variety of clients (platform independent)
• Pricing (rating) model determines subscriber rates based on
subscription and usage events, e.g., calculate charges for
services based on the quality and precision of the service.
• Billing model:
– “pay per use”, “lease it”, “pay for it” basis.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.7
A purchase order application involving
interacting web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.8
A Supply Chain application
Warehouse Supply
management + + + +++++ planning
application applicatio
n
INTERNET
Shipmen Logistic
t s
Demand
Inventor plannin
y g
Replenishmen Distribution
t planning
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.9
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.10
Application Service Providers
• The concept of software-as-a-service is evolutionary
and appeared first with the ASP (application service
provider) software model:
An ASP “rents” applications to subscribers.
– The whole application is developed in terms of the user interface,
workflow, business, and data components that are all bound
together to provide a working solution.
– An ASP hosts the entire application and the customer has little
opportunity to customize it beyond the appearance of the user
interface, e.g., adding company logos.
– An alternative of this is where the ASP is providing a software
module that is downloaded to the customer’s site on demand – this
is for situations where the software does not work in a client/server
fashion, or can be operated remotely via a browser.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.11
ASP vs. Web Services
• Although the ASP model introduced the concept of software-
as-a-service first, it suffered from several inherent limitations
such as
– inability to develop highly interactive applications;
– inability to provide complete customizable applications and;
– inability to integrate applications.
• Today we are in the midst of another significant development in
the evolution of software-as-a-service. The new architecture
allows for:
– loosely coupled asynchronous interactions
– on the basis of eXtensible Markup Language (XML) standards
– with the intention of making access to, and communications
between, applications over the Internet easier, by means of
appropriate standards.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.12
ST8023 - Web Services:
Principles & Technology
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.13
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.14
What problems do we solve?
A mid-sized manufacturer
Broader needs to create online
relationships with
Describe
B2B customers, each with their services
own set of standard and
protocols.
Search To meet its on-time
delivery commitments a
Discover
capabilitie high-tech manufacturer
needs to place orders with services
s the most advantageous
parts manufacturer or
assembler.
A high-tech manufacturer
Integrate
Easier needs to easily integrate
and synchronize third- services
aggregation party providers with its
manufacturing and together
distribution requirements.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.15
Where are Services used?
● Within an enterprise (enterprise application integration)
● Accelerate and reduce the cost of integration
● Save on infrastructure deployment and management costs
● Reduce skill requirements
● Improve reuse
● Between enterprises (e-Business integration)
● Providing service to a company’s customers
– e.g., an Insurance company wishes to link its systems to the systems of a
new institutional customer
● Accessing services from a company’s partners and suppliers
– e.g., dynamically link to new partners and suppliers to offer their services
to complement the value the company provides
● Standards and common infrastructure reduce the barriers
● Simplicity accelerates deployment
● Dynamics opens new business opportunities
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.16
http://www.w3schools.com/webservices/tempconvert.asmx
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.17
ST8023 - Web Services:
Principles & Technology
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.18
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.19
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.20
Types of Web Services
• Informational services are services of relatively simple nature. They either
provide access to content interacting with an end-user by means of simple
request/response sequences, or expose back-end business applications to
other applications. Examples include:
– content services such as weather report info.,
simple financial info., stock quote info., news items
– simple trading services that can provide
a seamless aggregation of information across
disparate systems and data sources.
• Complex services that involve the assembly and
invocation of many pre-existing services
possibly found in diverse enterprises to
complete a multi-step business interaction:
– a supply-chain application involving order taking,
stocking orders, sourcing, inventory control,
financials, and logistics.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.21
Service Properties and State
• Functional and non-functional properties:
– The functional service description details the operational
characteristics that define the overall behavior of the service.
– The non-functional description targets service quality attributes, e.g.,
service metering and cost, performance metrics (response time or
accuracy), security, authorization, authentication, scalability,
availability, etc.
• Stateless or stateful services:
– Services that can be invoked repeatedly without having to maintain
context or state they are called stateless.
• Simple informational services are stateless.
– Services that require their context to be preserved from one
invocation to the next are called stateful.
• Complex services (business processes) typically involve stateful
interactions.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.22
Loose Coupling and Granularity
• Loose coupling:
– Coupling indicates the degree of dependency any two systems have
on each other.
– Web services are loosely coupled: they connect and interact more
freely (across the Internet). They need not know how their partner
applications behave or are implemented.
• Service granularity:
– Simple services are discrete in nature, exhibit normally a
request/reply mode of operation and are of fine granularity, i.e., they
are atomic in nature.
– Complex services are coarse-grained, e.g., a SubmitPurchaseOrder
process. These involve interactions with other services and possibly
end-users in a single or multiple sessions.
– Coarse-grained communication implies larger and richer data
structures (viz. those supported by XML).
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.23
Synchronicity and Well-definedness
• Sychronicity: There are two programming styles for services:
– Synchronous or remote procedure call (RPC)-style: Clients of synchronous
services express their request as a method call with a set of arguments,
which returns a response containing a return value.
• Simple informational services, e.g., returning the current price for a given stock;
providing the current weather conditions in a particular location; or checking the
credit rating of a potential trading partner.
– Asynchronous or message (document)-style: When a client invokes a
message-style service, it typically sends it an entire document, e.g., a
purchase order, rather than a discrete set of parameters.
• Business processes, e.g., processing a purchase order; responding to a request
for quote order from a customer; or responding to an order placement by a
particular customer.
• Well-definedness:
– The service interaction must be well- defined. The web services
description language (WSDL) allows applications to describe the rules for
interfacing and interacting to other applications.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.24
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.25
Service Interface and Implementation
• The service interface defines service functionality visible to
the external world and provides the means to access this
functionality.
– The service describes its own interface characteristics, i.e.,
the operations available, the parameters, data-typing and the
access protocols, in a way that other software modules can
determine what it does, how to invoke its functionality, and
what result to expect in return.
• The service implementation realizes a specific service
interface whose implementation details are hidden from its
users.
– Different service providers using any programming language
of their choice may implement the same interface.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.26
ST8023 - Web Services:
Principles & Technology
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.27
Service deployment vs. service
realization
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.28
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.29
Roles
• The service model allows for a clear distinction to be made
between
– service providers (organizations that provide the service
implementations, supply their service descriptions, and
provide related technical and business support);
– service clients (end-user organizations that use some
service);
– service registry (a searchable directory where service
descriptions can be published and searched).
• Service requestors find service descriptions in the registry and
obtain binding information for services.
• This information is sufficient for the service requestor to contact,
or bind to, the service provider and thus make use of the
services it provides.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.30
Service-Oriented Architecture
• SOA is a logical way of designing a software system to
provide services to either end-user applications or to other
services distributed in a network, via published and
discoverable interfaces.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.31
Layers in an SOA
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.32
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.33
Web Services Technology Stack
• Web services are implemented by a collection of several
related technologies and standards.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.34
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web Services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.35
Quality of Service (QoS)
• QoS refers to the ability of a Web service to respond to expected
invocations and perform them at the level commensurate to the
mutual expectations of both its provider and its customers.
• The key QoS in a Web services environment are:
– availability
– accessibility
– conformance to standards
– integrity
– performance
– reliability
– scalability
– security
– transactionality.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.36
Service Level Agreements (SLAs)
• An SLA is a formal agreement (contract) between a provider and client,
formalizing the details of use of a Web service (contents, price, delivery
process, acceptance and quality criteria, penalties, etc in measurable
terms) in a way that meets the mutual understandings and expectations
of both providers and clients.
• An SLA may contain the following parts:
– purpose
– parties
– validity period
– scope
– restrictions
– service-level objectives
– penalties
– exclusion terms
– administration authority.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.37
Topics
• Introduction – definitions
• Software as a service
• Where can services be used?
• Characteristics of web services
• Web services interfaces and implementations
• Service oriented architecture
• Web services technology stack
• Quality of service
• Impact and shortcomings of web services
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.38
Impact of Web Services
• The most appealing characteristic of Web services is that
they are evolving to embrace the convergence of e-
Business, EAI, traditional middleware, and the Web. Web
services offer:
– a standard way to expose legacy application functionality as a
set of reusable services;
– a standard, easy, and flexible way to help overcome
application integration issues;
– a standard way to develop and/or assemble Internet-native
applications for both the internal and the extended enterprise;
– a common facade for cross-enterprise specific systems,
making it easier to create the service-level agreements
needed for business-to-business integration.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008
Slide 1.39
Pitfalls of Web Services
• As the business requirements that drive Web services
become even more complex, Web services technologies
require additional capabilities to handle demanding
situations that severely test the most obvious current
shortcomings of Web services. These include:
– performance issues,
– lack of appropriate support for sophisticated transaction management,
– lack of expressing business semantics and, especially,
– achieving a widespread agreement and harmonization on a wide range of
existing and emerging standards.
• There is an overwhelming number of existing and emerging standards.
• Unless these standards mature enough to the degree that they are harmonized
and can act together, the long-term viability of Web services applications being
used in mission-critical, production environments will be severely tested.
ST8023 Web Services Development
Michael P. Papazoglou, Web Services, 1st Edition, © Pearson Education Limited 2008