Predicting Service Composition Costs With Complex Cost Behavior

2 downloads 1040 Views 3MB Size Report
Service providers have offered services with different pricing schemas .... Using our example to demonstrate the PCE of the task “Send Email to. Customer With ...
Predicting Service Composition Costs With Complex Cost Behavior Robson Medeiros 1,2,3, Nelson Rosa1, Luís Ferreira Pires3 Federal University of Pernambuco, Brazil1 Federal Rural University of Pernambuco, Brazil2 University of Twente, Netherlands3

UFPE

Agenda •  Motivation •  The Problem •  A Cost Behavior Metamodel •  Predicting Cost of Service Composition •  Evaluation •  Conclusion and Future Work

UFPE

Motivation

UFPE

Motivation •  Some approaches have been proposed to compute cost of service compositions without taking into account all classes of cost behaviors that a service can have •  Service providers have offered services with different pricing schemas –  Pricing based on the volume of use of the service –  Fixed price, where the price does not depend on the volume of use of the service –  Pricing with part fixed and part that depends on the volume of use –  Pricing that provides discounts according to the use of service

•  For the service composition, the price of a service is the the cost to use it

UFPE

Motivation •  Complex pricing schemas have turned service cost management into a challenge –  to choose the better set of services for composition considering that we do not have only services with different price, but also services with different pricing schemas –  to keep the cost of the service composition within bounds –  to model and express cost behavior to allow cost management by a cost management system –  to predict the cost of the service composition

The  concern  of  our  work  

UFPE

The Problem

UFPE

The Problem •  Since there are different class of cost behavior

•  And unreliable services can also affect the cost to execute a service composition UFPE

The Problem •  Our question is: How to estimate the cost of service compositions taking into account service reliability and all classes of cost behaviors?

UFPE

A Cost Behavior Metamodel

UFPE

A Cost Behavior Metamodel •  This metamodel provides ways to represent the level of resource consumption in each service composition task and the functions to compute the cost of the consumed resources •  These characteristics are represented by the main metaclasses of our cost metamodel –  –  –  – 

CostBehavior (root) CostDriver Cost Rules

UFPE

A Cost Behavior Metamodel •  An Example of Step Cost Behavior –  This step cost is configured as follows •  The first 10 GB/month of message sent: $0.12/MB •  Greater than 10 GB/month of message sent: $0.09/MB

- 

The period attribute in the choose metaclass informs that the cost driver must be accumulated during the period informed

- 

The cost driver informs how the cost increase

UFPE

Predicting Cost of Service Composition

UFPE

Predicting Cost of Service Composition •  The process to predict cost of service composition

UFPE

Predicting Cost of Service Composition •  One task, of the first two, is to model the service composition

UFPE

Predicting Cost of Service Composition •  An example to demonstrate our our approach: –  A service composition to convert WAV to MP3 audio format

UFPE

Predicting Cost of Service Composition •  The second task, of the first two, is to model the cost behaviors of the services involved in the composition, which is done by using the Cost Metamodel

UFPE

e 7.

means that the service composition in our experiment has an average of 33 daily executions. Therefore, for each simulated day, the number of the service composition executions was determined by a normal distribution function with mean 33 obtained previously and standard deviation 1, which we assumed to compute the distribution.

Predicting Cost of Service Composition C. Predicting cost

•  The cost behaviors of the services adopted in the Test case previous business process with cost annotations.composition service Table I C OST BEHAVIORS Service

Cost Model

ValidateEmail

$0,05 per invocation.

tor

SimpleEmail

$2,00 per month.

AV dio

WAVtoMP3

$10.00 per month; and, $0,03 per 1 MB of file.

CompleteEmail

$0.10 per 100 emails / month; and, Attachments: First 10 GB/month: $0.12/MB, Greater than 10 GB/month: $0.09/MB

mail

l to with ile

By using the approach presented in Section III, we first modeled the service composition in BPMN (Model Service Composition) and the cost behavior of all services using our cost metamodel (Model Cost Behaviors). Next, we annotated the business process with the cost behaviors (Annotate Cost Behavior Identification), cost driver values (Annotate Cost Driver Values), task reliability (Annotate Reliability) and probabilities to all alternative paths of the business process (Annotate Conditional Statement Probabilities). After the business process was annotated, we executed the Algorithm 1 to compute the probability of correct execution (P CE) of each service and the average cost driver values per service composition execution (Compute Cost Driver Values per Service Composition Execution). These cost driver values are obtained by multiplying P CE, the average value per invocation of each cost driver of the respective service and the number of invocations in the period as shown in Table II. Finally, Algorithm 2 was executed to compute the cost of each service according to its respective cost behavior (Compute Cost of Service Composition).

