Introduction to Services

Large enterprises typically own and operate a large number of software applications either of the shelf, developed in-house or inherited through mergers and acquisitions. Applications can be of heterogeneous e.g. they are written in the same language(s) or they use the same data storage mechanisms and formats. They may also run on the same operating system or hardware. However, it comes increasingly common for applications to be distributed across different machines and/or different physical locations, running on different machines e.g. Twitter or FB - these two have apps on Android, iOS, Windows Phone, web-browser and even external APIs.

What is a service?

Essentially, it is one entity (provider) performing a task for some other entity (client). They have their metaphor in the real world:

  • We use the post office to send letters
  • We have our cars repaired in garages
  • We order food from take-aways

There are number of reasons why we don't do everything ourselves. For example, we might not have the skills to fix our car or it would be cost effective (money or time). We may also have no resources to do it: taking a letter to China.

A good service is cost effective (cheaper, faster) and it is simple e.g. you don't need to know how your letter gets to new New York. It is also secure, accountable and predictable e.g. constant delivery time.

Defining Service

A service takes an input and produces an output. Both input and output are subject to conditions which might be satisfied for the service to be delivered and accepted. These are referred to as 'pre-conditions' and 'QoS' (quality of the service).

If it was the question of take-aways, the service description might look something along the lines of:

  • Input - list of food items and properties (e.g. medium pizza, extra toppings)
  • Pre-conditions - well you need have enough money some something like money >= total_price
  • Output - food and receipt
  • QoS:
    • Food is equal (or more) to what you ordered
    • Delivery time is equal or faster to what they promised
    • Food Quality is equal or better to what you expected

Software Services

Unlike in the real-world services, the input and output of software services are generally intangible (unless you have to pay to access them) and the provides and clients are pieces of software e.g. address finder based on post code.

The key element is that provider and client are two separate pieces of software: may be implemented in different programming languages and quite possibly running on different machines. Client invokes the service and the service needs to return the result.