Docsity

Web Services - Software Engineering, Dispense di Ingegneria del Software

Anteprima parziale del testo

Scarica Web Services - Software Engineering e più Dispense in PDF di Ingegneria del Software solo su Docsity!

Massimo Mecella

INTRODUCING WEB SERVICES

1

Massimo Mecella

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.

Massimo Mecella

  • 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. What are Web Services?

Massimo Mecella A purchase order application involving interacting web services

Massimo Mecella

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.

Massimo Mecella Are ASP, Software-as-a-Service, and Web Service the same? Access service View in browser Download on demand Typical ASP Name No. Zip State OK Cancel Name No. Zip State OK Cancel Software as a Service Web services Name No. Zip State OK Cancel Name No. Zip State OK Cancel Application solution provider Name No. Zip State OK Cancel Customer (composition, repackaging, differentiation, value-added services) Application runs here Application runs here Application runs partly here Application runs partly here

Massimo Mecella

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.

Massimo Mecella

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.

Massimo Mecella

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.

Massimo Mecella

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.

Massimo Mecella

Service deployment vs. service realization

Massimo Mecella

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);
  • s ervice 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.

Massimo Mecella

Web Services Technology Stack

  • Web services are implemented by a collection of several related

technologies and standards.

Massimo Mecella

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