Вы находитесь на странице: 1из 68

Quality Driven Dynamic Composition of Web Services

A Report submitted to MSRIT Bangalore


for partial requirement of award of degree of Bachelor of Engineering in Information Science and Engineering by ANANYA.B.NAIK (1MS07IS007) HARSH SINGH (1MS07IS031) HIMANSHU KUMAR MOUAR (1MS07IS032) POOJA.P (1MS07IS067)

Under the guidance of Mrs. T. Tamilarasi (Assistant Professor)

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING M.S RAMAIAH INSTITUTE OF TECHNOLOGY


(Autonomous Institute, Affiliated to VTU)

May 2011

Department of Information Science and Engineering M S Ramaiah Institute of Technology Bangalore 54

CERTIFICATE
This is to certify that the following students who were working under our guidance, have completed their work as per our satisfaction with the topic Quality Driven Dynamic Composition of Web Services. To the best of our understanding the work to be submitted in this report does not contain any work, which has been previously carried out by others and submitted by the candidates for themselves for the award of any degree anywhere.

(Ananya.B.Naik-1MS07IS007) (Himanshu Kumar Mouar-1MS07IS032)

(Harsh Singh-1MS07IS031) (Pooja.P-1MS07IS067)

Signature of Guide Mrs. T. Tamilarasi Assistant Professor

Signature of HOD Dr. Aswatha Kumar M Professor & HOD

External Evaluation
Name of the examiners 1. 2. Signature with Date

Department of Information Science and Engineering M S Ramaiah Institute of Technology Bangalore - 54

DECLARATIO

We hereby declare that the entire work embodied in this report has been carried out by us at M S Ramaiah Institute of Technology under the supervision of Mrs T. Tamilarasi. This report has not been submitted in part or full for the award of any diploma or degree of this or any other University.

(Ananya.B.Naik-1MS07IS007) (Himanshu Kumar Mouar-1MS07IS032)

(Harsh Singh-1MS07IS031) (Pooja.P-1MS07IS067)

This work is dedicated to Almighty, our parents and all those people who have helped us with this work.

Quality Driven Dynamic Web Service Composition

May 2011

ACK OWLEDGEME TS
The satisfaction of completing our project will not be complete until we thank all the people who have helped us through this. We would like to thank M. S. Ramaiah Institute of Technology for providing us the opportunity to work on a project of our choice. We would like to express our heartfelt gratitude to our project guide Mrs. T Tamilarasi for her persistent guidance and support throughout the course of the project. Her encouragement and help have been invaluable. We would like to convey our enduring gratitude to our HOD, Dr. Aswatha Kumar M for providing us the confidence and all the necessary support in undertaking the project. We would like to thank our principal Dr. K. Rajanikanth for obliging us to give resources to complete our project, without which it the project would not have been complete. A large amount of material has been obtained from the Internet and numerous other literary sources. We thank all those unseen faces, whose contribution to our venture has been invaluable. We thank our parents on whose blessings we live and thrive. It is their prayers that have helped us translate our efforts into fruitful achievements.

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Web Service Composition

May 2011

ABSTRACT
A web service is a software system identified by a URL, whose public interfaces and bindings are defined and described using XML. The web service model consists of three entities, the service provider, the service registry and the service consumer. In todays world most of the business entities want to use web services as a means of distributing their services because web services applications are independent of the underlying technologies and can interact with each other easily on agreed upon standards. This led to the building of more complex web services which in turn used other web services as their components. The result of this was a new field of research in web services called web service composition. Composition of web services is a very complex and challenging task. If the implementation of a web services business login involves the invocation of other web services, it is necessary to combine the functionality of several web services. The process of developing a composite service in turn is called service composition. Service composition can be either performed by composing elementary or composite services. Composite services in turn are recursively defined as an aggregation of elementary and composite services. We propose quality driven dynamic composition of a Travel Companion web service which can be broken down to different web services like airline reservation and hotel booking web services. The proposed web service will co-ordinate and compose different web services based on the user requirement and user preference. In our approach several web services are composed in a composite web service whose business logic is a process model based on an algorithm. The task of this business model is to invoke different functionalities of the underlying component services. The selection should take into account various criteria (eg. price, duration and reliability). The end result should be a optimized web service meeting a business need, i.e. in our case is a travel companion web service.

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Web Service Composition

May 2011

Contents
1 Introduction 1.1 Overview 1.2 Objective 1.3 Problem Statement 1.4 Current Scope 1.5 Future scope 2 Literature Survey 2.1 Concepts 2.1.1 Web Services 2.1.2 Web Services Composition 2.1.3 Static Web Services Composition 2.1.4 Dynamic Web Services Composition 2.1.5 Quality of Service 2.2 Research Papers 2.2.1 Paper 1 2.2.2 Paper 2 2.2.3 Paper 3 2.2.4 Paper 4 2.2.5 Paper 5 3 System Requirements Specifications 3.1 Introduction 3.1.1Purpose 3.1.2 Document Conventions 3.1.3 Intended Audience and Reading Suggestions 3.1.4 Project Scope 3.2 Overall Description 3.2.1 Product Perspective
Dept. of Information Science and Engineering, MSRIT

Page o

1 2 2 2 3

4 4 5 5 6

7 10 16 19 20

23 23 23 23

24

Quality Driven Dynamic Web Service Composition

May 2011

3.2.2 Product Features 3.2.3 User Classes and Characteristics 3.2.4 Operating Environment 3.2.5 Design and Implementation Constraints 3.2.6 Assumptions and Dependencies 3.3 System Features 3.3.1 Service Registry 3.3.2 Translator 3.3.3 Matching Engine 3.3.4 Composer 3.3.5 Execution Engine 3.4 External Interface Requirements 3. 4.1 User Interface 3.4.2 Hardware Interfaces 3.4.3 Software Interfaces 3.4.4 Communication Interfaces 3.5 Other Non-functional Requirements 3.5.1 Performance Requirements 3.5.2 Software Quality Attributes 4 System Design 4.1 Use Case Diagram 4.1.1 Use Case Diagram for End User 4.1.2 Use Case for Client 4.2 Class Diagram 4.3 Sequence Diagram 4.4 State Chart Diagram 4.4.1 State Chart Diagram for the entire system 4.4.2 State Chart for Processing 4.5 Deployment Diagram
Dept. of Information Science and Engineering, MSRIT

24 24 25 25 25

25 26 26 27 27

27 28 28 28

28 29

30 31 32 33

35 36 37

Quality Driven Dynamic Web Service Composition

May 2011

5 Implementation 5.1 Algorithm 5.2 Framework 6 Testing 6.1Introduction 6.2 Unit Testing 6.2.1 Test Scenario for Unit Testing 6.3 Integration Testing 6.3.1 Test Scenario for Integration Testing 7 Results 7.1 Scenario 1 7.2 Scenario 2 8 Conclusion 9 Scope for Future Work A Appendix A References 46 51 54 55 56 57 41 41 42 45 45 38 39

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Web Service Composition

May 2011

List of Figures Figure o


2.1 2.2 4.1 4.2 4.3 4.4 4.5 4.6 4.7 5.1 Proposed Framework for Web Service Composition State Chart for Travelling Planner Use Case Diagram for End User Use Case Diagram for Client Class Diagram Sequence Diagram State Chart Diagram for the entire system State Chart Diagram for processing Deployment Diagram Framework for our System

Page o
07 21 30 31 32 33 35 36 37 39 46 47 47 48 48 49 49 50 51 51 52 52 53 53

7.1.1 Front page with search Box 7.1.2 Checking the availability of flight 7.1.3 Selection of Best Web Service 7.1.4 Details of the Service Selected 7.1.5 Ranking of the service 7.1.6 Payment Request 7.1.7 Payment Details 7.1.8 Transaction Completion 7.2.1 Package Search 7.2.2 Link to Hotel Search 7.2.3 Hotel Details 7.2.4 List of Hotel Services 7.2.5 Booking Details for Hotels 7.2.6 Payment Details for Package

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Web Service Composition

May 2011

List of Tables Table o


6.1 6.2 Unit Testing Integration Testing

