CS 530 - Advanced Software Engineering

Service-oriented Software Engineering

Reference: Sommerville, Software Engineering, 10 ed., Chapter 18

 

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.

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.

Benefits of a service-oriented approach:

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.

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.

 

Benefits of SOA:

Key standards:

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

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
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.

The service interface is defined in a service description expressed in WSDL (Web Service Description Language). The WSDL specification defines:

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.

The fundamental element in a RESTful architecture is a resource. Essentially, a resource is simply a data element such as a catalog, a medical record, or a document. In general, resources may have multiple representations i.e. they can exist in different formats.

Resource operations:

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.

Disadvantages of RESTful approach:

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.

Stages of service engineering include:

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.

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.