Tuesday, June 6, 2017

Web Services Introduction

Web Service definition

  • A web service is a distributed software whose components can be deployed and executed on distinct devices.
  • A web service consists of a service (a.k.a. producer) and a client (a.k.a. consumer or requester).

Web service terminology

  • message: the basic unit of communication between a web service and a requester; data to be communicated to or from a web service as a single logical transmission.
  • operation: a description of an action supported by the service; a set of messages related to a single web service action.
  • synchronous: an interaction is said to be synchronous when the participating agents must be available to receive and process the associated messages from the time the interaction is initiated until all messages are actually received or some failure condition is determined.
  • asynchronous: an interaction is said to be asynchronous when the associated messages are chronologically and procedurally decoupled.

Web Service over HTTP

  • A web service is an application typically running over HTTP.
  • A web service over HTTP is a web service that uses the HTTP as transport, HTTP messages are infrastructure.

Web Service architecture

  • The architecture of a simple web service is a client and a server.
  • The architecture of a complicated web service have many clients and a service composed of other services.
    • for example, an e-commerce service can be composed of multiple software components (each hosted on a separate web server) and any combination of PCs, tablets, mobile phones and other networked devices may host programs that make requests to the service.

Web services come in two flavors: SAOP-based and REST-style.

  • SOAP is an XML dialect that specifies the structure of XML documents that count as SOAP envelopes
  • A REST-style service is one that treats HTTP not only as a transport infrastructure but also as a set of guidelines for making service requests and responses.

Web service features

  • Web service major attractiveness is interoperability: clients and services can interact despite differences in programming languages, operating systems and hardware platforms.
  • XML and JSON are web service data interchange formats that provide an intermediary level and handle the differences in data types between different programming languages.