Page o
44 45

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 1 I TRODUCTIO
1.1 Overview
Web Services are modular web applications that can be independently deployed and invoked by other software or services on the web. This offers enterprises the capability to integrate in-house business services with external Web Services to conduct complex business transactions. The integration efficiency and flexibility are critical for services composition. For Web Services providing a similar functionality, Quality of Service (QoS) is the main factor to differentiate them. The overall QoS of a business process must meet a users requirement. Currently, there are lots of reusable Web Services in Web environment. Different Web Services implement different or analogous business functions. Meanwhile, most enterprises have strong requirements for Web Services, to realize information with lower cost. A single Web service often provides one business function. However, an enterprise application often requests the integration of several business functions, with some logic constraints and data dependencies. Hence, Web service composition is a better solution for realizing the application integration of enterprises with Web Services. Dynamic web service composition can serve applications or users on an on-demand basis. With dynamic composition, the applications capabilities can be extended at runtime so that theoretically an unlimited number of new services can be created from a limited set of service components, thus making applications no longer restricted to the original set of operations specified and envisioned at design and/or compile time. The Web Services paradigm allows for the development of loosely coupled islands of distributed computing. Here, independent computing resources will expose an interface of available operations, accessible over the network. For example, a bank might expose credit card processing functionality as a service, allowing, for example, a travel agency to charge a travellers credit card for airline or rail bookings across enterprise network boundaries. This type of interaction is made possible by a set of standards that define how Web Services are described, discovered, and invoked. The ability to access functionality over the network in a modular fashion leads to the potential for composing Web Services. Web service composition Dept. of Information Science and Engineering, MSRIT Page 1

Quality Driven Dynamic Composition of Web Services

May 2011

can enable valuable functionalities for the end user that may be difficult or impossible to achieve when a user must interact with individual Web Services. For instance, suppose a user wishes to attend an open air event on a particular day only if the forecast for that day does not call for inclement weather. Further suppose the existence of a weather service as well as a service allowing the purchase of tickets for events. It is of course possible for the user to contact these services individually and decide whether she should purchase a ticket and then act accordingly. Alternatively, if a system were available that exposed the services to her from a single point and possessed the ability to generate and execute a composite plan based on her requirements, such a system would clearly provide value over and above the total value provided by the individual Web Services.

1.2

Objective
The objective of our project is to provide quality driven composition of a Travel

Companion web service. It deals with the combination of various component Web Services like airline reservation, hotel booking web service etc. It aims at coordinating and composing different web service which involves invoking the functionalities offered by the underlying composite services in order to fulfil user requirements and preferences.

1.3

Problem Statement
In the present scenario of web service composition most of the Web Services are

statically composed. Web services are bundled to perform the tasks given by the user. This composition is done at the design time with limited number of Web Services and the services chosen are not selected based on any QoS parameters. To deal with this issue, composition of Web Services should be done in such a way that there should be a set of parameters or QoS entities like price and execution time etc which should be taken in consideration. This composition can be done based on QoS and furthermore dynamically so that the user or the client who is using that composed bundle of web service would get the best deal.

1.4

Current scope
In the current scenario Web Services are used in individualistic manner wherein they

are consumed independently of one another even though the business logic requires the

Dept. of Information Science and Engineering, MSRIT

Page 2

Quality Driven Dynamic Composition of Web Services

May 2011

services to be used in a composed fashion. This leads to restriction in use of Web Services to solve more complex, useful and real world problems. It is necessary for appropriate composition of different Web Services belonging to different scope and field. There is also a need for selection of subset of Web Services from a set of Web Services which perform the same operation but are provided by different providers and the criteria to differentiate among them are QoS parameters like execution time, user rating etc. In this project we try to address the problem of composition of Web Services and selection of Web Services from a set of services. The case study we have taken here is a travel site which implements composition and selection of Web Services which includes airline ticket booking and hotel reservation each of which is having a set of services from different providers. The solution which we have implemented can be explained in the following ways: 1. In initial user query we look for the keywords which decide whether the Web Services are needed in a composed manner or not. If composition is required, the system composes the Web Services in a sequential fashion, executing and consuming one web service before executing other service which is required for whole business logic to be processed. We also provide the user a direct link to choose composition of Web Services. 2. If there are m services which fulfil the user criteria then we need to select and display n services which are a subset of m services. We implement this selection of Web Services by ranking them based on two QoS parameters one is User Rating and one is System Execution time. We first normalize the parameters within a certain range 0-5 and then find the average so that the service having highest rank is displayed on top.

1.5

Future scope
In this project the composition is done in two phases sequentially. Whereas when real

world business problems are considered composition of Web Services required is of n phases. The number of QoS parameters to be considered should be more because the number of parameters which affect a given web service to be selected are many.

Dept. of Information Science and Engineering, MSRIT

Page 3

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 2 LITERATURE SURVEY


2.1 Concepts

2.1.1 Web Services A web service is defined as a collection of open protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use Web Services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer. This interoperability (e.g., between Java and Python, or Windows and Linux applications) is due to the use of open standards. The term Web Services describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available. Used primarily as a means for businesses to communicate with each other and with clients, Web Services allow organizations to communicate data without intimate knowledge of each other's IT systems behind the firewall. 2.1.2 Web Services Composition Web service composition involves combining the existing Web Services with the required functionality in a way that it fulfils the user request. Web service composition still is a highly complex task, and it is already beyond the human capability to deal with the whole process manually. The complexity, in general, comes from the following sources. First, the number of services available over the Web increases dramatically during the recent years, and one can expect to have a huge Web service repository to be searched. Second, Web Services can be created and updated on the fly, thus the composition system needs to detect the updating at runtime and the decision should be made based on the up to date information. Third, Web Services can be developed by different organizations, which use different concept models to describe the services, however, there does not exist a unique language to define

Dept. of Information Science and Engineering, MSRIT

Page 4

Quality Driven Dynamic Composition of Web Services

May 2011

and evaluate the Web Services in an identical means. Thus, the ability to efficiently and effectively select and integrate inter-organizational and heterogeneous services on the Web at runtime is an important step towards the development of the Web service applications. 2.1.3 Static Web Services Composition Web Services composition can be categorized into manual or automatic and most commonly static and dynamic. Manual composition means that composition is performed by means of employees who have access to the elementary services, while automatic implies that a software agent performs composition based on some predefined algorithms. The composition of Web Services can be done in a static or dynamic way. It can be done statically by allowing the requestor to build an abstract model of the tasks that should be carried-out during the execution of this web service, at design and/or compile time. This abstract model is nothing more than a representation of a set of tasks and the data dependency among them. However, this should be done before the composition planning starts. Each task contains a query clause that is used to search the real atomic web service to fulfil the task. Static composition is usually implemented through graphs. The number of Web Services provided to the user in case of static composition is limited. Consider the example of a travel agency which has to book flight tickets and make hotel reservations. In case of static composition of Web Services each of these tasks contains a query which searches for a web service which can fulfil the given task and the results of the query are given to the requestor. 2.1.4 Dynamic Web Services Composition Dynamic composition is achieved by creating the abstract model of tasks and selecting the atomic Web Services automatically without the interference of the service requestor in the composition process. This type of classification is usually related to the workflow-based composition techniques Unlike static composition, where the number of services provided to the end users is limited and the services are specified at design time, dynamic composition can serve applications or users on an on-demand basis. With dynamic composition, an unlimited number of new services can be created from a limited set of service components. With dynamic composition the capabilities of the application can be extended at runtime. Also, the Dept. of Information Science and Engineering, MSRIT Page 5

Quality Driven Dynamic Composition of Web Services

May 2011

customization of software based on the individual needs of a user can be made dynamic through the use of dynamic composition without affecting other users on the system. Dynamic composition infrastructure can be helpful in upgrading an application. Instead of being brought offline and having all services suspended before upgrading; users can continue to interact with the old services while the composition of new services is taking place. This will provide seamless upgrading round-the-clock service capabilities to existing applications. 2.1.5 Quality of Service (QoS) QoS covers a whole range of techniques that match the needs of service requestors with those of the service provider's based on the network resources available. By QoS, we refer to non-functional properties of Web Services such as performance, reliability, availability, and security. The dynamic e-business vision calls for a seamless integration of business processes, applications, and Web Services over the Internet. Delivering QoS on the Internet is a critical and significant challenge because of its dynamic and unpredictable nature. Applications with very different characteristics and requirements compete for scarce network resources. Changes in traffic patterns, denial-of-service attacks and the effects of infrastructure failures, low performance of Web protocols, and security issues over the Web create a need for Internet QoS standards. Often, unresolved QoS issues cause critical transactional applications to suffer from unacceptable levels of performance degradation. As most of the Web Services are going to need to establish and adhere to standards, QoS will become an important selling and differentiating point of these services.

