Professional Documents
Culture Documents
Abstract
The demand for quickly delivering new applications is increasingly becoming a business imperative today. However, applica-
tion development is often done in an ad hoc manner resulting in poor reuse of software assets and longer time-to-delivery. Web
services have received much interest due to their potential in facilitating seamless business-to-business or enterprise application
integration. A web service composition system can help automate the process, from specifying business process functionalities,
to developing executable workflows that capture non-functional (e.g. Quality of Service (QoS)) requirements, to deploying them
on a runtime infrastructure. Intuitively, web services can be viewed as software components and the process of web service
composition similar to software synthesis. In addition, service composition needs to address the build-time and runtime issues
of the integrated application, thereby making it a more challenging and practical problem than software synthesis. However,
current solutions based on business web services (using WSDL, BPEL, SOAP, etc.) or semantic web services (using ontolo-
gies, goal-directed reasoning, etc.) are both piecemeal and insufficient. We formulate the web service composition problem
and describe the first integrated system for composing web services end to end, i.e., from specification to deployment. The
proposed solution is based on a novel two-staged composition approach that addresses the information modeling aspects of
web services, provides support for contextual information while composing services, employs efficient decoupling of functional
and non-functional requirements, and leads to improved scalability and failure handling. We also present Synthy, a proto-
type of the service composition system, and demonstrate its effectiveness with the help of an application scenario from the
telecom domain.
© 2005 Elsevier B.V. All rights reserved.
Keywords: Semantic web; Service composition; Application integration; Ontology; Planning; Quality of Service
1570-8268/$ – see front matter © 2005 Elsevier B.V. All rights reserved.
doi:10.1016/j.websem.2005.09.002
312 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
custom-developed value-added services that leverage web services as the underlying abstraction. Further, a
its telecom and IT infrastructure. Enterprise customers web service composition system can enable the end to
typically offer significantly higher margins than con- end automation of business-to-business and/or enter-
sumers, and are thus more attractive. Service providers prise application integration, from the stage of specifi-
therefore need tools and standards-based runtime plat- cation to its execution.
forms to quickly develop and deploy interesting appli- To this end, we find that two different approaches
cations for their clients. have been taken to standardize and compose web ser-
Much of this service/application development is cur- vices. The business world has adopted a distributed
rently done in an ad hoc manner, without standard systems approach in which web service instances are
frameworks or libraries, thus resulting in poor reuse described using WSDL,1 composed into flows with
of software assets and longer time-to-delivery. When a a language like BPEL2 and invoked with the SOAP
new service is needed, the desired capability is infor- protocol.3 Academia has propounded the AI approach
mally specified. An application developer must then of formally representing web service capabilities in
create this capability using component services avail- ontologies, and reasoning about their functional com-
able in-house or from known vendors. This process is position using goal-oriented inferencing techniques
essentially manual. For example, if a mobile service from planning [3]. These approaches by themselves are
provider wishes to offer a taxi-request service to its piecemeal, and insufficient. The former has focused on
users, the developer must pick a third-party taxi ser- the execution aspects of composite web services, with-
vice (with an advertised network interface) apart from out much consideration for requirements that drive the
in-house services like location tracking, accounting, development process. The latter approach has stressed
etc., and design a workflow that delivers the required on the feasibility of service composition based on
functionality. The dynamic nature of the environment semantic descriptions of service capabilities, but its
impacts the development process as well. This could be output cannot be directly handed off to a runtime envi-
attributed to the availability of new service providers, ronment for deployment.
new service capabilities or physical changes in the net- In this paper, we demonstrate how web service
work or environment—thereby necessitating a redesign composition can be leveraged for application integra-
of the flow, etc. tion, by combining the strengths of both the above
Web services have received much interest in indus- approaches. We first formulate the problem of end
try due to their potential in facilitating seamless to end web service composition—from specification
business-to-business or enterprise application integra- to deployment. Next, we present a methodology that,
tion [1,2]. Web services offer standardized interface given a formally specified requirement for a new ser-
description, discovery and messaging mechanisms. vice, stitches together web service components in a
Also, the programming tools and runtime environments BPEL flow that delivers the requirements. In doing
for web services have now matured. A component- so, we identify the key challenges involved in the
oriented software development approach where each process of end to end composition. One of the chal-
software is wrapped as a web service would offer sub- lenges stems from the information modeling aspect of
stantial benefits in the mobile service provider’s sce- web services, that should adhere to the best knowl-
nario. Mobile user applications often rely on several, edge engineering practices of conciseness, scalability
relatively simple building blocks—user profile look- and manageability. Next, the specification of an exe-
ups, address books, location tracking services, account- cutable composed service should comprise of both its
ing and billing services, etc. Many of these building control flow (dependence among activities) and data
blocks are already in place, but they are not easy to flow (dependence among data manipulations). While
reuse and integrate into new applications because they planning techniques can be used to generate the control
are not built using standardized frameworks or com-
ponent models. This leads to high development costs, 1http://www.w3.org/TR/wsdl.
and substantial time-to-market for new services. This 2http://www.ibm.com/developerworks/webservices/library/ws-
could be alleviated by building applications using the bpel/.
service-oriented architecture (SOA) paradigm, using 3 www.w3.org/TR/soap/.
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 313
time (and the developer has to know which compo- Further, the newly created location-based agent
nents exist, and how to connect them up). Instead, we selector (LAS) service itself becomes available as
provide a system that discovers the relevant services a component. It can now be reused in creating
from among the available ones, and creates the control other flows, such as the one in Fig. 1. Each new
flow between them. The available services are seman- service thus enriches the infrastructure and makes
tically annotated, providing meta-information about the developer’s task easier in future. We will use
their functionality in the context of a domain model. the LAS service as a running example to explain
The developer needs to formally specify the functional the phases in the composition process. Our service
and non-functional requirements of the service to be creation environment, however, includes a domain
created. The system can then generate a flow, and with model and ontology for the entire Helpline Automa-
some developer inputs, deploy the flow on to a runtime tion scenario, and we demonstrate the end to end
infrastructure. This should lead to quicker service cre- composition of the complete flow of Fig. 1 in
ation, and thus faster time-to-market for new services. Section 7.
3. Formalizing end to end service composition along with the specifications of a new service, create an
executable workflow that stitches together the desired
In this section, we characterize the end to end web functionality from the existing services, while satisfy-
service composition problem without actually present- ing the non-functional requirements.
ing methods to solve it. The solution is presented in the Note that workflow is a set of coordinated tasks.
subsequent sections. A workflow language like BPEL represents both exe-
Web service composition is the process of realizing cutable activities (like invoke) and structuring activ-
the requirements of a new web service (based on spec- ities (like flow, switch). We will also use the term
ifications) using the existing component web services. plan from the AI planning literature when refer-
The specifications for web service composition from an ring to automatically generated coordinated tasks. A
end-user can be decomposed into two parts. The first plan is a sequence of steps, where each step can
part deals with the desired functionality of the com- have concurrent actions. Hence, plan Pi = [Step1 ,
posite service, called the functional requirements. The Step2 , . . . , StepNUMSTEPS(Pi ) ], where Stepk ⊆ S and
second part involves specification of the non-functional NUMSTEPS(Pi ) returns the number of steps in Pi . We
requirements that relate to issues like performance and will use |Pi | to refer to the number of actions in the
availability. The input to an end to end web service plan Pi . Each action can be viewed as a software com-
composition problem is a composite service specifica- ponent with a set of input and output parameters. Since
tion in an appropriate language, e.g. OWL expression a plan can be represented as a workflow, we use the
for functional requirements, Quality of Service (QoS) terms plan and workflow interchangeably in the rest of
specification for non-functional requirements. We do the discussion.4
not restrict the input to any one language, but assume
that the specification is done in a manner that would 3.1. Staged approach for end to end service
make the subsequent composition feasible. composition
We differentiate between web service types, which
are groupings of similar (in terms of functionality) To solve the end to end service composition prob-
web services, and the actual web service instances that lem, we propose a principled two-stage composition
can be invoked. We believe that the separate represen- approach. The staged approach is designed keeping in
tation of web service type definitions from instance mind the best knowledge engineering practices of mod-
definitions helps in handling different requirements, ularity, conciseness and scalability, while providing the
and different means to optimize them. This, in turn, service developer a fair amount of control to supervise
allows us to work efficiently with large collection of the composition process. Fig. 3 gives an illustration of
web services. The web service types and instances can this staged approach.
be advertised in a registry. As mentioned earlier, this approach distinguishes
Formally, we denote, between service types and instances. The composi-
tion first proceeds to generate an abstract plan based
(1) S = {S1 , . . ., Sα }: set of α web service types. on web service types (logical composition), which is
(2) I = {I1 , . . ., Iβ }: set of β service instances adver- subsequently concretized into an executable plan by
tised in a registry like UDDI. The mapping of S into selecting the appropriate web service instances (phys-
I is surjective and one-to-many. Assuming each ical composition).
service type Sk has M instantiations, β = M × α. The two key elements of the approach are:
When we want to refer to an instance of a partic-
(1) P = {P1 , . . ., PK }: a set of K abstract plans selected
ular service type Sk , for convenience, we will also
after logical composition. Note that an abstract
use Sinstance :Stype without the subscript or instance
notation.
4 Even though there are no explicit structuring actions in the plan
product of the number of output parameters in the (4) Composite service representation: Representing
predecessor step and the number of inputs in the the new composite service and its capabilities so
successor step, aggregated over all the steps, is an that it can be programmatically deployed, discov-
estimate of the disruption that can be potentially ered and invoked.
caused to the developer.
In a way, the proposed system takes an end to end
Intuitively, ∆C is a measure of the number of actions view that synergistically combines the AI approach
in the new plan that were not present in the previous and the distributed programming approach currently
plan. ∆I is a measure of the amount of developer’s effort adopted by academia and the industry, respectively. It
required (from the point of view of software synthesis), drives the composition process right from specifica-
to match the input–output parameters between the steps tion of the business process, through creation of desired
of a particular plan. functionality using planning techniques, through gen-
One may extend the definition of RAW to include eration of a deployable workflow by selection and bind-
a factor about how well an abstract plan meets the ing of appropriate service instances, to finally deploy-
given specification, thereby allowing partially gener- ing and running the composite service. This integrated
ated plans to be passed from one stage to another. solution achieves the best of both worlds and provides
Finally, in the case where the composition process is scalability to the composition process. We have built a
fully automated, there is no intervention from the devel- service creation environment that realizes this approach
oper, and hence ∆AW = 0. in terms of the following two modules:
QoS∗
Function 2. REW (Wi ) = f2 (Wi ) → . The rank- (1) Logical Composer: This module provides func-
ing function is defined over the estimated QoS, with tional composition of service types to create new
respect to an executable workflow Wi . functionality that is currently not available.
(2) Physical Composer: This module enables the
REW is used to rank among a set of executable work- selection of component service instances based
flows. Quality of Service is the most common basis on non-functional (e.g. QoS) requirements, that
to differentiate among workflows. Here, QoS* implies would then be bound together for deploying the
that the measures are obtained from the execution envi- newly created composite service.
ronment and aggregated over periodic intervals. Note
that there are different QoS metrics that could be of This basic approach of service creation is illus-
possible interest for end to end composition (e.g. cost, trated in Fig. 4. A service registry contains information
availability) and we later discuss how to incorporate
some of these in our solution.
We next describe an end to end service composition
system that realizes the staged approach.
4. System overview
about services available in-house as well as with partic- paper, we will focus on the logical and physical com-
ipating third-party providers. The capabilities of each position stages.
available service type are described formally, using
domain-specific terminology that is defined in a domain
ontology. When a new service needs to be created, 5. Logical composition
the developer provides a service specification to the
Logical Composer module. Driven by the specified Fig. 5 depicts our system for realizing the logical
requirements, the Logical Composer uses generative composition stage. Available service types and their
planning-based automated reasoning techniques to cre- capabilities are represented in a service capabilities reg-
ate a composition of the available service types. Its goal istry. An ontology captures the domain model. We use
is to explore qualitatively different choices and produce IBM’s SNOBASE7 as the management system for our
an abstract workflow, i.e. a plan (assuming a feasible ontology and the service capabilities registry. Speci-
plan exists) that meets the specified requirements. fication of the desired service is supplied to a Logical
In order to turn the abstract plan into an executable Composer module that first gets it verified for syntactic
workflow that can be deployed and executed, specific correctness using a Validator module. The Matchmaker
instances must be chosen for the component service module allows querying the service registry for avail-
types in the plan. The Physical Composer uses opti- able services. Based upon the validated specification,
mization techniques in selecting the best web service Planner4J retrieves the set of candidate service types
instances to produce an executable workflow. The focus using the Matchmaker. The filter module helps in prun-
is now on quantitatively exploring the available web ing the set of candidate services before Planner4J uses
service instances for workflow execution. It queries the planning techniques to create the composite service.
registry for deployed web service instances and per- We next discuss the issues that arise in each step of
forms end to end QoS optimization to accomplish this logical composition.
task.
The workflow generated by the service creation 5.1. Representation of service types
environment must then be deployed onto a runtime
infrastructure, and executed in an efficient and scalable To enable automatic discovery and composition of
manner. This is especially important in environments desired functionality, we need a language to describe
like that of a mobile service provider, where the number the available web services. At the logical composition
of end-users is likely to be very high. The state of the stage, the composition process typically involves rea-
art is to execute the workflow using a workflow engine soning procedures. To enable those, services need to
such as WebSphere Process Choreographer,6 with data be described in a high-level and abstract manner [6].
flowing back and forth from this engine to the compo- Therefore, at this stage it suffices to describe the capa-
nent web services. Our execution environment instead bilities of the types of web services, using semantic
orchestrates the workflow in a decentralized fashion, annotations. The second level of description becomes
with partitions of the flow executing concurrently, in important in the physical composition stage where
network-proximity with the component services they individual running services need to be identified for
invoke. These flow partitions are generated automat- deploying the workflow. Once the language is known,
ically by a Decentralizer tool, using static analysis the basic terms used in the language have to be drawn
of the input BPEL flow. The communication among from a formal domain model. This is required to allow
these partitions is designed to minimize network usage, machine-based interpretation while at the same time
while retaining the original flow semantics. This, in preventing ambiguities and interoperability problems.
conjunction with the added concurrency, results in bet- The DARPA Agent Markup Language (DAML, now
ter scalability and performance. For more details on called OWL)8 is the result of an ongoing effort to define
our execution environment please refer to [4,5]. In this a language that allows creation of domain models or
7 http://www.alphaworks.ibm.com/tech/snobase.
6 http://www.software.ibm.com/wsdd/zones/was/wpc.html. 8 http://www.daml.org.
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 319
concept ontologies. We use it to create the domain instances. This helps in working with large collec-
model using which services are described. The OWL-S tions of web services—categorizing them, supporting
markup language [7] (previously known as DAML-S) multiple views, etc. [6]. In our present solution pro-
is also being defined as a part of the same effort, for totype, we use the ServiceProfile model of OWL-S to
facilitating the creation of web service ontologies. It represent web service type definitions. The task of pro-
specifies an upper ontology of services that defines viding descriptions for specific web service instances
the structure of a service description. It defines that is deferred to the physical composition phase.
a service presents a ServiceProfile (i.e. what the ser- We propose to separate the representation of web
vice does), is described by a ServiceModel (i.e. how service type definitions from instance definitions. This
it works) and supports a ServiceGrounding (i.e. how means that the OWL-S upper ontology needs enhance-
to access it). Each instance of service refers to 0 or ments to have a ServiceType class hierarchy in addition
more profiles, and 0 or 1 models. In addition, if there to the service hierarchy (see Fig. 6). The ServicePro-
is a model, it must be accompanied by one or more file model of the current OWL-S Service hierarchy
groundings. Currently, ProcessModel is the only type is essentially a type definition and can be moved to
of ServiceModel being defined for OWL-S. the ServiceType hierarchy. The ServiceProfile of an
OWL-S is designed to describe a single web ser- instance will now point to the corresponding Servi-
vice instance [7]. This is easily observed since the ceProfileType for mandatory portion common to all
ServiceModel and ServiceGrounding aspects are spe- instances. It could, however, add its own precondition
cific to an instance of a web service. However, we and effects as discussed later in this section. Similarly,
believe that the type of a web service needs to it may support additional outputs as well as inputs, in
be described independent of individual web service which case it specifies the default values of additional
inputs so that the compositions done using ServicePro- ces. A web service type captures the core functionality
fileType remain valid. of a class of web services. Individual instances belong-
ServiceGrounding is a concept that applies to ing to that class of services must adhere to the basic type
instances rather than types and can stay as it is. A Ser- definition but may be allowed to offer minor variations
viceModel should ideally be encapsulated inside the under some constraints. An important desiderata is that
service interface and not exposed to the external world. any composition which is produced with the web ser-
Making the model visible outside the service is useful vice type should be still valid when any of its web ser-
only if it describes the conversational aspect of the web vice instance is selected. This is ensured if the precon-
service that would be needed to interoperate with it. dition of a web service type is more specific than pre-
Hence, in this case, it should be included in the Service- condition of some (or more strictly, all) of its instances
Type hierarchy since a common conversation model and its effect is more general than effect of any of its
should be applicable to all instances of a service type. In instances. We can summarize the relationship as:
other words, we propose to have an ontology for service
types that consists of ServiceProfileType and Service- If Sinstance is of Stype ,
type
ModelType. This would be in addition to an ontology 1. Sprecondition Sprecondition
instance ;
for service instances that consists of a ServiceProfile type
2. Seffect Seffect
instance .
and a ServiceGrounding.
The approach of separating type definitions from The above relationship states that the precondition
instance definitions has been used successfully in data of the service type entails the precondition of the ser-
models for distributed systems management [8,9], and vice instance so that the latter is satisfied whenever
has various modeling benefits. A new kind of service the former is. For effects, the reverse is true. With
can be specified in the ontology by adding an object this, given a web service request R, when the request
of type ServiceType, without having to create an actual matches a service type (R Stype ), the relationship
running instance first. This is not possible in the current between R and the web service instances would be:
OWL-S ontology. Creating an object of ServiceType
1. ;
2. .
According to it, if a request R matches a web ser-
would include defining the parameters in its profile by vice type, where matching can be exact or defined over a
populating the ServiceProfileType model, and describ- range as in [10], all the instances of the web service type
ing the conversation model by populating the Service- will also match. While this relationship would guaran-
ModelType model. Each actual running instance of tee that compositions are valid when the abstract plan
this web service would be represented by an object of is concretized, it can be overly restrictive because the
type service and include a reference to its ServiceType precondition of the web service type is required to be
object. Its ServiceProfile model would contain the ser- more specific than all its instances. We will call this as
vice parameters including at least the ones listed in the the strict relation. To relax the restriction, we use the
corresponding ServiceProfileType. Finally, there would insight that eventually each web service type referred
be an instance-specific ServiceGrounding defined. in the abstract plan will be instantiated by only one
web service instance. Therefore, as long as we could
5.1.1. Classifying types and instances guarantee that if a request R matches a web service
Our proposal raises the question of what kind of rela- type, some but at least one instance of the web service
tionship a web service type has with its various instan- type will also match, the abstract will be successfully
concretized and the composition will succeed. That is,
1. ;
2. ;
3. instance-i = instance-j.
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 321
The decision of whether to follow the strict or FCs from the ServiceProfileType and adds the NFCs
relaxed relationship during domain modeling is one of to it.
balancing tradeoffs. With the former, the abstract plans In some domains, it may be desirable to model cer-
can be automatically concretized because all its service tain service features as mandatory for all instances
instances are guaranteed to preserve composition. With of a service type. In military applications, for exam-
the latter, a service type has to only be more specific ple, it may be necessary to make all service instances
than at least one of its instances and this would simplify secure. For such domains, it seems logical to model
building of the services ontology (e.g. more instances NFCs such as security in the service type itself. These
for a type). During the concretization of abstract plan, non-functional capabilities now form a part of the core
all instances might need to be explored for say, opti- functionality. They are included in ServiceProfileTypes
mality. In this case, additional constraints will have and are utilized in selecting service types during the
to be checked for instances whose preconditions are logical composition phase.
more specific than that of their type. Checking these In our system, the instance-specific NFCs are stored
additional constraints may require the intervention of using the Web Services Matchmaking Engine [12] as
a developer. discussed in Section 6. NFCs at the service type level
We adopt the relaxed relation above as the guide- can be added using OWL-S.
line for our domain modeling. In the absence of the
model differentiating service types from instances in 5.2. Requirements specification
OWL-S, we use ServiceProfile model to represent web
service type definitions in our service composition sys- In order to create a new service, the developer should
tem [11]. The task of providing descriptions for specific describe the required functionality as well as non-
web service instances is done using the Web Services functional requirements such as availability, response
Matchmaking Engine (WSME) [12] as discussed in time, cost, etc. We use OWL-S for representing the
Section 6. functional requirements (in IOPE terms) of the com-
posite service. The developer is presented with a graph-
5.1.2. Modeling non-functional service ical user interface to specify these requirements. The
capabilities system maps these to OWL-S for internal processing.
The functional capability (FC) of a web service In keeping with our philosophy of qualitatively com-
describes its core functionality. It is expressed through posing the plan before focusing on the quantitative
IOPEs that capture the transformation performed by optimization issues, the system processes the require-
this service. The non-functional capabilities (NFCs), ments incrementally. The preconditions and effects are
on the other hand, help in characterizing the service logical terms and expressions, and are used during plan-
further by capturing its optional features, such as QoS, ning in logical composition.9 The inputs and outputs
etc. OWL-S has provision to represent NFCs through are expressions involving general data types (e.g. inte-
profile attributes which may contain parameters other gers, strings, algebraic expressions) which are used
than the functional IOPEs. during instance selection and flow concretization in
Since NFCs inherently capture properties of ser- the physical composition phase. It is possible to incor-
vice instances (and not of types), they are not needed porate numeric inputs and outputs during planning as
during functional composition. In contrast, FCs form well—this approach to planning is called metric plan-
the core of the functional composition process. NFCs ning [14]. Exploring the feasibility of metric planning
play an important role during selection of appropri- for end to end web service composition would be an
ate service instances in order to meet the end-user interesting area for future work.
requirements. The current OWL-S only deals with ser- For the LAS composite service, the precondition (or
vice instances and therefore all the functional as well the initial state of the composition problem) asserts that
as non-functional attributes are in the ServiceProfile.
In our proposed OWL-S upper ontology (presented 9 Services can be matched using arbitrary expressions as defined
in Fig. 6), the FCs get represented in ServiceProfile- with OWL-S 1.1 but for planning, we use a state representation con-
Type. The ServiceProfile of an instance inherits these sistent with the STRIPS assumptions [13].
322 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
CustomerLocation is known and the effect (or the For the unimportant or unlikely ones, the user may
goal state) is to find the agent (Agent ID) nearest to manually insert a default branch.
the customer location. For such a situation, we have developed a novel
user-driven search-control methodology which takes
5.3. Composition through planning input from user and then uses them to efficiently
focus the search. These inputs are: conditions of
AI planning deals with finding a course of actions interest, the type of plan desired and the number
that can take an agent from the initial state to a goal of conditions to handle. Our approach employs user
state, given a set of actions (legal state transformation inputs on the AND–OR graph of CP’s belief states to
functions) in the domain. Formally, a planning problem prune space in the AND part of the graph and addi-
[13] P is a 3-tuple ≺I, G, A
, where I is the complete tionally uses the well-known planning-graph (PG)
description of the initial state, G the partial description based heuristics to do the same in the OR part. The
of the goal state and A is the set of executable (primi- approach efficiently finds contingent plans focusing
tive) actions.10 A state T is simply a collection of facts on user interest. This is complementary to recent
with the semantics that information corresponding to utility-based methods for contingency selection. We
the predicates in the state holds (is true). An action Ai have implemented such a contingent planner in the
is applicable in a state T if its precondition is satisfied Planner4J framework [17] and its details can be
in T and the resulting state T is obtained by incorporat- found in [18].
ing the effects of Ai . An action sequence S (a plan) is a • Since the number of service types can be large, fil-
solution to P if S can be executed from I and the result- tering is needed to remove irrelevant web services.
ing state of the world contains G.11 A planner finds Given a goal specification, the filter finds services
plans by evaluating actions and searching in the space of potential relevance to the goal without actually
of possible world states or the space of partial plans. searching for the solution. Relevant services are
While planning is known to be a hard problem from var- those that can either contribute to the goals (at least
ious computational complexity studies [15,16], it can one effect unifies with a goal) or to the preconditions
be very efficiently solved in practice. Logical composi- of any service which can potentially contribute to the
tion of web services can be cast as a planning problem goal.
by using the description of web services as actions, and • Our Matchmaker [19] matches the preconditions of
forming initial and goal states from the specification of a web service with the effects of another up front
the service to be built along with the domain model [3]. during filtering. This is in contrast to typical match-
For our service creation system, planning for web making of web services where the preconditions
services has some unique characteristics (refer to and effects of the request are matched, respectively,
Fig. 5): with the same fields of the advertisements [10]. We
• The nature of planning is limited contingency plan- also envisage the matchmaking to happen up front
ning (CP). The value of all logical terms may not before planning. Another approach can be to perform
be known in the initial state (e.g. whether agent matchmaking as needed during planning [20]. This
needs to be desk-based or in the field) but they can can support more expressive matching (e.g. involv-
be found at runtime using sensing actions. Plans of ing expressions of initially unknown terms that are
contingent planning problems have branches corre- evaluated at runtime) but at the cost of slower per-
sponding to different outcomes that sensing actions formance due to frequent reference to the ontology
may find. However, the user may not be interested in unifier.
all branches – which are exponential in the number • We can provide partially complete plans on request.
of unknown terms – but only in specific branches. If no complete sequence of actions is possible from
the available services for a given requirement, plan-
10 A more restricted planning definition calls for G to be completely
ning can still help the user scope down the compo-
specified so that the generated plan has no unspecified side-effects.
sition request or point to missing capabilities in the
11 A plan can contain none, one or more than one instance of an ontology. But this raises the question about which
action Ai in A. incomplete plans should be returned from the large
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 323
set of possible plan fragments. The planner sorts a contingent problem with 100 sensing actions (2100
the search space of non-solutions based on a heuris- possible branches), the planner takes 90% less time
tic distance to goal. The plan with the lowest such by leveraging this information rather than exploring
distance gives us a candidate plan for further devel- the whole search space and gives the plan(s) in mil-
opment and is returned. This planner feature is espe- liseconds. And without any user input about branch
cially valuable when the ontology development has preferences, the planner is still comparable with exist-
not stabilized. ing contingent planners. We believe that these results
will carry over to the current web service domain as
5.3.1. Scalability and performance well.
With the listed features, planning is scalable, effi- In Fig. 7, the planner was invoked for the LAS
cient and user friendly. We have reported empirical service. Recall that the initial state asserts that Cus-
analysis of the planner in standard planning domains tomerLocation is known and the goal is to find the
in [18] and only illustrate some results here. All results agent (Agent ID) nearest to the customer location.
were taken on a IBM ThinkPad which has 1.6 GHz The output of the Logical Composer is a four-step plan
Pentium 4 CPU and 512 MB of RAM running Red that can accomplish the goal. The created service is
Hat Linux V9 on it. On a contingent problem having added to the service capabilities registry by the user.
a seven-step plan, with the filter enabled, the planner
can return a solution in 4 s when 100,000 irrelevant ser- 5.4. The abstract workflow
vice types/actions are present, whereas it takes an hour
without the filter. If the user chooses specific branches, The planner generates plan which can have
the planner can leverage it for better performance—in sequence, choice and concurrency among actions. In
an experiment where three branches were specified on future, we will explore generating plans with loops.
The plan representation is a sequence of steps, where resolved in an automated manner, others might require
each step may have concurrent actions (recall the dis- manual intervention from a developer supervising the
cussion in Section 3). Each action corresponds to a composition process.
web service type in our case. Since plans can have The physical composition stage proceeds in steps,
branches which are contingent on specific conditions illustrated in Fig. 8. The first step deals with repre-
(called branch context) being met, actions are labeled sentation of the available service instances as well as
with their context. The default context for an uncondi- the non-functional requirements associated with the
tional action is true, always valid. composite service. Next, a set of matching instances
The plan is translated to the workflow representa- is selected by the Matchmaker for each service type
tion of BPEL, a language for expressing interactions in the abstract workflow. This step also filters out the
and message exchanges between partner entities. Note instances based on local non-functional requirements.
that a BPEL specification can be abstract or executable Next, the Instance Selector picks exactly one instance
depending on whether binding information has been from the set of matching instances for each service
excluded or included. type. The instance selection process takes into account
We render the generated plan as an abstract BPEL global optimization criteria (e.g. QoS) as well as end
workflow since web service instance information is to end constraints that are specified as part of the
not known at this stage of the composition process. non-functional requirements. We elaborate on these
The actions in the plan are mapped to corresponding optimization criteria and local/end to end constraints
invoke activities in BPEL and organized into branches later in the section. Finally, we deal with the issues of
by inserting appropriate switch and case activities. data flow orchestration and data type matching in order
to generate an executable workflow. We now describe
each of the above steps in greater detail.
6. Physical composition
6.1. Representation of service instances and
The Physical Composer views the abstract work- requirements
flow as a template [21] for the composite service,
which in conjunction with the non-functional require- As in logical composition, we require a representa-
ment specifications, drives the process of matching tion for service instances and requirements to facil-
each service type to a corresponding service instance. itate physical composition. It has been established
Note that this is a non-trivial problem and involves a that directory services, such as UDDI, are impor-
number of issues related to QoS optimization, satis- tant but insufficient for this purpose [12]. Specifically,
fying non-functional requirements (constraints), data one needs to add matchmaking facilities like sym-
flow orchestration, data type matching and invocation metry of information exchange between services and
protocol matching. While some of these issues can be their consumers, the ability of each party to describe
requirements from the other party, a rich language record-type expected to be submitted by the consumer
to describe services and consumer demands and a query. (3) Properties—a list of the properties defined
methodology to choose efficiently among competing as MyType. Some of those properties may be defined
service instances. as dynamic properties by the provider evaluated at run-
To this end, we use the Web Services Matchmaking time. (4) Rules (optional)—what the provider requires
Engine [12]—an engine capable of matching complex from the consumer.
entities, and a Data Dictionary tool for defining the We illustrate the Data Dictionary definitions used for
language for the matching process. Matching is per- composing the Helpline service in Fig. 9. Each service
formed between a set of advertised service instances instance needs to advertise itself to the WSME service
and requirements specified by the consumer. In this instance registry using the advertisement definition.
case, the requirements come from the abstract work- Each advertisement record contains basic information
flow (i.e. types that need to be concretized) and addi- like the service name, service type, method name and
tional matching criteria (i.e. non-functional constraints WSDL information, along with QoS-specific metrics
like QoS) that are specified by the developer perform- like (expected) response time, availability and cost of
ing the service composition. invoking the particular instance. Each query record
The engine is deployed as a web service that specifies the method name and service type that needs
receives queries and advertisements from the two par- to be bound to an instance along with additional rules
ties involved in matchmaking. Each party essentially that are specified by the developer supervising the com-
submits a description of itself and the demands from position process.
the other party. The advertisement for a service is Non-functional requirements like QoS constraints
submitted by the provider to WSME and is persis- from the developer are specified in a flat file. These
tent, remaining in WSME until it is explicitly with- constraints can be end to end, for example, the compos-
drawn by the provider or until the application server ite LAS service should have availability more than 0.8,
is stopped. The advertisement contains the following cost should be less than US$ 375, response time should
information: (1) MyType—this specifies the adver- be less than 2 min, etc. Such requirements can also
tisement record-type. (2) YourType—this specifies the be on a component basis—LocationTracker service in
LAS should have cost less than US$ 100. As discussed the function of Matchmaker is to match and return the
previously, our model is agnostic to the particular lan- instances corresponding to each service type given by
guage in which the requirements are specified. We are the abstract workflow. In addition, this component fil-
exploring the use of sophisticated QoS specification ters the instances matched based on the requirements
languages like WSLA12 in the future for this purpose. imposed at the service type level. These requirements
will be specified by the user based on his domain knowl-
6.2. Matchmaking edge and expectations. Consider our LAS example—if
the requirement for LocationTracker is to cost less than
The WSME rules allow both sides to select the other US$ 100, we can specify my.MaxCost as US$ 100
party they wish to deal with by specifying their eli- for this service type and use it to query WSME for
gibility. A rule is a WSME script that is evaluated at matching instances. The result would be all instances
matchmaking time, resulting in a Boolean value. A rule of LocationTracker having cost less than US$ 100.
can refer to the properties of the two parties whose Other techniques, such as those proposed by [22,23],
advertisement and query are involved in the match- can also be used alternatively to tackle the problem of
making process. Example of a possible consumer rule instance selection for a service type based on the local
is the following: return(my.MaxCost ≥ your.cost). A optimization criteria. It is important to note, however,
problem arises if a rule refers to a property that was not that this process matches individual instances, but does
supplied. To avoid such a situation, the WSME Type not take into account the end to end QoS requirements
system defines the mandatory list of properties that a of the composite service. For example, the requirement
submission must provide; the Data Dictionary contains for the composite LAS service could be to have a total
those definitions. cost of less than US$ 375. In order to achieve end to end
A query is sent from the consumer to WSME and QoS satisfaction, we need to select the individual ser-
is transient, terminating after initiating the matchmak- vice instances for each action in the workflow in such a
ing process and bringing it to its conclusion. The query manner that the aggregate non-functional capabilities
contains the following information: (1) MyType—this of the instances selected satisfy the composite service
specifies the query record-type. (2) YourType—this requirement. We discuss our approach to this problem
specifies the provider’s advertisement record-type that in the next section.
the query is looking for. (3) Properties—a list of the
properties defined as MyType. (4) Rules—what the 6.3. Satisfying end to end QoS requirements
consumer requires from the provider. The descriptions
and demands can be dynamically created, deleted and The Instance Selector gets an abstract plan (a DAG
modified in the form of properties and rules, respec- of service types) from the Logical Composer, an opti-
tively, using a Data Dictionary tool. mization criterion specified by the user, and a set of
The WSME matchmaking process is a two-way or instances from the Matchmaker for each service type
symmetric process—it brings together matching adver- in the abstract plan. It then selects an instance for each
tisements and queries by applying the rules of each service type based on the specified optimization crite-
party to the description of the other, thus allowing both ria. Our solution framework is based on the fact that the
parties to ‘select’ each other. A matching advertisement end to end QoS of the composite service is determined
is called an offer. If more than one offer is available, by the individual QoS metrics of its component ser-
they are collected together. Zero, one or more match- vices. It is built on the multi-dimensional QoS model
ing offers are sent to the consumer. For further details and the mathematical formulation discussed in [24,25].
on the matchmaking process, the interested reader is We give only a brief summary of the model and the for-
referred to [12]. mulation in this section. Interested readers should refer
In our case, we would like to know all the instances to the original papers for more details.
available to us for each action in the abstract work- We consider only cost (C, the fee that a service
flow. Given a set of instances in the service registry, requester has to pay for invoking an operation on the
service), response time (R, the expected delay between
12 http://www.research.ibm.com/wsla. the moment when a request is sent and the moment
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 327
max
QR − Q R ,
when the results are received) and availability (A, the
probability that the service is accessible) in the QoS if Qmax
R − QR = 0
min
VR = QmaxR − QR
min
(2)
model. We feel that these three are the most generic
1, if Qmax
R − Qmin
R =0
and most frequently used parameters in service selec-
QA − (Q )min
A
, if (Q )max min
A − (Q )A = 0
VA = (Q )max min
A − (Q )A (3)
1, if (Q )max
A − (Q )min
A =0
where
tion by users. However, the model is generic to capture
any number of QoS dimensions. QA = ln QA
The basic idea is to optimize a normalized func- Qmax and Qmin
C C are the maximal and minimal val-
tion that captures the end to end values of each of the ues of QC (aggregated value of cost for an executable
QoS dimensions according to some relative weights. plan). Similar terms are defined for response time and
We use the Simple Additive Weighting (SAW) tech- availability. The maximal and minimal values can be
nique [26] to obtain the normalized objective function computed without iterating over all the executable
based on the aggregated values of the quality dimen- plans. For example, in order to compute Qmax C , we
sions. The relative weights are provided by the user and can select the most expensive instance for each ser-
reflect the importance of each of the quality dimension vice type and sum up all the execution costs.
with respect to the other. The QoS values for each of Since the aggregation function for availability is
the service instance are obtained from the Data Dictio- not a linear function, we linearize it using a logarithm
nary tool (refer Fig. 9) in WSME. These can also be function. Faulty instances with availability of 0 are
obtained from a monitoring infrastructure and com- filtered out before applying the aggregation functions.
puted using the QoS estimation formulae presented We now summarize the IP formulation of the problem
in [22]. in the following section.
The aggregation functions for QoS dimensions are Objective function:
defined for an executable plan, where an executable
plan represents one particular execution of the com- Maximize : WC × VC + WR × VR + WA × VA (4)
posite service. An executable plan is derived from an
abstract plan by grounding each service type to an WC , WR , WA ∈ [0, 1] and j Wj = 1. Wj represents
instance. Simple summation is used to compute aggre- the weight of the QoS dimension j.
gate end to end value of cost, QC , for one particular Constraints:
executable plan of the composite service. Similarly, (1) Task assignment—The abstract plan contains a
multiplication is used for availability (QA ) and summa- set of types T. For each service type j, in T, we can
tion over critical path is used for response time (QR ). select a service instance from the set of instances
Other aggregation techniques like the ones defined in Sj that can be assigned to it. Let yji be an integer
[22] can also be used here. variable, such that yji is 1 if service i is selected
Having defined the aggregation functions we now for task j, 0 otherwise. Given that yji denotes the
proceed to compute the normalized values for the QoS selection of instance i for type j the following
dimensions. constraints must be satisfied:
Normalization: yji = 1, ∀i ∈ Sj (5)
Let j∈T
max
QC − QC ,
(2) Processing time—Let Rji denotes the response
if Qmax
C − QC = 0
min
time of instance i when assigned to task j, and
VC = Qmax C − QC
min
(1)
1, wj denotes the expected duration of task j know-
if Qmax
C − QC = 0
min
ing which instance was assigned to it. Then, we
328 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
have the following constraint: Solving Eq. (4) subject to constraints (5)–(12) sug-
gests the need for an IP solver. It can be shown that the
Rji × yji = wj , ∀j ∈ T (6) solution of these equations will always result in an inte-
i ∈ Sj gral optimal solution [24]. Interesting extensions of the
above problem occur when we add practical user con-
(3) Task precedence—Let xk denote the expected
straints like budget, availability, total response time,
start time of task k. Also, let j → k denote that
etc. These can be easily incorporated into the formu-
task j is predecessor of task k. Then, we have the
lation by adding a constraint for each. For budget and
following constraint:
response time and availability these will be as follows:
xk ≥ wj + xj , ∀j → k, j, k ∈ T (7)
Budget : QC ≤ TC (13)
(4) Make span—For all tasks j, the end to end
response time of the composite web service must Response time : QR ≤ TR (14)
be greater than or equal to the sum of start time
of task j and the expected duration of task j. Availability : QA ≥ TA (15)
13 http://www.ilog.com/products/cplex/. 14 http://www.eclipse.org/emf.
330 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
flow between component services is handled properly. IO parameters of component web services. One option
In the following few subsections, we discuss this issue is to introduce specific terms in the domain ontology,
in more detail and present pragmatic solutions for gen- one term for each possible concept and each valid con-
eration of data flow. text. However, this makes the ontology large and brittle.
This consequence is well understood in knowledge
6.4.1. Problem of data flow construction engineering [28] and that is the reason very specific
When we seek to operationalize composed plans, terms are not recommended in an ontology.
we are in fact generating programs. A program con- In programming languages, the issue of data flow is
tains the specification of both its control flow (the resolved by specifying an ordering among the param-
dependence among activities) and the data flow (the eters of a function or procedure. A human developer
dependence among data manipulations). One of the could then look at the language specification and spec-
main differences between knowledge engineering and ify the parameters accordingly. However, in the web
programming, as described in [28],15 is that while logic service composition scenario, software programs can-
sentences in the former tend to be self-contained, the not automatically derive and interpret semantics of all
statements in a program depend heavily on surrounding parameters just from the available ordering. The con-
context. Planning techniques can be used to easily gen- text for the inputs and outputs need to be made explicit.
erate the control flow for the composite service given The semantics of each input/output parameter can be
the precondition and effect information for available expressed along two dimensions. The first one specifies
service types, but generating the complete data flow the meaning of the parameter as intended by the service
needs reasoning with contexts of inputs and outputs. designer. For instance, the designer of Distance Cal-
For the full composition, data flow has to be pro- culator Service could designate one LocationList
duced between dependent services to make the plan parameter as the Customer addresses and the other one
executable. as the locations of Agents. The second dimension is dic-
In Fig. 2, the LAS service accepts two sets of tated by the composition of which this service becomes
locations—one of these sets is that of the customer a component. If in a composition, the input parameter
and the other corresponds to the list of agent locations. Name to a directory service is assigned the label Cus-
Even if the distinction of semantics of these two sets is tomer, the output Location should be assigned the
not necessary for generating the control flow, it could same label.
be important for the data flow. Specifically, they can
have different meanings and different data (message) 6.4.2. Context resolution using roles
types. In the LAS scenario, to determine the relation We seek to solve the problem of context resolution
between input/output of component services, we must by explicitly encoding the context for inputs and out-
figure out things such as the following: puts using the notion of roles. A role is a term that
qualifies a concept. That is, for any concept ϕ, (ψϕ)
(1) Customer locations (obtained from Prob- specifies that the role played by ϕ is ψ. Roles are option-
lemTicket) go directly to the DistanceCalcu- ally specified on the input and output parameters by the
lator service. service developer. They come from a separate ontology,
(2) Distinguish the semantics of the two sets of loca- and are structured and standardized in a domain simi-
tions coming as input to the DistanceCalculator lar to concepts. Fig. 12 shows a sample role ontology
service. for roles that could be played, like transfer and exper-
(3) Distinguish the semantics of the locations coming tise roles. Depending on need, a parameter can have
from the customer as corresponding to her home either one, multiple or no specific roles. In Fig. 2, the
or office address. user assigns the roles of customer and agents to the two
To operationalize the workflow of the composite ser- input addresses for the DistanceCalculator service.
vice, we need support for incorporating context with the In [29], the authors give an extensive coverage of
how context is handled in knowledge representation
in AI. Their solution is to explicitly model context as
15 Chapter 8, p. 222. a resource and they introduce terms to specify lifting
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 331
passed between the stages, we need to have a mecha- posite service. The planner can also give a partial plan
nism to rank the workflows that are generated at these that is closest to the goal state (specification). This helps
stages. With a ranked list of workflows in place, the the developer in visualizing what can be composed with
composition system proceeds with the highest ranked existing services and what are the missing functionali-
workflow and in the case of a failure switches to the ties that need to be developed. Also, the Logical Com-
next workflow in the list, and so on. As discussed ear- poser can generate multiple abstract plans if they exist
lier, we can define ranking functions RAW and REW over and feed it to the Physical Composer. This is helpful in
the set of abstract and executable workflows, respec- case an abstract plan could not get concretized due to
tively. In the current system, we use the length of the failures in the physical composition stage. In this case,
abstract plan, i.e. the number of actions in the plan, the Physical Composer chooses a different plan without
as the function RAW . Similarly, in the physical com- going through the logical composition stage again.
position stage, we use the quality of the binding (as During physical composition two kinds of failures
discussed in Section 6) as the function REW . At the time, can occur—a binding may not exist for a given service
we are extending the ranking functions to incorporate type in the abstract workflow or the QoS requirements
other factors like comprehension, developer interven- specified may not be satisfied. If a binding does not
tion and additional QoS metrics. exist for a service type in the abstract plan, then the
During logical composition different kinds of fail- Physical Composer can try using a different plan that
ures may occur. The planner may not be able to find any (possibly) does not use the particular service type. If
plan which can satisfy the specification of the compos- no such plan exists, the Composer uses the interven-
ite service. In this case, an exception is generated for the tion of the developer to go back to the logical stage
developer indicating that the current set of services in and regenerate an abstract plan, without using that ser-
the repository is insufficient to create the specified com- vice type. Similarly, in case the QoS requirements are
334 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
not satisfied, the developer could be required to relax end composition approach more scalable because the
some of the QoS constraints that could not be satisfied. first stage has to deal only with service types and the
Finally, the Physical Composer can generate multiple second stage has to deal with instances of only those
executable workflows (ranked based on QoS metrics) types selected in the first stage. In the logical compo-
and feed it to the runtime engine. This can be helpful in sition stage we use a filter to prune the set of candi-
scenarios where a workflow could not get executed due date services before actually composing the abstract
to runtime failures. In this case, another BPEL flow can workflow. This helps in reducing the complexity of
be deployed without going through the Physical Com- the search process. Further, the planner that we use
poser. is also scalable and efficient as discussed in Section
Not much research has happened on dealing with 5. Moreover, the IP solver used in the physical stage
failure of the composition process. Situations where has minimal overheads and is scalable as shown by
available services only cover a part of the range of the the experimental results of [25]. The staged approach
input type have been handled in [34]. also helps in better failure localization and recovery
because failure resolution is attempted in stages starting
from the most frequent factors for composition dis-
9. Discussion and related work ruption: it is initiated at the execution stage and then
moves to the physical stage and eventually to logical
We have described a two-step approach for end to stage.
end composition of web services by semantically anno- The literature on web service composition is exten-
tating web service components, as well as a prototype sive, consisting of promising results and many chal-
that demonstrates this approach in a domain-specific lenges [35,36,2]. To put it in perspective of this paper,
scenario. The two-staged approach makes our end to we organize this section into three subsections. The first
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 335
relates to design approaches for end to end composi- requires to solve synthesis, execution, optimization
tion. The second and third subsections discuss work and maintenance problems as goals get incrementally
related to logical composition and physical composi- refined. A formalization and evaluation of planning-
tion, respectively. based approaches for end to end composition and exe-
cution of web services is presented in [42]. It classifies
9.1. End to end service composition approaches based upon the amount of freedom given
to the user to intervene and the kind of input they take.
In AI planning, the potential advantage of resource The analysis shows the benefits of a staged composition
abstraction whereby causal reasoning is decoupled approach on the most important metrics for application
from resource reasoning is well-established [37]. Our integration.
work can be seen as applying the same idea to web ser- Aggarwal et al. [21] present a tool to bind web ser-
vices composition. Specifically, we differentiate web vices to an abstract process, based on business and
services at the twin levels of web service types and process constraints and to generate an executable pro-
instances. Our phased approach is easier for the user to cess. Their abstract process is similar to our notion of
work with and limits the impact of frequent deployment abstract plan. Also, they use service template to rep-
and runtime changes on the goal-driven composition. resent the functionality of services and to capture the
A planning-based phased approach has been used in QoS attributes. We use service types to provide the
[38] where an end to end system is described to con- functionality of services, while rendering the flexibil-
struct workflows for manipulation of scientific data, ity of provisioning QoS attributes both at the type and
which are executed on grids. The domain involves the instance level. Furthermore, their work involves
composition at three levels—application domain level manually creating abstract processes containing tem-
where appropriate applications are first selected, then plates. On the other hand, we present an end to end
an abstract plan is built with a planner and finally approach for automatic composition of web services,
it is detailed based on grid execution details. Two starting from specification of requirements to genera-
main differences with our work are that: (a) they do tion of executable processes.
not use ontologies while they recognize the need and Also, METEOR-S uses the notion of a service tem-
(b) the plan/workflow representation is simpler during plate as compared to our service type. A service tem-
logical composition—sequential, while we can handle plate refers to the description of a single web service
branches as well. As our output is in BPEL which also which consists of a set of operations with their inputs
has support for loops, exceptions and other behavioural and outputs [43]. A service type is not very different
constructs, the physical stage can be even more expres- in spirit since a type is nothing but a behavioural tem-
sive. plate for its instances [44]. However, using OWL-S for
In [39], executable BPELs are automatically com- describing the behaviour enables us to represent pre-
posed from goal specification by casting the planning conditions and effects of a service in addition to inputs
problem as a model checking problem on the message and outputs. This allows functional composition to hap-
specification of partners. The approach is promising pen before the actual data types of input/outputs can be
but presently restricted to logical goals and small num- matched for creating the data flow. In fact, even though
ber of partner services. In comparison to our approach, the terms for input and output come from an ontology,
Mandell and McIlraith [40] extend a BPEL engine to having same inputs and outputs does not guarantee that
support runtime service selection using a semantic dis- the two services are functionally similar. Since OWL-S
covery server. They present an integrated technique considers only a single operation of a web service in a
for automating customized, dynamic binding of web description, it needs modification to be able to repre-
services together with interoperation through semantic sent multiple operations. This is currently handled by
translation. our system by modeling each operation as a separate
Ref. [41] argues that web services composition service.
cannot be seen as a one-shot plan synthesis problem But the real benefit of that modeling multiple opera-
defined with explicit goals but rather as a continual tions of a service would be if those operations can repre-
process of manipulating complex workflows, which sent conversation with their clients (i.e. choreography
336 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
of interaction with clients). Neither OWL-S nor the Services Modeling Ontology17 (WSMO) is a recent
templates of METEOR-S seems to fulfill this purpose, effort for modeling semantic web services in a markup
as of now. To summarize, ontological concepts are language (WSML) and also defining a web service
being matched for construction control flow and data execution environment (WSMX) for it. Our logical
flow in the logical composition phase. The output of composition approach is not specific to any particular
this is an abstract BPEL which is abstract in the sense modeling language and can adapt to newer languages.
that it does not refer to invocable service instances but Sirin et al. [49] use contextual information to find
their types. Next, in the physical composition phase, matching services at each step of service composition.
this abstract BPEL is converted into executable BPEL. They further filter the set of matching services by using
This is done by searching a corresponding web service ontological reasoning on the semantic description of
instance, for each service type in the abstract BPEL, the services as well as by using user input. They attempt
based upon their data typed port types and QoS param- to overcome lack of support for service types in OWL-S
eters. by creating a class hierarchy of ServiceProfiles. A new
sub-class is created for each value of an IOPE parame-
ter. There are three problems with their approach. First,
9.2. Logical composition a large set of values for an attribute of a service would
result in generation of that many classes. Second, to
The literature on composing services based on anno- represent a functionality with multiple attributes a huge
tations (semantically organized in ontologies or oth- number of services, one each for a set of possible val-
erwise) has taken two paths. One direction is disam- ues of all attributes, would have to be represented as
biguating similar annotations using domain meta-data, derived classes. Third, new classes need to be added
rules, etc. The other direction is on methods to com- to the ontology every time a new type of service is
bine services whose annotations match based on some introduced. A cleaner approach that separates represen-
notion of similarity. tation of the service definitions from service instances
In the matching of annotations, Ref. [45] formalizes has already been described in Section 5.
matching of web services from a directory based on
various inexactness measures. In [6], the authors have 9.3. Physical composition
identified the information that a semantic web service
must expose in order to fulfill the objective of auto- Several standardization proposals aimed at provid-
mated discovery, composition, invocation and inter- ing infrastructure support to web service composition
operation. While functional attributes have received have recently emerged including SOAP, WSDL, UDDI
attention, the non-functional attributes have not been and BPEL. There has also been a lot of interest in the
much recognized in semantic web. They relate to per- area of dynamic web service and QoS-based workflow
formance, reliability and other user-acceptance issues. management. Previous efforts in this area like eFlow
Ref. [46] describes how such requirements can be qual- [50] have investigated dynamic service selection based
itatively arranged as goal structures and used to design on user requirements.
systems. Their framework allows treating requirements Zeng et al. [25,51,24] describe two instance selec-
as potentially conflicting or synergistic goals to achieve tion approaches, one based on local (type level) selec-
during the software development process. tion of services and the other based on global allocation
A general survey of planning-based approaches for of service types to instances using integer program-
web services composition can be found in [47] which ming. They define a generic QoS model and formulate
is applicable for our logical composition. SWORD the problem in a way that maximizes user satisfaction
[48] was one of the initial attempts to use planning expressed as utility functions over QoS attributes, while
to compose web services. It does not model service satisfying the constraints set by the user and the by
capabilities in an ontology but uses rule chaining to the structure of the composite service. They also dis-
composes web services. A service is represented by a cuss a replanning procedure which may be triggered
rule that expresses that given certain inputs, the ser-
vice is capable of producing particular outputs. Web 17 http://wsmo.org.
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 337
under contingencies, e.g. a component service becomes variables with values, and these could be evaluated as
unavailable or the QoS of one of the component ser- part of reasoning with the service’s preconditions and
vices changes significantly, in order to ensure that the effects.
QoS of the composite service remains optimal. Finally, there has been a considerable effort in the
In [22], the authors present a predictive QoS model web service community in identifying the challenges in
that allows the workflow engine to estimate, moni- workflow orchestration between component services.
tor and control the QoS rendered to customers. Their In [58], the authors consider the problem of service
model can be used in conjunction with our work, to composition as a problem of software synthesis where
effectively manage and estimate the QoS values of algorithms for matching and composition are based on
advertised service instances. The model also com- Structural Synthesis of Programs (SSP) [59]. The SSP
putes the QoS for workflows based on component task language is used as an internal representation language
attributes. In this respect, this work can be seen as for automated service composition, while DAML-S is
aggregating the QoS for a composite workflow from used as an external language for describing web service
the individual instances used in composition. On the properties.
other hand, we try to solve the problem of picking
instances for the composite web service with the aim
of satisfying end to end QoS requirements. In [23], 10. Conclusion
the author corrects some mathematical flaws in [22]
and also extends this framework for the application of We have described a two-step approach for end to
such considerations within web service discovery for end composition of web services by semantically anno-
workflow-defined applications. Ranking of instances tating web service components, as well as a prototype
based on QoS values has also been proposed by [22,23]. that demonstrates this approach in a domain-specific
However, their ranking is for each service type, whereas scenario. Service developers can maintain a registry of
our ranking is based on end to end values of the QoS web services that goes beyond the traditional UDDI
for the composite service. by incorporating semantic descriptions of the compo-
Ref. [52] presents a system for dynamic service nents. When a new service requirement arises, it can be
selection based on data mining techniques. The idea expressed in the context of a domain ontology. Our ser-
proposed consists of labeling process executions with vice creation environment can then be used to generate
quality measures. Other proposals such as METEOR potential workflows for achieving the desired func-
[53] and CrossFlow [54] have considered QoS mod- tionality reusing existing web services. This results in
els for workflows along four dimensions, namely time, significant reduction in the time-to-market for new ser-
cost, reliabilty and fidelity. Bonatti and Festa [55] con- vices.
sider optimal service selection for a given set of service There are two key innovations in our solution. First,
requests (such as the activities occurring in a workflow) we decouple web service composition into logical and
to a set of service offerings. They prove that one-time physical composition stages that address application
costs make the optimal selection problem computation- integration issues. The first stage focuses on the feasi-
ally hard. In the absence of these costs the problem can bility of functional composition while the latter deals
be solved in polynomial time. with efficient execution of the resulting composition.
Our solution regarding generation of data flow is Second, we use optimizing techniques in each stage
related to [56] which describes an environment for that can adapt to changes in the service creation envi-
building reusable ontologies based on the concept of ronment.
roles. This work informally defines role as a character- In the future, we plan to integrate the service com-
istic that a basic domain concept exhibits in a context. position system with a larger service development and
We can use their tool to build role ontology in paral- execution infrastructure. For the Logical Composer, we
lel with the domain ontology. An alternative proposal plan to transition to OWL 1.1 (currently in Beta stage)
to OWL-S is the SESMA [57] model which directly that provides support for rules. This would enable
handles inputs and outputs. Here, a notion of conversa- us to express richer pre-conditions and effects while
tion data set is introduced to hold the input and output representing service capabilities. For the Physical
338 V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339
Composer, we will continue investigating different [10] M. Paolucci, T. Kawamura, T.R. Payne, K. Sycara, Seman-
instance selection heuristics for QoS matching, that tic matching of web services capabilities, in: Proceed-
ings of the First International Semantic Web Confer-
can accommodate constraints on different QoS metrics.
ence, LNCS 2342, Springer-Verlag, 2002, pp. 333–347,
Efforts are ongoing to enable a procedure to classify http://jmvidal.cse.sc.edu/library/paolucci02b.pdf.
composition failure at different stages, and provide [11] V. Agarwal, K. Dasgupta, N. Karnik, A. Kumar, A. Kundu, S.
feedback on possible causes and remedies to overcome Mittal, B. Srivastava, A service creation environment based on
the failure. This would serve as a decision-support tool end to end composition of web services, in: Proceedings of the
14th International World Wide Conference, 2005.
that can be used alongside the service composition
[12] C. Facciorusso, S. Field, R. Hauser, Y. Hoffner, R. Humbel, R.
system. Finally, we want to explore a feedback-based Pawlitzek, W. Rjaibi, C. Siminitz, A web services matchmaking
approach where the service creation system interacts engine for web services, in: Proceedings of 4th International
with the runtime infrastructure to optimize the Quality Conference on e-Commerce and Web Technologies, 2003.
of Service of the composite service, based on changes [13] D.S. Weld, Recent advances in AI planning, AI Mag. 20 (2)
in the execution environment. (1999) 93–123.
[14] M.B. Do, S. Kambhampati, Sapa: a scalable multi-objective
heuristic metric temporal planner, J. AI Res. 20 (2003) 155–194.
[15] T. Bylander, Complexity results for planning, in: Proceedings
Acknowledgments of IJCAI-91, Sydney, Australia, 1991, pp. 274–279.
[16] J. Rintanen, Complexity of planning with partial observability,
The authors would like to thank Anupam Mediratta, in: Proceedings of ICAPS, Whistler, Canada, 2004.
Ashish Kundu, Sugata Ghosal, Anupam Saronwala, [17] B. Srivastava, A software framework for building planners,
in: Proceedings of the Knowledge Based Computer Systems
Yigal Hoffner, Christian Facciorusso, Richard Good-
(KBCS 2004), 2004.
win and Rama Akkiraju for their contributions to the [18] A. Mediratta, B. Srivastava, Planning for End to End Compo-
development of the ideas presented in this paper. sition of Web Services with a User-Driven Contingent Planner,
IBM Research Report, 2005.
[19] P. Doshi, R. Goodwin, R. Akkiraju, S. Roeder, Parame-
References terized Semantic Matchmaking for Workflow Composition,
Technical Report RC23133, March 2004, http://dali.ai.uic.
edu/pdoshi/research/RC23133.html.
[1] S. Staab, et al., Web services: been there, done that? IEEE Intell.
[20] E. Sirin, B. Parsia, Planning for semantic web services, in:
Syst. (2003) 72–85.
Semantic Web Services Workshop at 3rd International Semantic
[2] B. Srivastava, J. Koehler, Web service composition—current
Web Conference, 2004.
solutions and open problems, in: ICAPS 2003 Workshop on
[21] R. Aggarwal, K. Verma, J. Miller, W. Milnor, Constraints driven
Planning for Web Services, 2003.
web service composition in METEOR-S, in: International Con-
[3] S. McIlraith, T.C. Son, H. Zeng, Semantic web services, IEEE
ference on Services Computing, 2004.
Intell. Syst. 16 (2) (2001) 46–53 (special issue on the semantic
[22] J. Cardoso, A. Sheth, J. Miller, J. Arnold, K. Kochut, Quality
web).
of service for workflows and web service processes, J. Web
[4] G. Chafle, S. Chandra, V. Mann, M.G. Nanda, Decentralized
Semantics 1 (2004) 281–308.
orchestration of composite web services, in: Proceedings of the
[23] B. Norton, Quality of service profiles for web services, in: 4th
13th International World Wide Web Conference, 2004.
International Conference on COTS-Based Software Systems,
[5] M.G. Nanda, N. Karnik, Synchronization analysis for decen-
2005.
tralizing composite web services, in: Proceedings of the ACM
[24] J.R. Kalagnanam, L. Zeng, Optflow—Optimal Service
Symposium on Applied Computing, 2003.
Selection for Workflow Execution, IBM Research Report
[6] R. Lara, H. Lausen, S. Arroyo, J. de Bruijn, D. Fensel, Seman-
RC22505, 2002, http://domino.watson.ibm.com/library/
tic web services: description requirements and current tech-
CyberDig.nsf/Home.
nologies, in: International Workshop on Electronic Commerce,
[25] L. Zeng, B. Benatallah, A. Ngu, M. Dumas, J. Kalagnanam, H.
Agents, and Semantic Web Services, 2003.
Chang, QoS-Aware middleware for web services composition,
[7] OWL Services Coalition, OWL-S: Semantic Markup for Web
IEEE Trans. Software Eng. 30 (2004) 311–327.
Services, November 2003, http://www.daml.org/services/owl-
[26] H.C.-L.K. Yoon, Multiple criteria decision making, in: Lecture
s/1.0/owl-s.html.
Notes in Economics and Mathematical Systems, 1981.
[8] Common Information Model (CIM) Metrics Model, Ver-
[27] S. Martello, P. Toth, Knapsack Problems: Algorithms and Com-
sion 2.7, Distributed Management Task Force, June 2003,
puter Implementations, John Wiley and Sons, 2001.
http://www.dmtf.org/standards/documents/CIM/DSP0141.pdf.
[28] S. Russell, P. Norvig, Artificial Intelligence: A Modern
[9] V. Agarwal, N. Karnik, A. Kumar, An information model for
Approach, first ed., Prentice Hall Publication, 1995, ISBN
metering and accounting, in: Proceedings of the IEEE/IFIP Net-
0131038052.
work Operations and Management Symposium, 2004.
V. Agarwal et al. / Web Semantics: Science, Services and Agents on the World Wide Web 3 (2005) 311–339 339
[29] R. Guha, R. McCool, R. Fikes, Contexts for the semantic web, ceedings of the International Conference on Web Services,
in: Proceedings of the International Semantic Web Conference, 2005.
2004. [44] S.B. Zdonik, Why properties are objects or some refinements
[30] A. Kumar, B. Srivastava, S. Mittal, Information modeling for of ‘is-a’, in: ACM’86: Proceedings of 1986 ACM Fall Joint
end to end composition of web services, in: Proceedings of 4th Computer Conference, 1986, pp. 41–47.
International Semantic Web Conference, Galway, Ireland. [45] M. Paolucci, T. Kawmura, T. Payne, K. Sycara, Semantic match-
[31] K. Erol, J. Hendler, D.S. Nau, HTN planning: complexity and ing of web services capabilities, in: First International Semantic
expressivity, in: Proceedings of the 12th National Conference Web Conference, 2002.
on Artificial Intelligence, Seattle, WA, USA, 1994. [46] L. Chung, B.A. Nixon, Dealing with non-functional require-
[32] M.G. Nanda, S. Chandra, V. Sarkar, Decentralizing execution ments: three experimental studies of a process-oriented
of composite web services, in: Proceedings of Conference on approach, in: International Conference on Software Engineer-
Object Oriented Programming Systems, Languages, and Appli- ing, 1995, pp. 25–37, citeseer.ist.psu.edu/chung95dealing.html.
cations, 2004. [47] J. Peer, Web Service Composition as a Planning Problem—
[33] G. Chafle, S. Chandra, V. Mann, M.G. Nanda, Orchestrating A Survey, 2005, http://elektra.mcm.unisg.ch/pbwsc/docs/pfwsc.
composite web services under data flow constraints, in: Pro- pdf.
ceedings of the International Conference on Web Services, [48] S. Ponnekanti, A. Fox, SWORD: a developer toolkit for web
2005. service composition, in: Proceedings of the 11th International
[34] I. Constantinescu, B. Faltings, W. Binder, Large scale, World Wide Web Conference, 2002.
type-compatible service composition, in: IEEE International [49] E. Sirin, B. Parsia, J. Hendler, Composition-driven filtering and
Conference on Web Services, ICWS, San Diego, USA, selection of semantic web services, in: AAAI Spring Sympo-
2004. sium on Semantic Web Services, 2004.
[35] S. Dustdar, W. Schreiner, A survey on web services composi- [50] F. Casati, S. Ilnicki, L.J. Jin, V. Krishnamoorthy, M.C. Shan,
tion, Int. J. Web Grid Serv. 1 (1) (2005) 1–30. eFlow: A Platform for Developing and Managing Composite
[36] X. Su, J. Rao, A survey of automated web service composi- e-Services, Technical Report HPL-2000-36, HP Laboratories,
tion methods, in: Proceedings of First International Workshop 2000.
on Semantic Web Services and Web Process Composition, [51] L. Zeng, B. Benatallah, M. Dumas, J. Kalagnanam, Q.Z. Sheng,
2004. Quality driven web services composition, in: Proceedings of the
[37] B. Srivastava, S. Kambhampati, M.B. Do, Planning the project 12th International World Wide Web Conference, 2003.
management way: efficient planning by effective integration of [52] F. Casati, M. Castellanos, U. Dayal, M.-C. Shan, Probabilis-
causal and resource reasoning in RealPlan, Artif. Intell. 131 tic, context-sensitive, and goal-oriented service selection, in:
(1–2) (2001) 73–134. ICSOC, 2004, pp. 316–321.
[38] J. Blythe, et al., The role of planning in grid computing, in: [53] J. Cardoso, Quality of service and semantic composition of
Proceedings of International Conference on AI Planning and workflows, Ph.D. Thesis, University of Georgia, 2002.
Scheduling, 2003. [54] J. Klingemann, Controlled flexibility in workflow manage-
[39] P. Traverso, M. Pistore, Automated composition of semantic ment, in: Proceedings of the 12th International Conference on
web services into executable processes, in: 3rd International Advanced Information Systems (CAiSE), 2000.
Semantic Web Conference, 2004. [55] P.A. Bonatti, P. Festa, On optimal service selection, in: WWW,
[40] D.J. Mandell, S.A. McIlraith, Adapting BPEL4WS for the 2005, pp. 530–538.
semantic web: the bottom-up approach to web service inter- [56] K. Kozaki, Y. Kitamura, M. Ikeda, R. Mizoguchi, Hozo: an envi-
operation, in: Proceedings of International Semantic Web Con- ronment for building/using ontologies based on a fundamental
ference, 2003. consideration of “role” and “relationship”, in: 13th International
[41] B. Srivastava, J. Koehler, Planning with workflows—an emerg- Conference on Knowledge Engineering and Knowledge Man-
ing paradigm for web service composition, in: ICAPS 2004 agement, 2002.
Workshop on Planning and Scheduling for Web and Grid Ser- [57] J. Peer, Semantic Service Markup with SESMA—Language
vices, 2004. Specification, Version 0.7, 2004, http://elektra.mcm.unisg.ch/
[42] V. Agarwal, G. Chafle, K. Dasgupta, S. Mittal, B. Srivastava, pbwsc/docs/sesma0.7.pdf.
Evaluating planning based approaches for end to end compo- [58] M. Matskin, J. Rao, Value added web services composition
sition and execution of web services, in: Proceedings of the using automatic program synthesis, in: Proceedings of Interna-
AAAI-05 Workshop on Exploring Planning and Scheduling for tional Workshop on Web Services, E-Business, and the Seman-
Web Services, Grid and Autonomic Computing. tic Web, 2002.
[43] R. Mulye, J. Miller, K. Verma, K. Gomadam, A. Sheth, A [59] M. Matskin, E. Tyugu, Strategies of structural synthesis of pro-
semantic template based designer for web processes, in: Pro- grams and its extensions, Comput. Inf. 20 (2001) 1–25.