vice composition was modeled and executed using 6]. The SimpleEmail service was used to perform y Administrator by Email. Task Validate Email was performed by web service ValidateEmail with

Table II C OST PREDICTION OF SERVICE COMPOSITION Service

PCE

Cost Driver Values

Cost

UFPE

Predicting Cost of Service Composition •  After that, the service composition model is annotated with service reliability, conditional statement probabilities, cost behavior identification and cost driver values They  can  be  done     dynamically  

UFPE

Predicting Cost of Service Composition •  Then, we compute the average cost driver values for the service composition

UFPE

Predicting Cost of Service Composition •  In the Algorithm 1, it is computed the probability of a task sj executes and terminates correctly PCE(sj), which depends on

–  the reliability of the atomic service that will execute this task R(sj) –  the probability associated to the path wij –  the probability of the previous task is executed correctly PCE(s Figure 6. Process to compute cost of service composition. j)

•  the PCE(s ) is multiplied by all cost

j compute the cost of the entire composition (Compute after si , the P CE (Probability of Correct Execution) of task driver value service associated to sj Cost of Service Composition). This algorithm computes the sj is computed as in Equation 5. service composition cost by taking into consideration the period of analysis, the cost behavior of cost each service, •  cost It is returned the set of driver P CE (s ) = P CE (s ) ⇥ w ⇥ R(s ), (5) j i ij j the average values cost driverper values associatedfor to the each SC, service service where P CE (si ) ⇥ wij = 1.0 if sj is the first task. composition taking executioninto computed in thethat last task and the account a service average number the adopted service composition execution for canofbe to execute more When sj is preceded by a set of tasks in sequence (see the period being considered. than one task Figure 2), in parallel (see Figure 3), conditionally (see Figure 4) or in a loop (see Figure 5), Equation (1), Equation (2), UFPE Algorithm 1 Compute average of cost driver per execution Equation (3), and Equation (4) can be applied to reduce the

Predicting Cost of Service Composition •  Using our example to demonstrate the PCE of the task “Send Email to Customer With the MP3 File” •  The PCE(“Send Email to Customer with the MP3 File”) depends on: –  The reliability of the service that will execute the previous tasks (“Validate Email Address” and “Validate Email Address”) –  The probability of the email address is valid –  The reliability of the service that will be used to execute it

UFPE

Predicting Cost of Service Composition •  Finally, it is computed the cost of the service composition

UFPE

15: 16: 17: 18: 19: 20:

end if Algorithmend 2 Compute cost of service composition if 1: procedure end for COMPUTE S ERVICE C OMPOSITION C OST(BP , CDV , periodOf Analysis, n) 2:end for CM := BP.getCostM odels() 3:return costV aluealue := 0.0 costV for all cmk in CM do end4: procedure

Predicting Cost of Service Composition