Dept. of Information Science and Engineering, MSRIT

Page 6

Quality Driven Dynamic Composition of Web Services

May 2011

2.2
2.2.1

Research Papers
Paper 1: A Survey of Automated Web Service Composition Methods This paper deals with how the composition of Web Services can be done in

automatic and dynamic way. This paper presents an overview of recent methods that provide automation to Web service composition. A utomation means that either the method can generate the process model automatically, or the method can locate the correct services if an abstract process model is given. The paper focuses more on the AI planning methods than the workflow based methods. Highlights of the Paper: Here, authors propose a general framework for automatic Web Services composition. This framework is in high-level abstraction, without considering a particular language, platform or algorithm used in composition process. The aim of the framework is to give the basis to discuss similarities and differences of the available service composition methods.

Fig 2.1: Proposed Framework for Web Service Composition

Dept. of Information Science and Engineering, MSRIT

Page 7

Quality Driven Dynamic Composition of Web Services

May 2011

A general framework of the service composition system is illustrated in Figure 2.1 The composition system has two kinds of participants, service provider and service requester. The service providers propose Web Services for use. The service requesters consume information or services offered by service providers. The system also contains the following components: translator, process generator, evaluator, and execution engine and service repository. The translator translates between the external languages used by the participants and the internal languages used by the process generator. For each request, the process generator tries to generate a plan that composes the available services in the service repository to fulfil the request. If more than one plan is found, the evaluator evaluates all plans and proposes the best one for execution. The execution engine executes the plan and returns the result to the service provider. Most precisely, the process of automatic service composition includes the following phases: Presentation of single service: Firstly, the service providers will advertise their atomic services at a global market place. There are several languages available for advertising, for example, UDDI or DAML-S Service Profile. The essential attributes to describe a Web service include the signature, states and the non-functional values. The signature is represented by the services inputs, outputs and exceptions. It provides information about the data transformation during the execution of a Web service. The states are specified by

precondition and post condition. Authors model it as the transformation from one set of states to another in the world. Non-functionality values are those attributes that are used for evaluating the services, such as the cost, service quality and security issues. Translation of the languages: Most service composition systems distinguish between the external and internal service specification languages. The external languages are used by the service users to enhance accessibility of the users in the sense that the users can express what they can offer or what they want in a relatively easy manner. They are usually different from the internal ones that are used by the composition process generator, because the process generator requires more formal and precise languages, for example, the logical programming languages. So far, the users have already get used to the standard Web service languages, Dept. of Information Science and Engineering, MSRIT Page 8

Quality Driven Dynamic Composition of Web Services

May 2011

such as WSDL and DAML-S. Thus the translation components between the standard Web service languages and the internal languages have to be developed. Generation of composition process model: In the meantime, the service requester can also express the requirement in a service specification language. A process generator then tries to solve the requirement by composing the atomic services advertised by the service providers. The process generator usually takes the functionalities of services as input, and outputs process model that describes the composite service. The process model contains a set of selected atomic services and the control flow and data flow among these services. Evaluation of composite service: It is quite common that many services have the same or similar functionalities. So it is possible that the planer generates more than one composite service fulfilling the requirement. In that case, the composite services are evaluated by their overall utilities using the information provided from the non-functional attributes. The most commonly used method is utility functions. The requester should specify weights to each nonfunctionality attributes and the best composite service is the one who is ranked on top. Execution of composite service: After a unique composite process is selected, the composite service is ready to be executed. Execution of a composite Web service can be thought as a sequence of message passing according to the process model. The dataflow of the composite service is defined as the actions that the output data of a former executed service transfers to the input of a later executed atomic service. In the following we will give a survey on the methods used for the process generator to generate the process. The methods can be either fully automated or semi-automated. Contrast: In [1] the focus is on automated composition of Web Services. The paper focuses more on the AI planning methods than the workflow based methods. In the framework mentioned in the above paper, for each request, the process generator tries to generate a plan that composes the available services in the service repository to fulfil the request. If more than one plan is found, the evaluator evaluates all plans and proposes. The system Dept. of Information Science and Engineering, MSRIT Page 9

Quality Driven Dynamic Composition of Web Services

May 2011

proposed in the project includes a service selector in the place of a process generator which selects and displays a list of services in a ranked fashion. Once user selects and consumes the service he/she is directed to the next module of the process and the same steps are repeated. 2.2.2 Paper 2: QoS Computation and Policing in Dynamic Web Service Selection. This paper talks about QoS (Quality of Service) models that can be implemented d u r i n g composition of Web Services. The authors here discuss the composition of Web Services based on different QoS parameters which can be used to determine the usability of the Web Services bundle which can be used to carry out specific tasks provided the users. The authors advocate that the process-based approach to web service composition has gained considerable momentum and standardization. However, with the ever increasing number of functional similar Web Services being made available on the Internet, there is a need to be able to distinguish them using a set of welldefined Quality of Service (QoS) criteria. A service composition system that can leverage, aggregate and make use of individual components QoS information to derive the optimal QoS of the composite service is still an ongoing research problem. This is partly due to the lack of an extensible QoS model and a reliable mechanism to compute and police QoS that is fair and transparent to both service requesters and providers. This leads to selection of QoS parameters as a very important task for composition. Highlights of the Paper: The author discuss about current approaches that deal with QoS of Web Services only address some generic dimensions such as price, execution duration, availability and reliability. In some domains, these generic criteria might not be sufficient. QoS model should also include domain specific criteria and be extensible. Moreover, most of the current approaches rely on service providers to advertise their QoS information or provide an interface to access the QoS values, which is subject to manipulation by the providers. Obviously, service providers may not advertise their QoS information in a neutral manner, for example, execution duration, reliability, e t c . In approaches where QoS values are solely collected through active monitoring, there is a high overhead since QoS must be checked constantly for a large number of Web Services. On the other hand, an approach that relies on a third party to rate or endorse a particular service provider is expensive and static in nature. Dept. of Information Science and Engineering, MSRIT Page 10

Quality Driven Dynamic Composition of Web Services

May 2011

The authors propose an extensible QoS model, which includes generic and domain or business specific criteria. The generic criteria are applicable to all Web Services, for example, their pricing and execution duration. Although the number of QoS criteria discussed in this paper is limited (for the sake of illustration), our model is extensible. New criteria (either generic or domain specific) can be added without fundamentally altering the underlying computation mechanism. In particular, it is possible to extend the quality model to integrate non-functional service characteristics such as those proposed in, or to integrate service QoS metrics such as those proposed by: Generic quality criteria: They consider three generic quality criteria which can be measured

objectively for elementary services: (1) execution price, (2) execution duration, and (3) reputation. Criteria such as availability and reliability are not required in model due to the use of active user feedback and execution monitoring. Execution price: This is the amount of money which a service requester has to pay to the service provider to use a web service such as checking a credit, or the amount of money the service requester has to pay to the service provider to get a commodity like an entertainment ticket or a monthly phone service. Web service providers either directly advertise the execution price of their services, or they provide means for potential requestors to inquire about it. Let s be one web service, then qpr(s) is the execution price for using that service s. Execution duration: The execution duration qdu(s) measures the expected delay in seconds between the moment when a request is sent and the moment when the service is rendered. The execution duration is computed using the expression qdu(s) = Tprocess(s) + Ttrans(s), meaning that the execution duration is the sum of the processing time Tprocess(s) and the transmission time Ttrans(s). Execution time is obtained via active monitoring. Reputation: The reputation qrep(s) of a service s is a measure of its trustworthiness. It mainly depends on end users experiences of using the service s. Different end users may have different opinions on the same service. The value of the reputation is defined as the average ranking given to the service by end users, i.e. qrep = ( Ri)/n where Ri is the end users ranking on a services reputation, n is the number Page 11

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Composition of Web Services

May 2011

