Web service technology and cloud computing offer promising solutions for developing distributed business applications published and invoked over the internet. Web service discovery finds the most relevant web services satisfying the functional needs of users. Semantic description of web services offers more accurate matching results between user query and web services descriptions. User's quality of service (QoS)-based criteria select the best web service from a set of functionally similar web services. The risk of privacy leakage of users is possible as service providers collect user personal data without any agreement. It isn't easy to assess the trustworthiness of values of QoS attributes provided by different service providers. Blockchain is an emerging technique that can overcome privacy leakage and identifying web services with fake values of QoS attributes. This chapter gives an overview of semantic web services, discovery and QoS-based selection of semantic web services, and the use of blockchain technology in the selection of web services.
TopIntroduction
Service Oriented Architecture (SOA) is well known architecture style for software development. SOA based applications are implemented using web services. As defined by the W3C (World Wide Web Consortium), Web Services are software components designed to support interoperable machine-to-machine interaction over a network such as the Internet. Another way to define a web service is that it is a server running on a computer workstation that listens for web requests over a particular port on a network and serves various functionalities or data. Web Services interact with one another and other systems to fulfil requests and carry out workflows and complex transactions. Web services have mechanisms to provide services over various environments and allow the clients to adapt rapidly to changes in their environments. Web services have significant uses in the automation of a task and efficiency improvement. Using the concept of web services, machines are able to interact with each other with no human intervention.
Web Services are usually described syntactically using input and output parameters. These parameters are known as the functional requirements of web services. Other than these functional parameters, web services are described using some of their QoS parameters. The QoS (Quality of Service) parameters are the performance measures of the web service that describe a web service more than just a formal description of the job it performs.
Basic web service architecture is shown in Figure 1. It contains three components: Service Provider, Service Registry, and Service Requester.
Figure 1. Basic web service architecture
The service provider hosts a network-associable module (web service). It defines a service description for the web service and publishes it to a service registry. The service requester uses a find operation to retrieve the service description from the service registry. It uses the service description to bind with the service provider and invoke with the web service implementation. Service registry stores information about service providers and their services. Service requesters find service descriptions and obtain binding information for services during the discovery process.
Web services composition is a way to develop a business application by using existing value-added web services for different functions of the business application. The relevant web services are identified through discovery. Web service discovery is the process of finding relevant web services that satisfy the functional requirements of user request. Web service discovery can be based on either syntactic approach i.e. keyword-based search or semantic approach. UDDI registry and online web directories support keyword-based search. Semantic approach based web service discovery provides better results as it considers semantic information associated with web services using domain ontologies and WordNet based ontology. QoS-based web service selection focuses on selecting the best web services from the set of functionally similar web services based on the user’s QoS constraints.
Blockchain is a fairly new technology that covers multiple computer science applications like cryptographic hash, distributed consensus mechanisms and asymmetric cryptography-based digital signature. Blockchain can be used in web services selection for removing unreliable web services. This chapter explains the discovery and QoS based selection of semantic web services and use of blockchain technology in web services selection.
TopWeb Service Description
A web service can be described syntactically and semantically.
Web Service Description Language (WSDL)
A web service is described syntactically using standards WSDL 1.0 and WSDL 2.0. Description document contains interface description, protocol binding for invocation, location of service using endpoints. Figure 2 shows WSDL elements and their description.
The <types> element contains XML schema definition of the data types used in web service.
The <message> element defines input and output messages exchanged between service and service consumer. The <portType> element describes operations of web service with input and output messages of the operations. The <binding> element describes invocation details to call an operation of the web service. The <service> element defines the ports for referencing actual location of the web service.