for all cost ci in cmk do Analysis 6: periodRate := periodOf ci .getP eriod() 7: if (there is cost driver in ci ) then addition, conditions cancostDriver be used to:= define the proper function In⇤order to evaluate our approach, the cost of the com8: ci .getCostDriver() ⇤ periodRate n to be adopted. If that position was calculated in two different ways: by adding 9: endisifthe case, we must first evaluate the Algorithm 2 Compute cost of service composition 10: before using if ((cithe is2in a choose element) AND in (condition true)) (cicomputed is NOT inCOMPUTE a choose element) then cost function as shown Line is up the1: OR cost directly each atomic service and procedure Sfor ERVICE C OMPOSITION • condition The Algorithm receives: 11: if costDriver is NOT N U LL then . Variable cost F ixe C OST(BP CDV , periodOf Analysis, n) we compare both 10. When the cost function can be used, we verify if there by applying the, proposed approach. Then, hm 2 Compute cost ofset service composition costDriver –  the of cost driver values per service 2: CM := BP.getCostM odels() 12: costV alue := costV alue + ⇤ c .getV alueP erAmount() i is a cost driver associated to the cost function (Line 11). costs to evaluate the results obtained with our approach. ci .getAmount() 3: costV alue 13: else . Fixed cost cedure In COMPUTE S ERVICE C OMPOSITION C OST (BP , CDV , periodOf Analysis, n) := 0.0 –  the period of cost analysis (e.g., 1 day, 15 the case of the ci has a cost driver, the cost function 4: for all cmk in CM do 14: costV alue := costV alue + c .getV alueP erAmount() ⇤ periodRate We cond CM := has BP.getCostM odels() A. Application days, 1 month) a variable behavior (Line 12). Otherwise, it has ia fixed 5: for all cost ci in cmk do periodOf Analysis composed 15: end if 6: periodRate := ci .getP eriod() behavior 14). In theofcase of variableofbehavior, the cost costV alue :=16: – 0.0(Line the number execution the service Audio File The7: application consists of ain service that end if if (there is cost driver ci ) then composition is computed as shown in Equation 6. All atomic for all cm CM do k in 8: := to ci .getCostDriver() ⇤ in between this period converts audio filescostDriver from WAV MP3 (see Figure 7). The 17: composition end for implement periodRate ⇤ n for all cost cmfor do 18: ci in end process starts when the customer invokes the composition k we assume 9: end if periodOf Analysis •  After, it is computed the cost driver costDriverV alue 19: return costV alue by informing her e-mail address and the WAV file to order be periodRate := In 10: if ((ci is in a choose element) AND (conV ariableCost = ci .getP eriod() ⇤ valueP erAmount(6) 20: end procedure position w values for theamount period in analysis converted. The e-mail address is validated by the first service dition is true)) OR (ci is NOT in a choose element) 5:

if (there is cost driver in ci ) then cost compu then Email Address) and, if it is valid, the WAV file where, costDriverV is the cost driver value accumucostDriver := cialue .getCostDriver() ⇤ periodRate ⇤ n (Validate the propos 11: if costDriver is NOT N U LL then . is converted into the MP3 file format by another the service latedifin the period of analysis and the valueP erAmount is hypoth Variable cost end addition, conditions can be used to define the proper function In order to evaluate our approach, the cost of the comproviders (Convert WAV to MP3 Audio Format). In contrast, if the i the value that is charged to consume an amount of a cost 12: costV alue := costV alue + if ((cThen, a the choose element) AND is true)) (c is NOT in a choose element) then costDriver Ifcost that isof the the case, we (condition must first evaluate the OR position was calculated in two different ways: by adding itoisbeinadopted. i • driver SC is computed ⇤ ci .getV alueP erAmount() e-mail address is invalid, the service composition sends an (amount). c .getAmount() condition beforeisusing the cost function as shown in Line up the13:cost computedelse directly for each .atomic service andA. Applica . Fixed cost if costDriver NOT N U LL then Variable cost e-mail to notify the costV composition administrator, informing In taking the case of fixed behavior, the cost function only into account the cost behavior of 14: alue := costV alue + costDriver 10.costV Whenalue the cost function can be used, we verify if⇤there by applying the proposed approach. Then, we compare both The app := costV alue + c .getV alueP erAmount() i that to anevaluate has (Notify Administrator Email). depends thedriver period of analysis (periodRate). ci .getAmount() cerror erAmount() ⇤ periodRate i .getV alueP is aon cost associated to the cost function Moreover, (Line 11). costs thehappened results obtained with our approach.by converts au each service else . Fixed cost 15: end if If the file is converted correctly, the customer receives an e-sta it hasInthethesame is indecase value of the(V ci alueP has a erAmount), cost driver, thewhich cost function process – costV the more appropriated function, with the fileend in ifthe new format (Send Email to Customer pendent of thealue use behavior of service, as+shown in alueP Equation (7). A.mail :=the costV alue ci .getV ⇤16: periodRate by informi Application has a Choosing variable (Line 12). Otherwise, itcost has aerAmount() fixed 17: end for be convert which may depend on any condition with 18: the MP3 File). behavior end if (Line 14). In the case of variable behavior, the cost end for The application consists of a service composition thatservice (Va 19: task return alue computed as shown in Equation 6. Each of costV the is performed a end ifisF ixedCost is conv audio files fromservice WAV tocomposition MP3 (see Figure 7). Thefile by = valueP erAmount ⇤ periodRate (7) converts 20: end procedure web service with the cost behaviors shown in Table I. process starts when the customer invokes the composition(Convert W end for email addr costDriverV alue V ariableCost =IV. E XPERIMENT ⇤ valueP erAmount(6) by informing her e-mail address and the WAV file to beemail to no end for B. Simulation amount The e-mail address is validated by the first servicean error ha We alue conducted an experiment in which some services converted. can be related to a cost driver. In this case, the value of the return costV (Validate Email and, if it inis Line valid, theaddition, WAV where, costDriverV alue is the cost driver value accumuUFPE filethe file is costservices driver isAddress) calculated as shown 8. In are composed in order evaluate our approach. All atomic All were implemented in Java and deployed in d procedure i

Evaluation

UFPE

Evaluation •  We assume a business process in BPMN that converts audio files from WAV (Waveform Audio File Forma) to MP3 (MPEG-2 Audio Layer III)

•  All tasks of the business process was performed by Web services •  We developed a system to compute the cost of service compositions by using our approach •  We validate the proposed solution by comparing the costs calculated manually against the costs automatically calculated by the tools UFPE

Evaluation •  According to the result of the test, we cannot reject the In order to identify which hypothesis test should be appositions and analyze these processes before they are impleFigure 8. Testingby the normalization of the examples. hypothesis that the cost computed directly the service plied in our experiment, we tested if the examples collected mented. Magnani et al. [17] proposed an approach to analyze fitted a normal distribution. Since the P-value we obtained the cost of business processes by adding cost properties providers is equal to the cost computed our approach. Therefore, we by applied the Z-test with 95% of confidence was 0.228, we can not reject the hypothesis that the data to BPMN elements. Similarly to our solution, they also follows a normal distribution with 95% of confidence level, mean 205.4 and standard deviation equal to 2.503, as shown in Figure 8.

Figure 8.the   Testing the normalization examples. Tes5ng   normaliza5on   of  tof he  theexamples  

Therefore, we applied the Z-test with 95% of confidence level and standard deviation 2.503 to test the hypotheses: • Null Hypothesis (H0 ): ⌘ = 205.78

level and standard deviation 2.503 to test the process. hypotheses: add probabilities to all alternative branches in the • Null Hypothesis (H0 ):is ⌘annotated = 205.78in each element However, only the average cost • Alternative Hypothesis (H ): ⌘ all 6= 205.78 of the BPMN, and neither reliability1nor cost behaviors are considered. Saeedi at al. [12] proposes a BPMN extension to predict cost. Unlike [17], Saeedi‘s approach is also able to predict performance and reliability of service composition. However, different from our approach, they do not take into account all cost behaviors and the reliability and performance of the services are not used to compute the cost of the service composition. Sampathkumaran [11] also proposes a BPMN extension to predict the cost of business processes. Additionally, this approach takes into account the reliability of each task when computing the cost of the service compositions. Like other approaches, only the average cost is annotated in the BPMN task, and the cost of the services is computed by only considering the number of invocations. In our approach, Histogram   of  the  the cost   examples   fwe or  for 3annotate 3  33 invoca5ons   per  day instead of annotating the cost Figure 9. Histogram ofaverage the cost cost, examples invocations per day. behavior of each task. The According work of Wynn al. [18] a framework to the atresult of thepresents hypothesis test (see Figure for reporting predicting cost ofwe business 9), with and P-value equal the to 0.645, cannot processes reject the null UFPE with hypothesis cost model that annotations. Moreover, their approach usesservice the cost computed directly by the

 

Saeedi cost. Unli performan ever, diffe count all of the serv compositi Sampat to predict approach computin approache task, and considerin instead of behavior The w for report with cost ProM [19 ness proc receives c cost infor absence o be used t the frame However, costs per not use p compositi logs shou in step co period, fo Table I in this sec considerin service co

In this

Conclusion and Future Work

UFPE

Conclusion and Future Work •  This proposed approach allows one to compute cost of service composition taking into account complex cost behaviors •  In future work, we intend to: –  apply our approach in a real world case study –  work on simulation techniques to predict the cost of service compositions by taking into account all classes of cost behaviors –  investigate algorithms to select optimal sets of services in a service composition taking into account these classes of cost behavior.

UFPE

Questions? Robson Medeiros [email protected]

UFPE

Predicting Service Composition Costs With Complex Cost Behavior Robson Medeiros 1,2,3, Nelson Rosa1, Luís Ferreira Pires3 Federal University of Pernambuco, Brazil1 Federal Rural University of Pernambuco, Brazil2 University of Twente, Netherlands3

UFPE

Suggest Documents