of times the service has been graded. Usually, end users are given a range to rank Web Services. For example, in Amazon.com, the range is [0, 5]. Business related criteria: The number of business related criteria can vary in different domains. For example, in phone service provisioning domain, the penalty rate for the early termination and the fixed monthly charge are important factors for users to consider when selecting a particular service provider. We use the generic term usability to group all business related criteria. In our chosen application, we measure usability from three aspects, transaction, compensation rate and the penalty rate. Transaction support is used for maintaining data consistency. In prior QoS models, no transactional criteria are being used in the computation of QoS value. However, from the perspective of a requester, whether a web service provides an undo procedure to rollback the service execution in certain period without any charges is an important factor that will affect his/her choice. Transactional property can be evaluated by two dimensions: whether undo procedure is supported qtx(s) and whats the time constraints qcons(s) on undo procedure. It should be noted that qtx(s) = 0/1, where 1 indicate the web service supports transaction and 0 otherwise; qcons(s) indicates the duration of undo procedure is allowed. Compensation rate qcomp(s) of a web service indicates percentage of the original execution price that will be refunded when the service provider cannot honour the committed service or deliver the ordered commodity. Penalty rate qpen(s) of a web service indicates what percentage of the original price service requesters need to pay to the provider when he/she wants to cancel the committed service or ordered commodity after the time out period for transaction to roll back is expired. Web Service QoS Computation: The QoS registry is responsible for the computation of QoS value for each service provider. Assuming that there is a set of Web Services that have the same functional properties, where S (S = {s1, s2, ..., sn}), web service computation algorithm determines which service si is selected based on end users constraints. Using m criteria to evaluate Dept. of Information Science and Engineering, MSRIT Page 12

Quality Driven Dynamic Composition of Web Services

May 2011

web service, we can obtain the following matrix Q. Each row in Q represents a web service si, while each column represents one of the QoS criteria.

In order to rank the Web Services, the matrix Q need to be normalized. The purposes of normalization are: 1) to allow for a uniform measurement of service qualities independent of units. 2) to provide a uniform index to represent service qualities for each provider. Provider can increase and decrease his/her quality index by entering a few parameters, 3) to allow setting a threshold regarding the qualities. The number of normalizations performed depends on how the quality criteria are grouped. In our example criteria given in Section 2, we need to apply two phases of normalization before we can compute the final QoS value. The second normalization is used to provide uniform representation of a group of quality criteria (e.g. usability) and set threshold to a group of quality criteria. First ormalization Before normalizing matrix Q, two arrays are defined. The first array is N = {n1, n2, ..., nm} with 1 j m. The value of nj can be 0 or 1. nj = 1 is for the case where the increase of qi,j benefits the service requester while nj = 0 is for the case where the decrease of qi,j benefits the service requester. The second array is C = {c1, c2, ..., cm}. Here cj is a constant which sets the maximum normalized value. Each element in matrix Q will be normalized using the following equations. 1/n qi,j is the average value.

Dept. of Information Science and Engineering, MSRIT

Page 13

Quality Driven Dynamic Composition of Web Services

May 2011

of quality criteria j in matrix Q. Applying these two equations to Q, we get matrix Q which is shown below:

Second ormalization In our QoS model, quality criterion can also be represented as a group and manipulated as a group. For example, the usability criterion. Each group can contain multiple criteria. For example, both compensation and penalty rates belong to the usability group. To compute the final QoS value for each web service, we introduce Matrix D and Matrix G. Matrix D is used to define the relationship between quality criteria and quality groups. Each row in Matrix D represents a quality criterion, and each column in Matrix D represents one quality group value. Matrix G represents QoS information based on the values of quality group of Web Services. Each row in Matrix G represents a web service, and each column in Matrix G represents one quality group value. Matrix D and Matrix G are shown below:

Dept. of Information Science and Engineering, MSRIT

Page 14

Quality Driven Dynamic Composition of Web Services

May 2011

Here, l is the total number of groups of quality criteria. For the value of each element in matrix D, di,j = 1 if the ith quality criterion in Q is included in jth grouping G. By applying Matrix D to Q, we have matrix G. The equation is shown as: G = Q * D group j such as price sensitivity and service sensitivity etc. To normalize matrix G, two arrays are needed. In the first array T = {t1, t2, ..., tl}, tj is a constant which sets the maximum normalized value for the group j. In the second array F = {f1, f2, ..., fl}, fj is weight for group j such as price sensitivity and service sensitivity etc. This is used to express users preferences over jth group. Each element in matrix G will be normalized using equation below

In the above equations, 1/n

gi,j. The average value of group criteria j in matrix G.

Applying equations to G, we get matrix G which is shown below:

Dept. of Information Science and Engineering, MSRIT

Page 15

Quality Driven Dynamic Composition of Web Services

May 2011

Finally, author computes the QoS value for each web service by applying array F to matrix G. The formula of QoS is shown below: QoS(si) = (hi,j * fj)

Then the author concludes by saying that this method for calculating QoS can be implemented while composing the Web Services by using this algorithm for finding QoS parameters ranking as an API. Contrast: In [2] the focus is on calculating the aggregate value of QoS parameters for a service. QoS parameters are taken as entries in a matrix and the matrix is normalized at different stages. The system proposed in the project considers fewer QoS parameters namely User Rating and Execution Time. User Rating is given in the range of 1 to 5. The Execution Time is normalized to the range 1 to 5 using the Min-Max Normalization and the average of the two is calculated using the Execution Time as a negative attribute. The resulting number represents the value of the service. 2.2.3 Paper 3: Classification of the state-of-the-art dynamic Web Services composition

techniques. In this paper the authors provide information about current scenario of web service composition and what are the different ways in which Web Services can be composed namely in static or dynamic with emphasis on dynamic composition of Web Services. In this paper, authors present a novel classification of the current state-of-the-art dynamic Web Services composition techniques with attention to the capabilities and limitations of the underlying approaches. They proposed taxonomy of these techniques is derived based on a Page 16

Dept. of Information Science and Engineering, MSRIT

Quality Driven Dynamic Composition of Web Services

May 2011

comprehensive survey of what has been done so far in dynamic web service composition. Highlights of the Paper: Web Services composition can be categorized into manual or automatic and most commonly static and dynamic. Manual composition means that composition is performed by means of employees who have access to the elementary services, while automatic implies that a software agent performs composition based on some predefined algorithms. The composition of Web Services can be done in a static or dynamic way. It can be done statically by allowing the requestor to build an abstract model of the tasks that should be carried-out during the execution of this web service, at design and/or compile time. This abstract model is nothing more than a representation of a set of tasks and the data dependency among them. However, this should be done before the composition planning starts. Each task contains a query clause that is used to search the real atomic web service to fulfil the task. Static composition is usually implemented through graphs. On the other hand, dynamic composition is achieved by creating the abstract model of tasks and selecting the atomic Web Services automatically without the interference of the service requestor in the composition process. This type of classification is usually related to the workflow-based composition techniques According to authors Dynamic web service composition can serve applications or users on an on-demand basis. With dynamic composition, the applications capabilities can be extended at runtime so that theoretically an unlimited number of new services can be created from a limited set of service components, thus making applications no longer restricted to the original set of operations specified and envisioned at design and/or compile time. Moreover, dynamic composition is the only means to adapt the behaviour of running components in highly available applications such as, banking and telecommunication systems where services cannot be brought offline to upgrade or remove obsolete services. In this paper, authors survey different techniques used to provide dynamic Web Services composition and classify them according to their underlying approaches.

Dept. of Information Science and Engineering, MSRIT

Page 17

Quality Driven Dynamic Composition of Web Services Benefits of dynamic Web Services composition:

May 2011

The authors quote several benefits of the dynamic composition of services. Unlike static composition, where the number of services provided to the end users is limited and the services are specified at design time, dynamic composition can serve applications or users on an on-demand basis. With dynamic composition, an unlimited number of new services can be created from a limited set of service components. Besides, there is no need to keep a local catalogue of available Web Services in order to create composite Web Services as is the case with most of the static-based composition techniques. Moreover, the application is no longer restricted to the original set of operations that were specified and envisioned at the design or compile times. The capabilities of the application can be extended at runtime. Also, the customization of software based on the individual needs of a user can be made dynamic through the use of dynamic composition without affecting other users on the system. Dynamic composition infrastructure can be helpful in upgrading an application. Instead of being brought offline and having all services suspended before upgrading; users can continue to interact with the old services while the composition of new services is taking place. This will provide seamless upgrading round the-clock service capabilities to existing applications. Tentatively, it should be clear that dynamic composition techniques are much more expensive in terms of computational power and CPU time than static composition, as they impose more complicated algorithms and procedures. Nonetheless, this is not necessarily true all the time, since it is closely related to the application

