[ieee 2009 ieee international conference on web services (icws) - los angeles, ca, usa...

8
Modeling Cost-Aware Web Services Composition Using PTCCS XIAO Fangxiong, HUANG Zhiqiu, CAO Zining, HU Jun, and LIU LinYuan College of Information Science and Technology, Nanjing University of Aeronautics and Astronautics Nanjing,China {xiaofx, zqhuang, caozn,hujun, liulinyuang} @nuaa.edu.cn ABSTRACT Process algebra are a set of formal languages that are suitable to describe concurrent and communication systems including web services. Nowadays, although process algebra have been effectively exploited for modeling and verifying functional aspects of web services composition, non-functional aspects have been ignored due to process algebra lack of capability of modeling them. Since execution of web services need to consume resource (and energy, time, fee, etc), we propose an abstract concept, that is, cost, to model this non-functional aspect. We introduce this abstract concept into TCCS(Temporal Calculus of Communicating Systems) that is a classical process algebra and propose a new process algebra called PTCCS(Priced Temporal Calculus of Communicating Systems). We present syntax and semantics of PTCCS, and prove that PTCCS extends TCCS with cost modeling capability. And an algorithm is proposed to construct cost state space that is used to select web services composition with optimal cost. Experiment results show that PTCCS can model both functional aspects and non-functional aspects of web services composition. Keywords: web services, service composition, process algebra, price, cost 1. Introduction Web services are autonomous software systems identified by URIs which can be advertised, located, and accessed through messages encoded according to XML-based standards and transmitted using Internet protocols. Web services encapsulate application functionality and information resources and make them available through programmatic interfaces, as opposed to the interfaces provided by traditional web applications which are intended for manual interactions. In addition, since they are intended to be discovered and used by other applications across the web, Web services need to be described and understood both in terms of functional capabilities and Quality of Service(QoS) properties [1] . Currently, composing existing web services to construct a larger application is keeping as a hot topic in web services research community. Many methods have been proposed for it by industry and academia, and in general these methods can be categorized as two classes in terms of inspiration: one is based on business process to compose web services, for example, BPEL4WS (Business Process Execution Language for Web Service), and the another is based on artifact intelligence to compose web service, for example, semantic web. The former is often used in practice by industry, and process algebra have been more and more used to model and verify functionalities of web services composition based on business process. Process algebra are a series of formal languages that are suitable to describe concurrent and communication systems including web services. Classical process algebra include CCS(Calculus of Communication system) [2] CSP (Communicating Sequential Processes) [3] ACP (Algebra of Communicating Process) [4] . Process algebra take advantage of modeling concurrent and composite systems in a style of elegance and nature: First, a system can be described with subsystems via composite operators (including sequential operator, choice operator, and concurrent operator). This advantage makes it easy to hierarchically model a system and decompose it into subsystems, which will do favor to web services composition. Second, system activities that are trivial for modeling can be hidden via restricted operator, which makes it easy to simplify modeling web services composition. Last but not least, process algebra possess algebra style that features concise syntax and precise semantics, which makes it easy to formally describe and verify web services composition. Thus, there are more and more researchers who like to use process algebra for web services composition research in recent years. For example, the authors of literature [5] mapped BPEL((Business Process Execution Language ) to CCS, then verified functionalities of web services composition application encoded with BPEL via CCS’s verification tool, CWB- NC(Concurrency Workbench of the New Century) [6] . The authors of literature[7] mapped BPEL((Business Process Execution Language ) to Pi calculus [8] , then verified functionalities of web services composition application encoded with BPEL, via Pi’s verification tool, MWB(Mobile Workbench) [9] . The authors of literature [10] proposed BPE(Business Process Execution) calculus that is based on BPEL4WS (Business Process Execution Language for Web Service) to model web services orchestration. Milner.R argues that process algebra can be contributed as theoretical foundation for web services research. [11] However, all of these works exploiting process algebra focused on functional aspects of web services composition and did not address non-functional aspects of 2009 IEEE International Conference on Web Services 978-0-7695-3709-2/09 $25.00 © 2009 IEEE DOI 10.1109/ICWS.2009.56 461

Upload: linyuan

Post on 27-Jan-2017

215 views

Category:

Documents


2 download

TRANSCRIPT

Modeling Cost-Aware Web Services Composition Using PTCCS XIAO Fangxiong, HUANG Zhiqiu, CAO Zining, HU Jun, and LIU LinYuan

College of Information Science and Technology, Nanjing University of Aeronautics and Astronautics

Nanjing,China{xiaofx, zqhuang, caozn,hujun, liulinyuang} @nuaa.edu.cn

ABSTRACTProcess algebra are a set of formal languages that are

suitable to describe concurrent and communication systems including web services. Nowadays, although process algebra have been effectively exploited for modeling and verifying functional aspects of web services composition, non-functional aspects have been ignored due to process algebra lack of capability of modeling them. Since execution of web services need to consume resource (and energy, time, fee, etc), we propose an abstract concept, that is, cost, to model this non-functional aspect. We introduce this abstract concept into TCCS(Temporal Calculus of Communicating Systems) that is a classical process algebra and propose a new process algebra called PTCCS(Priced Temporal Calculus of Communicating Systems). We present syntax and semantics of PTCCS, and prove that PTCCS extends TCCS with cost modeling capability. And an algorithm is proposed to construct cost state space that is used to select web services composition with optimal cost. Experiment results show that PTCCS can model both functional aspects and non-functional aspects of web services composition.

Keywords: web services, service composition, process algebra, price, cost

1. Introduction Web services are autonomous software systems identified

by URIs which can be advertised, located, and accessed through messages encoded according to XML-based standards and transmitted using Internet protocols. Web services encapsulate application functionality and information resources and make them available through programmatic interfaces, as opposed to the interfaces provided by traditional web applications which are intended for manual interactions. In addition, since they are intended to be discovered and used by other applications across the web, Web services need to be described and understood both in terms of functional capabilities and Quality of Service(QoS) properties[1]. Currently, composing existing web services to construct a larger application is keeping as a hot topic in web services research community. Many methods have been proposed for it by industry and academia, and in general these methods can be categorized as two classes in terms of inspiration: one is based on business process to compose web services, for example,

BPEL4WS (Business Process Execution Language for Web Service), and the another is based on artifact intelligence to compose web service, for example, semantic web. The former is often used in practice by industry, and process algebra have been more and more used to model and verify functionalities of web services composition based on business process. Process algebra are a series of formal languages that are suitable to describe concurrent and communication systems including web services. Classical process algebra include CCS(Calculus of Communication system) [2] CSP (Communicating Sequential Processes)[3]

ACP (Algebra of Communicating Process)[4]. Process algebra take advantage of modeling concurrent and composite systems in a style of elegance and nature: First, a system can be described with subsystems via composite operators (including sequential operator, choice operator, and concurrent operator). This advantage makes it easy to hierarchically model a system and decompose it into subsystems, which will do favor to web services composition. Second, system activities that are trivial for modeling can be hidden via restricted operator, which makes it easy to simplify modeling web services composition. Last but not least, process algebra possess algebra style that features concise syntax and precise semantics, which makes it easy to formally describe and verify web services composition. Thus, there are more and more researchers who like to use process algebra for web services composition research in recent years. For example, the authors of literature [5] mapped BPEL((Business Process Execution Language ) to CCS, then verified functionalities of web services composition application encoded with BPEL via CCS’s verification tool, CWB-NC(Concurrency Workbench of the New Century)[6] . The authors of literature[7] mapped BPEL((Business Process Execution Language ) to Pi calculus[8], then verified functionalities of web services composition application encoded with BPEL, via Pi’s verification tool, MWB(Mobile Workbench)[9] . The authors of literature [10] proposed BPE(Business Process Execution) calculus that is based on BPEL4WS (Business Process Execution Language for Web Service) to model web services orchestration. Milner.R argues that process algebra can be contributed as theoretical foundation for web services research.[11] However, all of these works exploiting process algebra focused on functional aspects of web services composition and did not address non-functional aspects of

2009 IEEE International Conference on Web Services

978-0-7695-3709-2/09 $25.00 © 2009 IEEE

DOI 10.1109/ICWS.2009.56

461

web services composition, such as resource, energy, and fee, for process algebra don’t have the capability of modeling these non-functional aspects. In essence, consumed resource, energy, time, and fee of web services composition can be considered as an abstract concept that is cost. We proposed a process algebra in literature [12], called PPA (Priced Process Algebra), which is extends CCS with cost. We experimented with PPA to model web services composition, and experiment result shows that PPA can support web services composition with optimal cost. But the cost addressed by PPA has nothing to do with time, since CCS can not model time, although it is concise. In this paper, we propose another process algebra, called PTCCS(Priced Timed Calculus of Communication System) , which extends TCCS[13] with cost. We expect that PTCCS can support modeling web services composition with optimal cost that will be measured according to time.

The remainder of the paper is organized as follows: Section 2 describes the proposed PTCCS including its syntax and semantics, and proves that PTCCS extends TCCS with cost modeling capability. Section 3 proposes an algorithm to construct cost state space in order to support web services composition with optimal cost. Experimental results are documented in Section 4. Finally, Section 5 discusses related work and Section 6 concludes the paper.

2. PTCCS First, an abstract concept, PRICE that will be added to

PTCCS, needs to be explained. In PTCCS, PRICE abstracts concrete price of consuming RESOURCE per unit time. Here, RESOURCE is also an abstract concept that abstracts concrete resources, such as information, communication, computation, control, energy, CPU, RAM, Disk, battery, even web service, etc. When modeling a concrete application with PTCCS, it is necessary to map abstract RESOURCE and PRICE to concrete resource and price. We write resource and price for simplification in the remainder of the paper. Next, the problem is that how to bind price to the existing process algebra TCCS? TCCS is a formal language that describes actions of a system and state transitions caused by the actions related with time. And a process, called TFSP(Timed Finite State Process) [13],is a executable model entity in TCCS. Thus, we bind prices to actions of TFSP, which means that execution of actions will consume resource and be charged according to the prices. And reaching a state of TFSP can be considered as accumulative result of execution of a sequence of actions, so we bind costs to states of TFSP. We call PTFSP(Priced Timed Finite State Process) for TFSP extended with price and cost. PTFSP is formally defined as below: Definition 1. A PTFSP is 7-tuple

, , , , ,0PTFSP S s Act E f g where 1|0S s i Si is a set of non-empty finite states. 2 0s is

the initial state. 3 is a set of alpha. 4

Act is a set of actions where A A isan internal action that is invisible outside the PTFSP

|A a a is a set of receiving actions |A a a is a

set of sending actions {( )| }maxt t t N is a set of timed(delay) actions, where: is a field of positive integer, and is a possible maximum positive integer for a

specific PTFSP. 5maxN

:g R is a price function for

functional actions, where R is real number field. 6:f R is a price function for timed(delay) actions. 7

E S Act R S is a relation of cost state transition.

From Definition 1, we can see that PTFSP extends , , ,0TFSP S s Act E with :g R and :f R ,since a

TFSP includes two kinds of actions: One are functional actions that make states transitions, such as computing, sending and receiving messages, etc. Another are timed(delay) actions that only keep a system in a stable state for some duration, without doing any functional actions. The functional action price function

:g R shows that different prices for different functional actions, while the timed action price function

:f R shows that different prices for delaying in different states per unit time. Definition 2. For a PTFSP, a priced action is 2-tuple: ( , )p , where: ( ) p g if , or ( ) p f if .

Definition 3. For a PTFSP, a cost state is 2-tuple: ( , )s cs ,

where: s S , ( is the price of an action that is included in the sequence of actions that cause the state

c pis pi

s ,and cs is cost bind with s ).

From Definition 2 and Definition 3, we can see that a price is for an action, and a cost is for a state. And the cost cs bind with a state s can be figured out by accumulating prices of the sequence of actions that cause the state s ,which is the relationship between price and cost in PTCCS. For simplifying writing, we don’t differentiate between price and cost strictly in the remainder of this paper.

Definition 4.The semantics of PTCSS is defined as priced timed label transition system

( , ), , ,0pPTLTS S s Actc c , where:

(1) {( , )| , }S s c s S c Rc s s is a set of cost state.(2) ( ,0)00s sc is the initial cost state. (3)

( , )p S Act R Sc c is cost state transition relation that can be categorized as below two classes:

462

(I) ( , )( , ) ( ', )'a pas c s cs s , caused by functional actions,

where: , 's s S ; ; ;a ( )p g aa 'c c ps s

(II) ( ),( , ) ( , )'

t pts c s cs s , caused by timed actions, where: s S ; ; ;( )t ( )p t f tt 'c c ps s t

From Definition 4, we can see that the semantics of PTCCS preserves the semantics and the time property of TCCS. Furthermore, in PTCCS, execution of a functional action will cause functional state transition, and cost of the functional transition is the price of the functional action. And execution of a timed action ( ) in a functional state means that the system keeps in the functional state for

unit time, and cost of the timed transition is the delaying price in the state multiplying the delay time, e.g.

t

t( )f t t .

An expression of PTFSP is described as below BNF style: :: 0|( , ). |(( ), ). | | | | \ | [ ]|E a p E t p E E E E E E L E h Aa t

Where: is an expression of PTFSP; is a priced functional action; (( is a priced timed action; And terminal operator 0 , choice operator , concurrent operator | , restrict operator \L, replace operator [h] and expression constitute operator

E ( , )a pa), )t pt

A reserve syntax and semantics of TCCS.

Calculus rules of PTCCS are presented as below (symmetric parts for each rule are omitted due to page limitation): 1)ACT rule:

( , ). 'paE E , ( ') ( )Cost E Cost E pa

(( ), )( ). 't ptt E E , ;( ') ( )Cost E Cost E pt

This rule shows that cost of a state after an action execution is the sum of the action price and cost of the state before the action execution. 2)SUM rule

( , ) '1 1( , ) '1 2 1

paE EpaE E E

( ') ( )1 1 2Cost E Cost E E pa

(( ), ) '1 1(( ), ) '1 2 1

t ptE Et ptE E E

;( ') ( )1 1 2Cost E Cost E E pt

This rule is for undetermined choice to 1E or 2E . Cost of a state after an action execution is the sum of the action price and cost of the state before the action execution if

1E is selected.

3)COM rule( , ) '1 1( , )| '|

(( ), ) '1 1(( ), )| '|1 2 1 2

t ptE Et ptE E

( '| ) ( | )1 2 1 2C ost E E C ost E E ptEE

( , ) ( , )', '1 1 2 2| '( , )| '1 2 1 2

p pa E E Ep paE E E E

E

1 2 1 2

paE EpaE E E

( '| ) ( | )1 2 1 2C ost E E C ost E E paE

( '| ) ( | )1 2 1 2st E E Cost E E p paCo

This rule shows that 1E and 2E are executed concurrently, and cost of a state after an action execution is the sum of the actions prices and cost of the state before the action execution. 4)RES rule

( , ) '( , )\ '\

paE EpaL E LE

L L , ( '\ ) ( \ )Cost E L Cost E L pa

This rule shows that an actions listed in L are restricted invisible to outside systems, but it don’t impact cost calculation.5)REL rule

( , ) '( ( ), )[ ] '[ ]

paE Eh paE h E h

( '[ ] ) ( [ ] )C o s t E h C o s t E h p a,

This rule shows that an action name is replaceable via replacing function h , and doesn’t impact calculation of price of the action and calculation of cost of the state. 6)CON rule

( , ) ', , ( ') ( )( , ) '

paE EA E C ost E C ost A p apaA E

c

This rule shows that an expression is replaceable with another expression. Cost calculations for these two expressions are equal.

Definition 5. Symmetrical binary relation is called cost weak bi-simulation, which means that for any

S Sc

( , ),( , )1 21 2s c s cs s , if ( , )( , ) ( ', )1 11 1

ps c s c 's s then

there is '2s so that ( , )

( , ) ( ', )2 22 2

ps c s c 's s and

( ', ),( ', )1 ' 2 '1 2s c s cs s . Where: (1) ( , )1 1s c Ss c and

( , )2 2s c Ss c ;(2) 1 2s s , ' '1 2s s is symbol of weak

bi-simulation[13] of TCCS (3)1 2

c cs s ' '1 2c cs s

(4)( , )p

is identical to ( , )p if all internal actions ( )

in the sequence of actions can be omitted. Cost weak bi-simulation in Definition 5 indicates that if

any two PTFSPs behave corresponding external actions, then cost caused by the actions are equal. This definition will be served to decide whether any two PTFSPs are

463

equivalent for both functional and cost aspects if internal actions are omitted. And the relationship between weak bi-simulation in TCCS and cost weak bi-simulation in PTCCS is presented as below theorem:Theorem 1. If any two TFSPs are weak bi-simulation, then their corresponding PTFSPs( that extend the two TFSPs with identical priced functional function and priced timed function) are cost weak bi-simulation .

We prove theorem 1 with mathematic induction method: Assume that both Q1 and Q2 are any TFSP, and they are

weak bi-simulation, then their external observable actions are corresponding. Assume that ...1 2 k is any of sequence of actions that includes k observable actions.

1 When k=0 (e.g. initial state), cost of both Q1 and Q2

are 0, and the corresponding cost states are (Q1 0)and (Q2 0). Of course, they are cost weak bi-simulation.

2 Since Q1 and Q2 are weak bi-simulation, if exists

, then exists 1 2... ... '1 1nQ Q

1 2... ... '2 2

nQ Q and weak bi-simulation. Assume that the theorem is established when k=n, then there is

( ', ')1 2Q Q

( ) ( ) ( )1, 1 2, 2 ,( , 0) ... ... ( ', )1 1

np p pn nQ k

k1Q p

( , )( , ) ( , )1 1 2 2( , 0) ... ... ( ', )2 1

pp p n n n2s s pk

kand

and are cost weak bi-

simulation.

( ', )11

nQ pk

k( ', )2

1

nQ pk

k

3 When k=n+1, assume that exists 'Q Q and

, then and are weak bi-simulation. In addition, since there exist that

and

, so that

and are cost weak bi-

simulation.

1' '1 1n

'2Q

n

2n

k

1' '2 nQ ''1Q ''2Q

1( , )1 1( ', ) ( '', )1 11 1

n pn nQ p Q pk kk k

1( , )1 1( ', ) ( '', )21 1

n pn nQ p Q pkk k

1( '', )1

1

nQ pk

k

1( '', )2

1

nQ pk

k

Definition 6. The Language of a PTFSP is defined as a set of acceptable sequences of priced actions, where a sequence of priced actions is like

( , )( , )...( , )1 1 2 2p p pn n .Definition 7. A process algebra PA1 is called as a Subclass of another process algebra PA2, if and only if the language accepted by processes in PA1 can be also accepted by processes in PA2. Here the purpose of bring up concept of the language and subclass is to show the relationship of PTCCS and TCCS as

below theorem 2 that indicates that PTCCS extends TCCS with the capability of cost modeling . Theorem 2. TCCS is the subclass of PTCCS.

Prove: Let is an arbitrary TFSP in TCCS, and L is the language of . is a PTFSP corresponding to in PTCCS, and L is the language of . As we known that L is all sequences of actions accepted by according to the literature [14]. It is also known that L is all sequences of priced actions accepted by according to Definition 6. For any sequence of actions ( , ,..., )1 2 n in L , there is an unique corresponding sequences of priced actions ( , )( , )...( , )1 1 2 2p p pn n , which means that namely can be also accepted by L . So, TCCS is the subclass of PTCCS.

DG(Derivation Graph) [2] of a process in classical process algebra describes that all possible evolution of the process. We propose PDG(Priced Derivation Graph) based on DG to prove that the soundness and completeness of PTCCS. Definition 8. PDG(Priced Derivation Graph)of a PTFSP in PTCCS is a priced labeled transition system

( , ), , ,0pPLTS S s Actc c

Theorem 3 (Soundness). Let is an arbitrary

cost state reachable from initial cost state, then there is a

node

,ic i ss s c

i

,jc j ss s c

j j in PDG so that andis si js sc c .

We prove it using mathematical induction: If 0s si ,then is the root node of PDG and the

corresponding cost is 0. The theorem is established for the root node.

is

If 0s si ,then there is a cost state transition sequence ( ) ( ) ...( )1, 1 2, 2 ,0 1 2s p s p s p sc c c i i ic so that:

When 1i , the cost state transition sequence is ( )1, 10 1s p sc c . Assume node is added into PDG due to

execution of priced actionjcs

( 1, 1p ) , it obviously satisfies

1s sj 11c c ps sj . So, the theorem is established for 1i .

Assuming that the theorem is established when i k ,which means that there is cost state transition sequence ( ) ( ) ...( )1, 1 2, 2 ,0 1 2s p s p s p sc c c k k kc and there is

node in PSG so that jcs s sj k

1

kc c ps sj k

ii : then

when 1i k , there is cost state transition sequence

( ) ( ) ...( ) ( )1, 1 2, 2 , 1, 10 1 2s p s p s p s p sc c c k k c k k ck k 1 . Let

node is added in PSG by execution of jcs

464

action ( 1, 1pk k ) , since s j and cs j are figured out

according to sk and c based on Definition 4, it obviously

satisfies and

k

1j ks s1

1

kc c ps s ij k

i.

Theorem 4(Completeness). Let ,s s cc i si i is an arbitrary

cost state reachable from root cost state ,000s sc , then csi is surely the accumulated cost of priced transition sequence from 0sc to sci .

Prove: since sci is figured out from 0sc according to PLTS in Definition 2, there is a priced transition

sequence , ,1 1,0 , ... ,0 1 11

ip pi is s p s pi kk

,

namely, 1

is pc ki

k.

3. Cost State Space According to PTLTS of PTCCS, we can construct cost

state space of a PTFSP. The space is actually PDG corresponding to expression of the PTFSP. Then we can find out optimal composition based on cost state space. Before presenting the algorithm to construct cost state space, we assume that any expression of any PTFSP has the format: ...1 2E E E En , where E is recursive expression only including two operators: action prefix operator and choice operator, and :: | |( )|a a ti , i=1,2,…n, since other operators can be transformed to the two operators according to the literature[2].Algorithm1: construct algorithm of cost state space 1 , ,ConstructCostSpace E g f

Input: PTFSP expression E, priced action function g, priced timed function f.Output: PDG meeting , ,E g fSteps:

(i)Create root node ,000s sc ;

(ii)Call function .( , , , )0

ContructPDG s E g fc

2 .( , , , )ContructPDG s E g fcInput: cost state node sc , PTFSP expression E, priced action function g, priced timed function f.Function: create PDG starting from node and meeting cs

, ,E g fSteps:

(i)Scan , for every E Ei i 1 2 …n, separated by choice operator‘+’ do:

(ii)If then do nothing; 0E

(iii)Else create a node , ( )s s h sc i ii and an

edge,Pi is sc ci ;

(iv)For each Ei , if E is not a empty and i is not end

action, call recursively.( , , , )ContructPDG s E g fciThe algorithm recursively construct cost state space in

the way of depth first. If the number of operators in expression is n, time complexity of the algorithm isE O n .

4 Experiment Analysis We show the effectiveness of PTCCS by extending the

classical example of travel booking system in the literature [15], and we ignore some trivial parts that have nothing to do with cost analysis. Figure 1 shows the simplified travel booking system. The system is composed of three kinds of web services, e.g. travel agent service, bank service, and airway service. Each service can be mapped to a PTFSP, and fee of using services per unit time can be mapped to price of PTFSP. In addition, real lines in the figure mean functional actions, while dash lines mean timed actions. Since there are different services in the actual internet that have same functionalities but different prices, we simulate the case by using two airway services, e.g. AirwayA and AirwayB that have same functionalities but different prices (due to different service quality, for example).

Fig.1 Travel Booking System Figure 1 depicts the business process: Client sends ticket

booking request Req to Agent. Then Agent sends AskInf to Client to query details. Client sends FliAReq(or FliBReq) to Agent for a ticket from AirwayA(or AirwayB). Then Agent sends FliAOrd(or FliBOrd) to AirwayA(or AirwayB). After delaying 7(or 6) units time, AirwayA(or AirwayB) return ticket information FliAInf(or FliBInf) to Agent. Then Agent sends fee request ReqPay to Bank. And Bank return payment information PayInf to Agent after delay 5 units time. Finally, Agent notices Client ticket booking Accept (or Refuse) according to whether ticket payment succeeds or fails. There are two kinds of actions in figure 1: functional actions and timed actions. According to TCCS, execution of a functional action is instantaneous and has no any delay. For simplication, assume that price of all functional actions

465

is 1 APU(action price unit), so the functional action price funtion is:

( ) 1 ( )g a apu a

Assume that different prices for using different web services per unit time are as below list 1:

Table 1. List of Price of Atomic Services Service Agent Bank AirwayA AirwayBPrice(spu) 5 2 3 4

In practice, there are two kinds of cost for web service composition: one is the cost of the individual web services that consist of the composite services, and another is the cost of interacting among the individual web services. Hence, we further indicate a cost state node as the format of ( , , , )s c c ti s ,where s is a state, c is interacting cost(i.e. functional cost), c

i

s is service cost(i.e. timed cost), and t is the duration in which s is reached from the initial state. And we indicate an action edge as the format of ( ,p,r),where

is an action, p is the price of , and r is attribute of (funactional or timed action). Please note that some

special messages can be designed to indicate some specific events in web services composition(for example, Refuse can be designed to indicate composition end without success, while Accept to indicate composition end with success). We assume that cost of the composite service is the self cost of sub-services plus the cost of interacting among sub-services if the composite service is provided successfully(i.e. Client receives the message Accept), otherwise, the cost of composite service is just the cost of interacting among sub-services and the self cost of sub-services are ignored (i.e. Client receives the message Refuse).The experiment include two sections: one is to verify correctness of services composition, and the another is to select optimal services composition based on PTCCS. 4.1 Verification of services Composition

In this section, weak bi-simulation of process algebra is used to verify whether the composite service BookSystem meets Client’s requirement. Please note that Client isn’t a sub-service to compose the composite service, but it’s behavior serve as requirement to verify whether the composite meets the requirement. Client’s reversed equivalent is called Rclient and is seen as an ideal modeling entity that meets Client’s requirement. Rclient’s expression can be figured out by reversing all actions of Client. Since Client interacts with BookSystem, we can consider that Client and BookSystem compose as a reversed system if BookSystem meets Client’s requirement. If so, Rclient is weak bi-simulation with BookSystem for their external actions. Below we give the expression of TFSPs to do verification based weak bi-simulation: Client’s expression: proc ' . . 0

proc ' .(12). ' .(11).0 1

proc . .1

Client Req AskInf C

C FliAReq C FliBReq C

C Accept Client Refuse Client

Rclient’s expression:

1

1

proc . ' . 0

proc .(12). .(11).0 1

proc ' . ' .1

RClient Req AskInf RC

RC FliAReq RC FliBReq RC

RC Accept RClient Refuse RClient

Agent’s expression: proc . ' . 0

proc .' .(7). .0 1

.' .(6). . 1

proc ' .(5). .1 2

proc ' . ' .2

Agent Req AskInf Agent

Agent FliAReq FliAOrd FliAInf Agent

FliBReq FliBOrd FliBInf Agent

Agent ReqPay PayInf Agent

Agent Accept Agent Refuse Agent

AirwayA’s expression: proc .(7). .AirwayA FliAOrd FliAInf AirwayAAirwayB’s expression: proc .(6). .AirwayB FliBOrd FliBInf AirwayBBank’s expression: proc .(5).' .Bank ReqPay PayInf BankBookSystem’s expression( note: actions in internal channels are taken as restricted while verify weak bi-simulation): set , , , , ,In ReqPay PayInf FliAOrd FliAInf FliBOrd FliBInf

proc | | \BookSystem Agent Bank AirwayA AirwayB In

Rclient and BookSystem weak bi-simulation verification with CWB1.2 indicates that external behaviors of BookSystem are corresponding to that of Rclient, i.e, BookSystem meets Client’s requirement. Since this paper doesn’t focus on functional verification, please refer to the literatures[5,6,7,10] for more details about the verification. 4.2 Select optimal services composition

According to Theorem 1, Rclient and BookSystem are cost weak bi-simulation due to weak bi-simulation. Hence, cost analysis of BookSystem can be replaced with that of Rclient. We expanded Algorithm 1 and implemented it with Turbo C++ 3.0 so that it can access disk files in MS-DOS mode of Windows XP: it can read Rclient’s expression out of file Process.txt, functional action price expression out of ActionPrice.txt, timed action price expression out of DelayPrice.txt, and write generated PDG into PDG.txt.

Figure 2 shows execution of Algorithm 1 in MS-DOS mode of Windows XP. File PDG.txt indicate the generated PDG in the format of text, where the four fields of each line in the nodes list indicate a state, interacting cost in the state, service cost in the state, and duration in which reaching the state from initial state, respectively. While the five fields of each line in the edge list indicate start state of an edge, end state of the edge, name of the action that the edge indicates, price of the action, attribute of the action(functional action or timed action).

466

Fig.2 Program Running According to execution result of Algorithm 1, an

intuitionistic PDG showed in figure 3 can be figured out:

Fig.3 Priced Derivation Graph In figure 3, Rclient is in root state node s0 0, 0, 0

when initialized and will transit to s1, 1, 0,0 ifreceiveing the message Req whose price is 1. Then it will transit to s2, 2, 0, 0 if sending the message Askinfwhose price is 1. The rest transitions are similar, so we don’t give uncecessary details and only highlight some specific transitions. The edge ((12), 120, time) means that the duration for composition among Agent, Bank and AirwayA is 12(i.e, 7+5) and the service cost is 120(i.e, 12 x (5+2+3)). The edge ((11), 121, time) means that the duration for composition among Agent, Bank and AirwayB is 11(i.e, 6+5) and the service cost is 121(i.e, 11 x (5+2+4)). The special action Refuse causes the two edges of (Refuse, 1, func) and further causes that the service cost of s5, 4, 0, 12 and s9, 4, 0, 12 is 0, which means that the services composition ends without success and the service cost of composition is ignored. The node of s6, 4, 120, 12 indicates that the composition of Agent,Bank and AirwayA meets Client’s requirement, the interacting cost is 4, the service cost is 120, and the duration is 12. The node of s10, 4, 121, 11 indicates that the composition of Agent, Bank and AirwayB meets also Client’s requirement,

while the interacting cost is 4, the service cost is 121, and the duration is 11. Users can select optimal services composition based on cost or duration, or based on the multi-attributes method[16] that synthetizes cost and duration.

5. Related works QoS-driven web service composition focuses on

selecting QoS optimal composition from composition solutions that meet functionalities. Zeng.LZ proposed a middleware in which a optimal services composition will be selected based on concrete cost, execution duration, reliability, reputation[1]. Sreenath.R proposed an agent solution by which a optimal services composition will be selected based on services qualities evaluation[17].Singhera.Z.U proposed a services composition architecture that meets some specific non-functional requirements[18].Different from all above QoS-driven services composition researches, we do QoS-driven composition research from abstract qualities perspective in PTCCS. Since abstract qualities can be mapped to concrete qualities in specific applications, we think that PTCCS takes advantage of universality against other researches. Related works that expand price into formal languages include: In automata field, Behrmann.G proposed priced timed automata[19] and Alur.R proposed weighted timed automata[20]. These automata expanded their edges with price or weight parameter in order to address reachable or optimal problems related with cost in scheduling analysis in real time systems. But cost of composition isn’t addressed in these expanded automata. In petri-net field, Liu.WD proposed a price timed Petri net that is specific to grid applications[21] and Liu.XM proposed a price timed Petri net that is specific to business process applications[22]. There petri nets expand transitions with time and price in order to address reachable problems related with cost, but they don’t also address cost of composition. In process algebra field, although Eberbach.E expanded PI calculus with cost[23], the expanded PI culculus is much more complex than PTCCS and focuses only on agent research and isn’t used in web services composition research.

6. Conclusion We propose PTCCS to address the problem that process

algebra are being exploited for web services composition but lack of cost modeling and analyzing. And we present the syntax and semantics of PTCCS, prove that PTCCS expand TCCS with cost modeling and analyzing, and propose an algorithm to select optimal services composition from generated cost state space. We also verify the effective of PTCCS via an experiment. We think that PTCCS not only do favor to the field of process algebra research but also provide a novel perspective and approach for web services research. At the same time, we also see that PTCCS expands TCCS with single price currently, which means that PTCCS is only applicable to one quality

467

attribute(for example, only fee can be measured in the experiment). However, multi-quality attributes may be taken in account simultanously in practice. So we plan to do two things in next works: One is expand CWB to support PTCCS analysis automatically. Another is to expand PTCCS to support multi-price.

Acknowledgment The work presented in this paper has been partially

supported by the National Natural Science Foundation of China(NSFC) (project n.60873025 Research on Bisimilation of High Order Process Algebra), and the National Educational Department Ph.D Foundation of China(NEPF) (project n. 20070287052 Analysis and Verification of Non-Functional Attributes of Software based on Component)

References[1] Zeng.LZ, Benatallah.B et a1 QoS-Aware Middleware for

Web Services Composition IEEE TRANSACTIONS ON SOFTWARE ENGINEERING VOL. 30, NO. 5, MAY 2004 1~17

[2] Milner.R. A Calculus of Communicating Systems. Number 92 in Lecture Notes in Computer Science. Springer Verlag, 1980. 2~25

[3] Hoare.C.A.R.. Communicating sequential processes. Communications of the ACM, 1978, 21(8): 666~677

[4] Bergstra.J.A., .Klop.J.W. Process algebra for synchronous communication. Information and Control, 1984, 60(1/3):109–137

[5] Salaün.G., Bordeaux.L, Schaerf.M. Describing and reasoning on Web services using process algebra. In: Proceedings of the 2nd IEEE International Conference on Web Services, San Diego, California, USA, 2004, 43 50

[6] Cleaveland.R., Li.T, Sims.S. The Concurrency Workbench of the New Century (Version 1.2). Department of Computer Science, North Carolina State University, 2000, 1~10

[7] Liao.J., Tan,H, Liu.JD. Describing and Vefifying Web Service Using Pi-Calculus. Chinese Journal of Computers, 2005, 28(4) 635-643 (in Chinese with english abstract)

[8] Milner.R. Parrow.J, Walker.D. A calculus of mobile. Information and Computation, 1992, 100:1~77

[9] Victor.B..The Mobility Workbench User's Guide: Polyadic version 3.122. Department of Information Technology, Uppsala University, 1995, 1~10.

[10] Koshkina.M, Breugel.F. Modelling and verifying Web service orchestration by means of the concurrency workbench. ACM SIGSOFT SEN, 2004, 29(5):1~10

[11] Milner.R. Theories for the global ubiquitous computer. In: Foundations of Software Science and Computation Structures, LNCS 2987. Berlin: Springer-Verlag, 2004

[12] Xiao.FX, Huang.ZQ, Hu J, et al. Support Web Services Composition with Optimal Cost Using PPA. In: Proceedings of the 6nd IEEE International Conference on Web Services(ICWS 2008), Beijing, China, 2008

[13] Moller.F, Tofts.C. A temporal calculus of communicating systems. In J.C.M. Baeten and J.W. Klop, editors, Proceedings CONCUR’90, number 458 in LNCS, Springer Verlag, 1990, 401~415

[14] Kanellakis.P.C, Smolka.S.A. CCS expressions, finite state processes and three problems of equivalence. Journal of Information and Computation, 1990, 86:43 ~ 68

[15] Srivastava.B, Koehler.J. Web Service Composition - Current Solutions and Open Problems. In: Proceedings of the 13th International Conference on Automated Planning and Scheduling (ICAPS 2003), Trento, Italy, 2003, 1~8

[16] Kksalan.M, Zionts.S Multiple criteria decision making in the new millennium Berlin Germany Spring—Verlag2001

[17] Sreenath R. M, Singh.M.P Agent-based service selection Journal of W eb Semantics 2004 1(3) 261—279

[18] Singhera.Z.U. Extended Web services framework to meet non-functional requirements In Proceedings of the International Symposium on Applications and the Internet W orkshops Tokyo Japan 2004 334 341

[19] Behrmann.G., Fehnker.A., Hune.T, et al. Minimum-Cost reachability for priced timed automata. In: Benedetto MDD, Sangiovanni-Vincentelli A, eds. Proc. of the 4th Int’l Workshop on Hybrid Systems: Computation and Control. LNCS 2034, Berlin: Springer-Verlag, 2001, 147~161.

[20] Alur.R., Torre.S.L, Pappas.G..J.. Optimal paths in weighted timed automata. Theoretical Computer Science, 2004,318(3):297~322.

[21] Liu.WD, Song.JX., Lin.C. Modeling and analysis of grid computing application based price timed Petri net. Acta Electronica Sinica, 2005,33(8):1416~1420 (in Chinese with english abstract)

[22] Liu.XM, Li.SX., Li.WJ, et al. A Time Petri Net Extended with Price Information. Journal of Software, 2007,18(1):1~10(in Chinese with english abstract)

[23] Eberbach.E. $-Calculus of Bounded Rational Agents: Flexible Optimization as Search under Bounded Resources in Interactive System. Fundamenta Informaticae, 2005,68:47~102

468