requirements/specifications and the users needs. Contrast: In [3] the focus is on complete dynamic nature of composition by using web at large as the repository. In the system proposed instead of web as a repository a database of Web Services which includes the name of the service, its URL, QoS parameters namely User Rating and Execution Time which are dynamically calculated is used as a repository

Dept. of Information Science and Engineering, MSRIT

Page 18

Quality Driven Dynamic Composition of Web Services 2.2.4

May 2011

Paper 4: Research in enterprise applications of dynamic web service composition

methods and models. In this paper the authors summarizes current technologies of dynamic web service composition. Then, based on the existing technologies, they raise a new solution for dynamic web service composition. Authors make use of the knowledge of domain ontology. On the one hand, the users requirement was broken down into a series of abstract Web Services, according to the logic of business processes. On the other hand, through establishing the web service index storehouse, authors try to gather the existing services and composite services in domain ontology. By semantic matching between the abstract services and the atomic services or the composite services, the executable Web Services composition model can be given according to the authors of this paper. Highlights of the Paper: The authors in this paper discuss three kinds of dynamic Web service composition in this section, that is, dynamic Web service based on business flow, based on service interface matching and based on AI programming. But for our project we are trying to implement the dynamic Web service based on business flow. Dynamic Web service composition based on business process Service composition based on business process is a method that constructs a business process on a set of basic services, determined static or dynamic. The composition method uses a model similar to the traditional work flow model to describe the composite service. Activity, control flow and data flow are the basic elements for the composition model. Activities correspond to certain operations carried out by basic services. Control flows describe the dependency relations among the activities, that is, the time sequence that the basic services to be carried out. Data flows describe the data transformation between the activities. In, abstract services are defined as placeholder for concrete activities to construct the work flow model. Before the Web service start, the matching and binding of the services are carried out to replace every abstract service with a specific concrete service.

Dept. of Information Science and Engineering, MSRIT

Page 19

Quality Driven Dynamic Composition of Web Services

May 2011

Contrast: In the system proposed, user requirement is broken down into a series of abstract Web Services which are executed sequentially. The composition is done dynamically and hence no composite service is stored in the web service database. The system follows dynamic web service composition based on business flow and excludes dynamic composition based on service interface matching and AI programming. The composition method uses a model similar to the traditional work flow model to describe the composite service. Activity, control flow and data flow are the basic elements for the composition model as mentioned in [4]. 2.2.5 Paper 5: Quality Driven Web Services Composition The process-driven composition of Web Services is emerging as the promising approach to integrate business applications within and across organizational boundaries. In this approach, individual Web Services are federated into composite Web Services whose business logic is expressed as a process model. The tasks of this process model are essentially invocations to functionalities offered by the underlying component services. Several component services are capable of executing a given task. In this paper, the authors propose that the selection of the component services should take place at run time taking into consideration quality parameters like execution time, execution price, reliability etc and also global constraints like budget constraints. Highlights of the Paper: A composite web service is an umbrella structure aggregates multiple other elementary and composite Web Services, which each interact with each other according to a process model. Following our previous work we choose to specify the process model of a composite service as a state chart. The choice of state charts for specifying composite web service is motivated by two main reasons: (1.) state charts have a well defined semantics; and (2.) they offer the basic flow constructs found in contemporary process modeling languages (i.e., sequence, conditional branching, structured loops, concurrent threads, and inter thread synchronization). The first characteristics facilitates the application of formal manipulation techniques to state chart models, while the second characteristic ensures that the service composition mechanisms developed in the context of state charts, can be adapted to other process modelling languages like for example, those Dept. of Information Science and Engineering, MSRIT Page 20

Quality Driven Dynamic Composition of Web Services

May 2011

that are being designed by web services standardization efforts (e.g., BPEL4WS, WSCI, BPML). A state chart is made up of states and transitions. In the proposed composition framework, the transition of the state chart is labeled with events, conditions, and assignment operations over process variables. States can be basic or compound. Basic states are labelled with innovations to web service operations. Compound state contains one or more state chart within them. Specifically, compound state comes in two flavors: OR and AND states. An OR-state contains a single state chart within it whereas an AND-state contains several state charts (separated by dashed lines ) which are intended to be executed concurrently. Accordingly, OR-states are used as a decomposition mechanism for modularity purpose, while AND-states are used to express concurrency: they encode a fork/join pair. The initial state of a state chart is denoted by a filled circle, while the final state is denoted by two concentric circles: one filled and the other unfilled. A simplified state chart below specified a Travel Planner composite Web Service is depicted in figure 2.2. In this composite service, a search for attractions is performed in parallel with the flight and an accommodation booking. After these searching and booking operations are completed, the distance from the hotel to the accommodation is computed, and either a car or a bike rental service is invoked. Note that when two transitions stem from the same state (in this case the state t4), they denote a conditional branching, and the transition should therefore be labeled with disjoint conditions.

Fig 2.2: State chart for Travelling planner

Dept. of Information Science and Engineering, MSRIT

Page 21

Quality Driven Dynamic Composition of Web Services

May 2011

A basic state of a state chart describing a composite service can be labeled with an invocation to either of the following: An elementary Web service, i.e., a service which does not transparently rely on other Web Services. A composite Web service aggregating several other services. A web service community, i.e., a collection of Web services with a common functionality although different non-functionality properties (e.g., with different providers, different QoS parameters, reputations, etc. The concept of Web service community addresses the issue of composing a large and changing collection of Web Services. Service communities provide description of a desired functionality (e.g., flight booking) without referring to any actual service (e.g., Qantas flight booking web service). The set of members of the community can be fixed when the community is created, or it can be determined through a registration mechanism, thereby allowing service provider to join, quit and reinstate the community at any time. When a community receives a request to execute an operation, this request is delegated to one of its current members. The choice of the parameters of delegate is done at execution time based on the

the request, the characteristics of the members, the history of past

executions, and the status of ongoing executions. Contrast: In [5] the focus is on the concept of an abstract community which provides desired description of the services but not the actual services and here selection of the appropriate service from the community is done based on the parameters of user query, QoS parameters of the service, its past history or rating along with the status of its current execution. In the system proposed we have a database which has the specifications of the actual services and for selection the criteria are user query parameters, QoS parameters of the service and the past history or the User Rating. We do not take into consideration the status of ongoing transaction of a service for its selection.

Dept. of Information Science and Engineering, MSRIT

Page 22

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 3 SYSTEM REQUIREME T SPECIFICATIO


3.1
3.1.1

Introduction
Purpose This Software Requirements Specification document aims at providing all the

requirements of the mentioned system which is Travel Planner based on Quality Driven Composition of Web Services. The purpose and the ideology of the system have already been mentioned in the literature survey. The Software Requirements Specification document provides the implementation details of the system. 3.1.2 Document Conventions All the headings will be made bold. The indention is followed to easily recognize and comprehend the different sections of the document. The key points and so on will henceforth be highlighted by making them in Italics. All functional listings will be

prioritized in descending order, that is to say, the highest priority with highest number on the very top of the list and then the next list item with the next higher priority number listed below it. Headings follow these conventions: Times New Roman, font size 16(Main heading) and 14(Sub heading), and bold. Text follows these conventions: Times New Roman, font size 12. Figures should be in bold and italics, font size 12. 3.1.3 Intended Audience and Reading Suggestions The document is intended to be read by developers, users, testers, and documentation writers. The order as provided in the template of the standard Software Requirement Specification (SRS) is followed. The order of reading will be

appropriate to be followed as the documentation is done in order to understand the scope of the problem and the suggested solution software. This is a general document prepared in context of all intended audience, readers and stakeholders of the system. 3.1.4 Project Scope The project proposes quality and process driven composition of a Travel Companion web service which can be broken down into different component Web Services like airline Dept. of Information Science and Engineering, MSRIT Page 23

Quality Driven Dynamic Composition of Web Services

May 2011

reservation, hotel booking web service etc. It aims at co-coordinating and composing different Web Services whose business logic is expressed as a process model the tasks of which involves invoking the functionalities offered by the underlying composite services in order to fulfil user requirements and preferences.

3.2
3.2.1

Overall Description
Product Perspective In the present scenario of web service composition most of the Web Services are

statically composed. Web Services are bundled to perform the tasks given by the user. This composition is done at the design time with limited number of Web Services and the services chosen are not selected based on any QoS parameters. To deal with this issue, composition of Web Services should be done in such a way that there should be a set of parameters or QoS entities like price and execution time etc which should be taken in consideration. This composition can be done based on QoS and furthermore dynamically so that the user or the client who is using that composed bundle of web service would get the best deal. 3.2.2 Product Features The problems of the existing system have already been pointed out previously. Thus, the system being developed as the current project has the following features: It takes the query from the user. Breaks down the query into component tasks. Dynamically invokes the services for each of the component tasks based on the QoS parameters. Composes the invoked services to match the user query and presents it to the user. 3.2.3 User Classes and Characteristics 1. End User: The user interacts with the user interface of the system to use the functionalities of the system i.e. to book travel tickets and/or hotel reservation. 2. Service Provider: The service provider can publish his service with the Dept. of Information Science and Engineering, MSRIT Page 24

Quality Driven Dynamic Composition of Web Services given repository of the system.

May 2011

3. System Administrator: The administrator manages the working of the entire system and authenticates the service providers. 3.2.4 Operating Environment The system is online based and does not depend on the Operating system. The basic necessities are Internet connection, any standard browser and MySQL for the database implementation. 3.2.5 Design and Implementation Constraints The design constraints are that of size of the Web Service Registry, number of parameters taken in a request, scalability of the system. Also, implementation constraints are that of the policies of Web Services, standards of Web service composition change in QoS parameters to be considered while composition. 3.2.6 Assumptions and Dependencies The dependencies are the basic requirements of a stable internet connection and consistent database. All other components are developed inside the system. The networking and connecting is the only issue outside the scope of the system development. and

3.3

System Features
The design documents to support the system are attached below. The features of

the system are listed and explained here. 3.3.1 Service Registry Description and Priority The service registries are used to register the Web Services by web service providers. Also they are used to request the users desired Web Services. Each registry has the references of Web Services that are actually hosted on service repositories. Stimulus/Response Sequences The users of this module as mentioned are the service providers and administrator (registering the service). Dept. of Information Science and Engineering, MSRIT Page 25

Quality Driven Dynamic Composition of Web Services Functional Requirements REQ-1: Web server REQ-2: Central Database Server. REQ-3: Web Services Registry. 3.3.2 Translator

May 2011

Description and Priority The purpose of translator is to translate request of the user to a query that is understandable by the matching engine and returned the composed Web Services to the user. Stimulus/Response Sequences This module works in sequence with the matching engine and the user interface. Functional Requirements REQ-1: User-Interface. REQ-2: Matching Engine. 3.3.3 Matching Engine Description and Priority The purpose of matching engine is to match the users request from the Web Services database. If match is found, it returns results back to web server. If not then select the Web Services from web, store/update them in database and then return results back to requested composer. Stimulus/Response Sequences There are no users involved to get this module working. The sequence of actions will trigger this service and it happens as a backend process. Functional Requirements REQ-1: Web Services Registry. Dept. of Information Science and Engineering, MSRIT Page 26

Quality Driven Dynamic Composition of Web Services 3.3.4 Composer Description and Priority

May 2011

The composer composes the selected component services in order to make a single desired web service. Stimulus/Response Sequences There are no users involved to get this module working. The sequence of actions will trigger this service and it happens as a backend process. Functional Requirements REQ-1: Central Database. REQ-2: API to select required Web Services from the Web Services registry. 3.3.5 Execution Engine

Description and Priority Executes the composed services which are sent as the output. Stimulus/Response Sequences There is no direct user for this module. This module works in sequence with the composer and the user interface. Functional Requirements REQ-1: User-Interface. REQ-2: Composed Web Services.

3.4

External Interface Requirements

3.4.1 User Interfaces The user interfaces are taken care of as a website. The administrator and various service providers login to their respective accounts and the options required for them are provided after login. The consumers of the composed Web Services can visit the site and query the various available Web Services through the services searching mechanism Dept. of Information Science and Engineering, MSRIT Page 27

Quality Driven Dynamic Composition of Web Services present on the web site. 3.4.2 Hardware Interfaces Servers for central database and web registry. 3.4.3 Software Interfaces

May 2011

Most of the modules or services provided are software modules. These are composed and interfaced in such a way as to function as a single system. 3.4.4 Communications Interfaces The networking and communication protocols used are standard Internet based protocols like HTTP request-response model. The other requirements for

safety and reliability are dealt with in the next section of the document. The system is to be implemented in such a way as to increase the data transfer rates and proper utilization of the available bandwidth.

3.5
3.5.1

Other on-functional Requirements


Performance Requirements

Response Time: The system shall give responses in 2-5 seconds after the user enters the search query. User Interface: The user-interface screen shall respond at a maximum of 5 seconds from the time request is accepted by the information. Conformity: The systems must conform to the free and open source community Security requirement. Modification: Any modification (Insert, delete, update) for the Web Services Registry shall be synchronized and done only by the administrator of the system. Dept. of Information Science and Engineering, MSRIT Page 28

Quality Driven Dynamic Composition of Web Services Administrator rights:

May 2011

Administrators shall be able to view and modify all information in the Web Services registry and user interface. 3.5.2 Software quality Attributes Maintainability Back Up The system shall provide the capability to back-up the Data. The system shall keep a log of all the errors. Reliability Availability The system shall be available all the time.

Dept. of Information Science and Engineering, MSRIT

Page 29

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 4 SYSTEM DESIG


4.1 Use Case Diagram

4.1.1 Use Case Diagram for End User

Natural Language Query

Input to check service

availability

Selects the Web Service

Consumes the

Checks

Books

End User

Rates the Service

Makes Payment

Fig 4.1 Use Case Diagram for end user

Dept. of Information Science and Engineering, MSRIT

Page 30

Quality Driven Dynamic Composition of Web Services 4.1.2 Use Case for Client

May 2011

Searches Databases for Services

Retrieves User Rating, Execution Time for Services Returned

Sorts the Services

Client

Returns Ranked List of Services

Composes the Services

Fig 4.2 Use Case Diagram for client

Dept. of Information Science and Engineering, MSRIT

Page 31

Quality Driven Dynamic Composition of Web Services

May 2011

4.2

Class Diagram
User Interface

airsearch +String source +String destination +String date +String cls +search()

searchlink

hotsearch +String place +String date +String type

airlinks +String name1 +String name2 +String name3 +String name4 +String name5 +linking()

hotlinks +String name1 +String name2 +String name3 +String name4 +String name5 +linking()

+search()

linkdetails +flloat rank +String links +String name +String exectime +String nrlexectime +String newsearch

banking +String card_no +String cvv +int amt +banking()

airpassenger +String index +String name +String email +String phnumber +pdetails() airline

hotelcustomer +String index +String name +String phone +String email hotel +cdetails()

ranking

travelpackage

hranking +int ranking +String links +ranks()

aranking +int ranking +String links +ranks() air +String source +String destination +Sting date +String class +int no_of_seats +String username +String phnumber +String emailid +String id +availibility() +book() kair +String source +String destination +Strng date +String class +int no_of seats +String username +String phnumber +String emailid +String id +availibility() +book() sair +String source +String destination +String date +String class +int no_of_seats +String username +String phnumber +String emailid +String id +availivility() +book() taj +String place +String date +String type +int no_of_rooms +String username +String phnumber +String emailid +String id +availibility() +book() itc +String place +String date +String type +int no_of_rooms +String username +String phnumber +String emailid +String id +availibility() +book() hyatt +String place +String date +String type +int no_of_rooms +String username +String phnumber +String emailid +String id +availibility() +book()

airdetails +Float price +int seat +String source +String destination +String date +String flightid

hoteldetails +Float price +int no_of_seats +String place +String id +String type +String date

Fig 4.3 Class Diagram Dept. of Information Science and Engineering, MSRIT Page 32

Quality Driven Dynamic Composition of Web Services

May 2011

4.3
User

Sequence Diagram
Finder Composer Service Selector Web Services Service Linker WSDB Execution Engine

Give NL Query()

Query()

Search Service()

Service Provider()

Search links()

get links()

Consumption Give NL Query() Query() Search Service() Service Provider()

Search links()

get links()

Consumption Search Service() Service Provider()

Search links()

get links()

Consumption

Fig 4.4 Sequence Diagram

Dept. of Information Science and Engineering, MSRIT

Page 33

Quality Driven Dynamic Composition of Web Services

May 2011

User gives natural language query to the Finder. Finder processes the query and directs the user to the Service Selector. Service Selector takes the necessary input from the user and searches the databases of the Web Services to check the availability. Service Linker retrieves the QoS parameters namely user rating and execution time of the available services from the WSDB, normalizes the parameters and determines the rank of the services and gives the list of services to the Execution Engine in a ranked fashion. The user then consumes the service. In case of composition of Web Services the user is directed from one to the next module by the Composer and same set of steps are repeated.

Dept. of Information Science and Engineering, MSRIT

Page 34

Quality Driven Dynamic Composition of Web Services

May 2011

4.4

State Chart Diagram

4.4.1 State Chart Diagram for the entire system

Yes
Finder Query Processing Query

No

No

Selection

Consumption

Business Transaction

Confirmation

Quit Fig 4.5 State Chart Diagram for the entire system

The Finder takes Natural Language Query from the user. The Query is processed and the user is directed to the required module. The inputs necessary for the module are taken by the User Query and Processed to return a list of Web Services satisfying the query. User Selects a service from the list and Consumes the service by satisfying the requirements of the Business Transactions involved, Confirms the usage and Quits.

Dept. of Information Science and Engineering, MSRIT

Page 35

Quality Driven Dynamic Composition of Web Services 4.4.2 State Chart Diagram for Processing

May 2011

Service Selector

Web Services

Service Linker

WSDB

Execution Engine

Return Results

Fig 4.6 State Chart Diagram for processing Processor involves a Service Selector which searches the databases of the service providers to check the availability of the services which comply with the query. The set of services available are passed onto the Service Linker which retrieves the QoS parameters namely user rating and execution time of each of the services from the WSDB, normalizes them to a range of 1-5 and calculates their average and determines the rank of each of them and passes a list of services in a ranked fashion to the Execution Engine which in turn displays the list to the user for service selection.

Dept. of Information Science and Engineering, MSRIT

Page 36

Quality Driven Dynamic Composition of Web Services

May 2011

4.5

Deployment Diagram

Services

JDBC

HTTP, SOAP

JSP,CSS HTML

Fig 4.7 Deployment Diagram

Dept. of Information Science and Engineering, MSRIT

Page 37

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 5 IMPLEME TATIO


5.1 Algorithm:-

Step 1: Start Step 2: Natural Language Query Processing directing to a particular type of service Step 3: User Input for the type of the service chosen Step 4: Querying the availability Step 5: Return the Services complying with the query 5a: Retrieve the rating of the service from the WSDB 5b: Retrieve the execution time of the service 5c: Normalize the execution time (min-max normalization) 5d: Determine the average of the above two and return the result as the rank of the Service Repeat the Step 5 for all the services returned in Steps 4 and 5 Step 6: Sort the services based on the rank (higher the rank better the service) Step 7: Display the set of services in ranked fashion Step 8: Selection of services by the user Step 9: Consumption of the service by the user 9a: Check availability 9b: Book tickets/rooms 9c: Get user details Step 10: Ranking the service and updating WSDB

Dept. of Information Science and Engineering, MSRIT

Page 38

Quality Driven Dynamic Composition of Web Services Step 11: If package redirect the user to the next module and repeat steps 4 to 10 Else go to Step 12 Step 12: Make payment Step 13: Confirmation of the user transaction Step 14: Stop

May 2011

5.2

Framework:

End User User Query

Translator

Internal Specification (Parameters)

Service Selector

Result

Service Specification
WSDB

Executor
Service1 Service2

........ ServiceN

Service Provider

Fig 5.1 Framework for our System

We propose quality driven and dynamic composition of Web Services taking Travel package provider as the case study which can be broken down to different Web Services like airline reservation and hotel booking web service. The proposed web service will co-ordinate and compose different Web Services based on the user requirement and user preference.

Dept. of Information Science and Engineering, MSRIT

Page 39

Quality Driven Dynamic Composition of Web Services

May 2011

In the proposed framework, user gives a natural language query, which is processed to direct the user to the corresponding page where the user parameters are taken as input and passed onto the service selector which searches the databases of the services to match the query and returns the set of selected services. The order of display of the selected services is based on the average calculated using the user rating and the execution time of each service maintained in WSDB (Web Services Database). The user selects the service of his/her choice and the control is passed onto the executor which executes the service and hence the user request is fulfilled and the results are returned. In case of a request for a composed service, the executor directs the user from one module to another and the same procedure of fulfilling the user request is repeated. Consider the case in which the user gives a natural language query like Bangalore to Delhi keyword being to. The natural language query is processed and the user is directed to a suitable service, for example air ticket booking service. Consider the case in which the user wishes to book the air tickets from Bangalore to Delhi. Here, the source, destination, date of departure and the class of seats are taken as the input parameters given by the user. The query is processed to search the databases of all the service providers for example IndianAirlines(IA), KingFisher(KF), SpiceJet(SJ) etc for availability. For the services available (lets say IA and KF) the User Rating (given by the user after consumption of the service) and the Execution Time (calculated every time the service is hit) i.e. the QoS parameters of the services are retrieved. Execution Time is normalized using Min-Max normalization method and the average of both the QoS parameters is calculated considering Execution Time as a negative attribute and a rank is thus calculated for all the services returned. The services are sorted based on the rank (higher the rank, better the service) and are returned to the user. User selects a service among the list of services and the previous input is automatically forwarded to this service there by returning the price per ticket, number of seats available etc. The user then books the tickets by giving the mandatory details. The user, then rates the service on the scale of 1-5 which is followed by the necessary update for User Rating of the service in the WSDB. The user is then required to make payment for the above and confirm the booking.

Dept. of Information Science and Engineering, MSRIT

Page 40

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 6 TESTI G
6.1 Introduction
Software testing involves executing an implementation of the software with test data and examining the outputs of the software and its operational behavior to check that it performed as required. Testing is a dynamic technique of verification and validation because it works with an executable representation of the system. Software testing, depending on the testing method employed, can be implemented at any time in the development process. However, most of the test effort occurs after the requirements have been defined and the coding process has been completed. Testing cannot establish that a product functions properly under all conditions but can only establish that it does not function properly under specific conditions. In the current culture of software development, a testing organization may be separate from the development team. The scope of software testing often includes examination of code as well as execution of that code in various environments and conditions as well as examining the aspects of code: does it do what it is supposed to do and do what it needs to do.

6.2

Unit testing
Unit testing is a method by which individual units of source code are tested to

determine if they are fit for use. A unit is the smallest testable part of an application. The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. Unit tests find problems early in the development cycle. The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect. Each unit is tested separately before integrating them into modules to test the interfaces between modules.

Dept. of Information Science and Engineering, MSRIT

Page 41

Quality Driven Dynamic Composition of Web Services 6.2.1 Test scenario for unit testing

May 2011

SI No. of Name of Item / Feature Sample Input test case test being tested 1

Expected output

Actual output

Result

Unit test Enter the valid To, Hotels, Web page for Web page for Pass keyword in search Package query query box. processing processing Unit test Enter the Invalid Any word Error keyword in search other than message box. keyword Unit test Enter the source Bangalore and destination Chennai with valid date Unit test Enter the source Bangalore and destination Delhi with Invalid date to Set services request to Set services request Error message Pass

of Set of services Pass for for request

of Error message Fail for saying no flight exist

Unit test Enter the valid Ten digit email id and number and phone number correct format of email

Do not show Do not show Pass error error message message and and get saved get saved

Unit test Enter the Invalid Anything Show the Show the error Pass email id and other than the error message phone number defined format message

Unit test Enter the number

seat Any numeric Proceed to Proceed to the Pass value lesser the page for page for the than or equal the payment payment to the available seat number

Dept. of Information Science and Engineering, MSRIT

Page 42

Quality Driven Dynamic Composition of Web Services SI No. of Name of Item / Feature Sample Input Expected test case test being tested output 8 Unit test Enter the seat Any numeric number required value greater than the available seat number Unit test Enter the card and number payment

May 2011 Actual output Result

Error Error message Pass message saying not saying not enough seats enough seats

valid Any valid Payment is cvv card number done and for with correct successful transaction password Any invalid Error card number message with wrong password

Payment is Pass done and successful transaction Error message Pass

10

Unit test Enter the Invalid card or invalid cvv number for payment

11

Unit test Enter the correct Bangalore location for hotel module

Set of hotel Set of hotel Pass services for services for request request

12

Unit test Enter the valid Ten digit Do not show Do not show Pass email id and phone number and error error message number for hotel correct message and and get saved format of get saved email Unit test Enter the Invalid Anything Show the Show the error Pass email id and phone other than error message number for hotel the defined message format Unit test Enter the number Any numeric Proceed to Proceed to the Pass of room required value less the page for page for than the payment payment available number of rooms

13

14

Dept. of Information Science and Engineering, MSRIT

Page 43

Quality Driven Dynamic Composition of Web Services SI No. of Name of test Item / Sample test case Feature Input being tested 15 Unit test Try booking Give wrong ticket details without valid account Enter the amount more than present in your account Any figure greater than your account balance Expected output Actual output

May 2011 Result

Rollback function works and database gets updated

Rollback Pass function works and database gets updated

16

Unit test

Error Pass Error message message saying not saying not enough enough money money

Table 6.1 Unit Testing

Dept. of Information Science and Engineering, MSRIT

Page 44

Quality Driven Dynamic Composition of Web Services

May 2011

6.3

Integration Testing
Integration testing is a phase in software testing in which individual software modules

are combined and tested as a group. It occurs after unit testing and before system testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing. 6.3.1 Test scenario for integration testing

SI No. of Name of test Item / Sample Input Expected test case Feature output being tested 1 Integration test Try booking Select any airline ticket flight and and hotel hotel service rooms as a package. Both the costs should be calculated and added for payment

Actual output

Result

Both the Pass costs is calculated and added for payment

Integration test

Try booking airline in package even though the hotel is not available.

Any source to Book the Error destination flight ticket message where hotel is not available

Fail

Table 6.2 Integration Testing

Dept. of Information Science and Engineering, MSRIT

Page 45

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 7 RESULTS
7.1 Scenario 1

Searching for a flight either by clicking on Air Travel or by searching using the keywords in the search box. There are several other options also by which you can search for hotels or book package or you can also go on the links of the Top Destination for knowing more about that place.

Fig 7.1.1 Front page with search box

Dept. of Information Science and Engineering, MSRIT

Page 46

Quality Driven Dynamic Composition of Web Services User is asked to enter proper details about the flight and check for its availability.

May 2011

Fig 7.1.2 Checking the availability of flight The user selects the best web service from the returned list of the services.

Fig 7.1.3 Selection of Best Web Service

Dept. of Information Science and Engineering, MSRIT

Page 47

Quality Driven Dynamic Composition of Web Services Entering the booking details as well as the personal details of the user.

May 2011

Fig 7.1.4 Details of the service selected Once booking details are given the user is now asked to rank the service.

Fig 7.1.5 Ranking of the Service

Dept. of Information Science and Engineering, MSRIT

Page 48

Quality Driven Dynamic Composition of Web Services The new rank is updated and the user is asked to make payment.

May 2011

Fig 7.1.6 Payment Request The user is asked to enter the payment details by giving his card number and the cvv.

Fig 7.1.7 Payment Details

Dept. of Information Science and Engineering, MSRIT

Page 49

Quality Driven Dynamic Composition of Web Services If the payment details are valid only then the transaction completes.

May 2011

Fig 7.1.8 Transaction Completion

Dept. of Information Science and Engineering, MSRIT

Page 50

Quality Driven Dynamic Composition of Web Services

May 2011

7.2

Scenario 2

Here the user can choose to book a package by either entering the package keyword in the search box or by clicking on the Tours & Packages option.

Fig 7.2.1 Package Search Once the option for package is selected the user gives the details for booking flight as mentioned in the previous scenario. He also ranks the service and then the link to hotel booking is selected.

Fig 7.2.2 Link to hotel search Dept. of Information Science and Engineering, MSRIT Page 51

Quality Driven Dynamic Composition of Web Services Here the user enters booking details for the hotel and checks for availability.

May 2011

Fig 7.2.3 Hotel Details The user then selects the best service available.

Fig 7.2.4 List of Hotel Services

Dept. of Information Science and Engineering, MSRIT

Page 52

Quality Driven Dynamic Composition of Web Services The user here enters the booking details along with his/her personal details.

May 2011

Fig 7.2.5 Booking Details for Hotel Once the booking is done the user again ranks the service and is then forwarded to the payment page. Here he/she enters the payment details and pays for both hotel and the flight charges and thus the transaction completes if payment details are valid.

Fig 7.2.6 Payment Details for Package

Dept. of Information Science and Engineering, MSRIT

Page 53

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 8 CO CLUSIO
Web service composition is a very challenging task. We propose the solution for the existing problems, a technique for providing dynamic composition of Web Services based on the QoS parameters. We propose solution for this by taking into consideration a case study for travel companion web service. We propose quality driven and process driven composition of a Travel Companion web service which can be broken down into different Web Services like airline reservation, hotel booking web service etc. Multiple Web Services provide similar functionalities with different non-functional property values. To differentiate the members of a web service community during service selection we use non-functional properties like execution price, user rating etc. The selection of component service to execute a task is based on selection policies. This project tries to optimize the service selection locally and also aims to satisfy global quality constraints. We present an algorithm which retrieves the QoS parameters from the Web Services database, normalizes and determines the rank of the service and displays the list of services in a ranked fashion. It also provides composition of services in a sequential manner satisfying the user constraints.

Dept. of Information Science and Engineering, MSRIT

Page 54

Quality Driven Dynamic Composition of Web Services

May 2011

CHAPTER 9 SCOPE FOR FUTURE WORK

1. In this project we are using a local repository of Web Services. In true sense the entire web needs to be used as a data repository so that any web service fulfilling the user requirements and is registered in any public repository can be used. 2. The QoS parameters to be used should be more as Web Services are affected by large number of parameters like execution time, execution price, reliability, reputation, response time etc 3. Since the number of QoS parameters need to be considered are more the normalization technique should be more efficient than the one currently being used(Min-Max normalization) 4. Currently the project is deployed on a local intranet but in real world scenario it is desirable to deploy the project on the internet using a remote web server. 5. Automatic generation of the client side code once a web service is registered and the necessary information regarding that web service is provided. 6. More intelligent search engine for query processing using semantic technologies.

Dept. of Information Science and Engineering, MSRIT

Page 55

Quality Driven Dynamic Composition of Web Services

May 2011

A Appendix A
This work is licensed under Creative Commons Attribution- on-commercial 2.5 India License

You are free to Share: to copy, distribute and transmit the work to Remix: to adapt the work

Under the following conditions: Attribution: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work) Non Commercial: You may not use this work for commercial purposes

With the understanding that: Waiver: Any of the above conditions can be waived if you get permission from the copyright holder Other Rights: In no way are any of the following rights affected by the license Your fair dealing or fair use rights; The authors moral rights; Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice: For any reuse or distribution, you must make clear to others the license terms of this work.

Dept. of Information Science and Engineering, MSRIT

Page 56

Quality Driven Dynamic Composition of Web Services

May 2011

REFERE CES

Our references for the project include the following research papers: [1] A Survey of Automated Web Service Composition Methods, Jinghai Rao and Xiaomeng Su, 2006 [2] QoS Computation and Policing in Dynamic Web Service Selection, Yutu Liu, Anne H.H. Ngu and Liangzhao Zeng, 2004 [3] Classification of the state-of-the-art dynamic Web Services composition techniques, Atif Alamri, Mohamad Eid and Abdulmotaleb El Saddik, 2006 [4] Research in enterprise applications of dynamic web service composition methods and models, Wang Qing-Ming Tang Yong and Zhang Zan-Bo, 2009 [5] Quality Driven Web Services Composition, Liangzhao Zeng, Boualem Benatallah and Marlon Dumas, 2003 The Internet has been a huge source of information, where we fetched a great number of ideas for this project: http://en.wikipedia.org/wiki/Business_Process_Execution_Language http://portal.acm.org/citation.cfm?id=1037746 http://www.cse.iitb.ac.in/~krithi/papers/vandermeerd_fusion.pdf http://www.beautifulife.info/web-design/15-best-free-travel-templates/ citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.80.

Dept. of Information Science and Engineering, MSRIT

Page 57

Вам также может понравиться