Method of Adaptive Quality Control in Service Oriented Architectures

Size: px
Start display at page:

Download "Method of Adaptive Quality Control in Service Oriented Architectures"

Transcription

1 Method of Adaptve Qualty Control n Servce Orented Archtectures Tomasz Szydlo and Krzysztof Zelnsk Department of Computer Scence, AGH Unversty of Scence and Technology tomasz.szydlo@agh.edu.pl, kz@cs.agh.edu.pl Abstract. Internet era s very attractve for growng up small companes and start-ups because of smplcty of selectng servces that need to be used for composng complex applcatons. Ths model requres a novel approach to accountng and provdng Qualty of Servce defned by Servce Level Agreement. By characterzng these needs we make a proposal for servce adaptaton that can dynamcally change offered qualty wth respect to customer s preferences and budget. 1 Introducton Software systems becomng larger and far more complex than ever. At the same tme, they have to provde assured qualty and performance. What s more, tme to market s shortened sgnfcantly. Most of the bass functonaltes of modern software are reusable components that mght be shared between projects. Analyzng many projects from 2003 to 2006, IBM research has found that most of them express the same archtectural template. The result of ths fndngs s the Servce-Orented Soluton Stack (S3) [5], whch provdes a detaled archtectural defnton of an SOA across nne layers from busness process to operatonal systems layer. These layers are crossed by ntegraton, qualty of servce, nformaton archtecture and governance layers. Each of them has a logcal and physcal aspect. Logcal aspect ncludes archtectural elements, desgn decsons, where physcal aspect s related to the technology of mplementaton. Servce Level Agreement s the contract between provder and customer. SLA defnes the terms and condtons of servce qualty that provder delvers to the customers. Most mportant n SLA s the Qualty of Servce nformaton. QoS nformaton conssts of several crtera lke executon duraton, avalablty, executon tme, and many more. SLA consttutes also fnancal nformaton as a prce for usng servce, and the way n whch penaltes are compensated. Wth such an complex systems, t s not possble or t s very dffcult to analyze and tune the applcaton manually to fulfl SLA requrements. Any change can have nfluence on fnancal condton of the company because any devatons on busness agreements are needed to be compensated. Addtonally, growng up companes nsst on ncorporatng more flexble way of accountng and payment methods for servce M. Bubak et al. (Eds.): ICCS 2008, Part I, LNCS 5101, pp , Sprnger-Verlag Berln Hedelberg 2008

2 308 T. Szydlo and K. Zelnsk usage. It s very convenent, from customer pont of vew, to pont out what QoS metrcs are more mportant than the others, and what s the maxmum budget whch mght be spent for usng servce. Am of servce provder s not only to assure QoS, but dynamcally change t not to overdraft budget. We thnk that servce orented archtecture allows for buldng applcatons whch mght adapt to the changes n executon envronment. The structure of ths paper s as follows. Secton 2 dscusses related work. In Secton 3, concept of adaptve qualty control that we propose s presented. Motvatng scenaro s presented and evaluated n Secton 4. Fnally, conclusons and future work are sketched n Secton 6. 2 Related Work In ths secton, we cover related work on QoS drven adaptable archtectures and approaches. 2.1 Autonomc Computng System that s called adaptve s a one that s able to modfy tself to adapt to the changes n the envronment. System must be aware of context nformaton. Ths s done mostly by montorng modules and the mplemented sensors. As a reacton to the changes, system modfes tself through the executng modules by plenty of effectors. Plannng and evaluatng what to do when changes are notced s descrbed by adaptaton logc. Ths approach s nvestgated further, but t derved from Autonomc Computng that has been started by IBM n Man goal s to create self-management systems to overcome growng complexty and to reduce effort of mantenance. Fg. 1. Montor-Analyze-Plan-Execute loop In Autonomc System, operator does not nfluence system drectly, but defnes general polces, whch defnes system behavours. IBM has defned the followng four areas of usage: Self-confguraton s an autonomc confguraton of components; Self-healng automatcally dscovers and corrects faults; Self-optmzaton automatcally montors and controls of resources to ensure good functonng wth respect to defned requrements; Self-protecton s an ablty to dentfy and protect system from attacks.

3 Method of Adaptve Qualty Control n Servce Orented Archtectures 309 Adaptaton process mght be dvded nto to orthogonal aspects: Behavoural versus archtectural adaptablty. Adaptaton s behavoural when the behavour of the servce can be modfed wthout modfyng ts structure. Ths s done by tunng up some parameters. In contrast, archtectural adaptablty takes place when the structure of the system s modfed by means e.g. of swtchng between nstances of the servce. Run-tme versus desgn-tme adaptaton. Adaptaton actons may be executed at run-tme or at desgn-tme. The adaptaton s run-tme when t can be performed durng executon, and desgn-tme s when selecton of servces s done on the desgnng stage. 2.2 QoS Frameworks Several approaches have been proposed for QoS drven servce selecton. Zeng [4] consders servce selecton as an global optmzaton problem usng lnear programmng. Target functon that s optmsed s a lnear combnaton of QoS metrcs. Smlar approaches ncorporates modfed Djkstra s algorthm [7], constrant programmng logc or a knapsack problem. That approach s only applcable n desgn tme adaptaton because t does not recalculate soluton durng composte servce executon. We share Kokash [6] opnon that qualty of these solutons depends strongly on the user weghts for each QoS metrc that s not trval to establsh them n the rght way. Abdelzaher et al. [8] shows how control-theoretc approach can be used to acheve qualty of servce guarantees. They demonstrate that a software system can be approxmated by a lnearzed model and controlled by actuators and sensors. 3 Concept of Adaptve Qualty Control Analyss of exstng frameworks n terms of QoS unvels that ths term s used nterchangeably for descrbng qualty from provder pont of vew as well as from clent pont of vew. We have decded to dstngush Qualty of Experence from Qualty of Servce. Fg. 2. Dfferent ways of percevng qualty QoS s the qualty of provded servces; QoE s the observed qualty by customer. The dea s presented n Fg. 2. It s very common that these values are completely dfferent. Let us thnk of calculatng balance account on the end of month. Accountng servce whch we are usng s 99,9% avalable but, once a month s dsabled for mantenance for 1 hour. If we are accessng ths servce durng ths hour, from our pont of vew, ts avalablty would be 0,0%. When we assume that QoS s a vector of values for a gven metrcs, QoE s defned as:

4 310 T. Szydlo and K. Zelnsk QoE = QoS n = 1 n t 1 for n where n s the number of nvokes of composte servce and t s the tme when nvocaton takes place. It makes us to thnk of montorng QoE and on that bass adapt composte servce to fulfl requrements of an agreement. Further research led us to the dea of QoS controller, depcted n Fg. 3 that would be responsble for provdng desred QoE descrbed by SLA. Servce orented archtecture decomposes composte servce nto set of nter-workng smple base servces. Set of servces wth the same functonalty wll be called abstract servce. Durng nvocaton of composte servce, we can exchange smple servce by any that belongs to the same abstract servce set. We can thnk of ths dea as of an nterface and the class that mplements t. Fg. 3. Control loop In our work we dstngush four knd of servces: Abstract Servce (S ). Servce, whch s descrbed by ts functonalty but nstance s not ponted out; Servce (I k ). Servce s a functonalty provded by provder; Abstract composte servce (S). Composte servce that contans at least one abstract servce; Composte servce (C). Composte servce that mght be executed because all of ts base servces are nstances. Composte abstract servce conssts of several abstract servces S { S S.., } 1 2 k each havng several nstances S { I, I,.., I } =, 1, 2 =. In ths work, we are assumng that servces S are executed sequentally. Ths s very strong assumpton and applcable only for smple servces, but problem of evaluatng concurrent servces [3] wth structured actvtes s out of scope of ths paper. However, dea of QoS controller elaborated later s applcable for ths type of composte servces as well. To make a good use of servce adaptaton, we have to collect hstory of prevous nvocatons of base servces. Takng nto account these data, we can envsage more or less accurately the qualty of nvocaton. Analyzng t deeper we have fgured out, that qualty of provded servce s strctly related to context of executon envronment. Due to ths fact, one can use servces located on the globe where currently nght s hence, servers are not overloaded. S n

5 Method of Adaptve Qualty Control n Servce Orented Archtectures 311 Assumng that we have a hstory of I k nvocatons, expected qualty of further nvocatons mght be calculated usng regresson analyss. In the smplest case, t can be smple movng average. Before any assumptons about expected qualty, we can ask base servce provder of executon envronment context and on that bass we can analyse only subset of the nvocaton hstory where the context nformaton was the same. 3.1 Qualty of Servce Metrcs Qualtes of Servce attrbutes nclude metrcs lke throughput, response tme, avalablty but exact defnton and measurement process must be well defned to gve consumer and provder common understandng. As for descrbng Web servce s functonal aspects WSDL language has been defned, there s no unversal language for descrbng metrcs and the way of measurng t. Moreover, many of the well-known metrcs lke avalablty do not have formal defnton. For example avalablty mght be descrbed as percentle value, or the number of postve nvocatons durng last 50 nvocatons, or the avalablty durng last hour. Metrcs are not only applcable for smple servces, but also for composte ones so for each metrc must be provded algorthm for calculatng values for a servce composton [1]. In ths paper we are consderng only servces nvocated n a sequence. We can dstngush metrcs to the quanttatve ones that have numercal values or mght be descrbed by values and the qualtatve ones that are descrbed n words. Nevertheless, for any metrc must be provded an equaton or algorthm to recalculate t to <0;1> range. QoS s a vector of values for a gven metrcs. If servce a s better then servce b from a gven metrc pont of vew, means that metrc value of servce a s greater than value for servce b. In the other case, for evaluatng we have to use nversons of the metrc values. 3.2 QoS Controller We have desgned a QoS controller, whch contnuously montors devaton of current user QoE from agreed SLA, and on that bass, servce QoS s tuned by selectng servce nstances that need to be nvoked. Devaton of provded qualty of servce s descrbed as follows: Δ QoS = QoESLA QoE Before executon of abstract servce, t s decded whch nstance to nvoke. Decson process takes nto account servces already nvoked, correcton from feedback loop, and nfluence of each abstract servce nstance on possble overall qualty. Number of total nvocaton possbltes s S, but only when none of = 1.. n abstract servces was nvoked untl now. Assumng that servces S 1,..,S k were nvoked, total number p of possble nvocatons s S. Before nvocaton of any base = k n servce, all possble nvocatons are evaluated as presented n Fg. 4. For the servces that have not been nvoked yet, mean value I k from hstorcal nvocatons s used for calculatng QoS of ths composton. From the set {C1,..,Cp} of possble nvocatons, we are selectng one that fulfls:

6 312 T. Szydlo and K. Zelnsk sgn Fg. 4. Executon model ( QoS( C ) ) QoE = sgn( ΔQoS ) x It guarantes that f any of the metrcs value n SLA s greater than n QoE, composte servce wll be selected wth QoS contanng that metrc large enough to balance dfference, and analogcally small enough when metrcs value n SLA s less then n QoE. 3.3 Varable QoS Provdng contracted qualty of servce s very compettve task, as well as, provdng servce wth varable qualty that do not exceed specfed budget. Our dea s to estmate the number of nvocatons to the end of accountng perod basng on the number of nvocatons untl now. Havng ths nformaton and the amount of money whch left to spend, we can change the offer to the cheaper one. Customer has prortes what sorts of metrcs are more mportant then others. Provdng exact weghts of each metrc s mult dmensonal decson problem and t s not a trval task. We have found that decomposng problem of assgnng weghts makes t easer to deal wth. Analytc Herarchy Process [2] s a technque based on mathematcs and human psychology for prortzng elements of decson problem. For each par of metrcs user specfes whch one s preferred n the form of fracton between 1/9 and 9/1. The result of AHP s a vector of weghts w for earch metrc. We wll be referrng to ftness factor of QoS wth addtonal nformaton of metrcs mportance as: ftness ( QoS ) = w QoS Customer chooses set of SLA n whch s nterested. After estmatng cost per sngle nvoke, system choose the SLA wth the best ftness and the prce per nvoke less than calculated. 3.4 Servce Level Agreement Clent agreement s represented as tuple: ( QoE, prce, penaltes tme) SLA = SLA, where QoE s the qualty of user experence, prce s the amount of money whch clent has to pay for each servce nvoke, and penaltes s the prce whch provder wll pay n the case of any devaton of QoE, and tme s the accountng perod. Prce for usng servce S s defned as follow:

7 Method of Adaptve Qualty Control n Servce Orented Archtectures 313 bll = n* prce mssed * penaltes mssed = max ( : ( QoESLA QoE ) n) 0, f QoE QoE, f QoE < QoE SLA SLA where n s the number of nvocatons. Accountng algorthm mght be llustrated by smple example. Let us say that avalablty agreed by SLA s 50%, and on the end of month, on 20 nvokes, only 6 was successful. It means that customer was overcharged unfarly for 4 nvokes whch has to be compensated. It s a company poltc whch defnes how value of prce s related to value of penaltes. Accountng for varable QoS s qute dfferent because clent agreement s represented as a set of SLAs and the metrcs weghts calculated usng AHP from preferences set: ( preferences, { SLA1,.., SLA } budget) SLA l, var = System dynamcally changes SLA to assure that bll wll not be greater then budget. On every accountng perod, clent s charged ndependently for every SLA contract but total sum s not grater than budget. Clent s elgble to receve compensaton f any of SLAs s volated. 4 Motvatng Scenaro Let us assume that we have Internet webste that provde nformaton for amateur plots and we want to nclude very accurate weather forecast for nearest arports on the man ste. Composte servce conssts of two base servces.e. servce whch takes cty name on nput and returns arports n the near proxmty, and the second servce that takes name of the places and returns weather forecast. We have to defne the metrc for descrbng qualty of provded data. Moreover, our portal s a growng up busness hence, we have lmted budget to mantan system, so we do not lke to spend more than assumed prce for the servce. For ths type of servce, t s better from customer pont of vew, to acheve very accurate data than has hgh avalablty of poor nformaton. To verfy our concepts we have developed smulaton envronment that s flexble enough to mplement dfferent adaptaton strateges. 4.1 Metrcs We have assumpton that base servces are nvoked n a sequence. Below are descrbed metrcs used n ths example scenaro and algorthms for calculatng values for composte servces. Avalablty. Avalablty s the probablty that servce s accessble. For our composte servce, avalablty s the product of avalabltes of the base servces. Executon tme. Executon tme s the tme between nvocatng servce, and the tme of recevng response. For composte servce, executon tme s the sum of executon tme of each base servce. Data Qualty. For ths example we have provded Data Qualty metrc whch defnes the qualty of receved data. Data qualty means smply the accuracy n klometres of

8 314 T. Szydlo and K. Zelnsk weather nformaton. Value of ths metrc for composte servce s the mnmum value of the base servces. As t was mentoned before, our servce s very specfc, so customer has to decde what s more mportant and what s not: avalablty s three tmes as mportant as executon_tme; avalablty s fve tmes less mportant than data_qualty; executon_tme s fve tmes less mportant than data_qualty. Fg. 5. Evaluated metrcs weghts Results of metrc weghts evaluaton wth AHP are presented n Fg. 5. Customer agreed to use three SLA. Each contract has the same data qualty metrcs, but dffers n response tme and avalablty. In the table below, contracts are lsted n the order wth respect to metrcs weghts. Table 1. SLA contracts SLA Prce per 100 nvocatons Response tme [ms] Avalablty Data qualty [km] , , , , , Evaluaton Customer notced that hs webste gets three thousands vsts per month. As the webste become more popular, number of nvocatons may sgnfcantly ncrease. In ths stuaton clent has decded to buy servce wth varable QoS and wth maxmum budget of 30. Detaled statstc of user nvocatons s presented n Fg. 6. Larger number of page vsts durng thrd week we can explan that there was natonal flyng contest. Total number of nvocatons was not as expected three thousands but almost fve thousands. Durng the month, system tred to estmate number of nvocatons untl the end of an accountng perod and ths s depcted n Fg. 7. Because number of nvocatons was greater then expected, system has to swtch SLA, to makes the total sum less than assumed 30. We can notce that on 14th day system has decded to swtch SLA one down, but ncreased number of vsts stayed for three days, so system has decded to swtch one more down. Web ste traffc started comng back to normal state, so system come back to the best SLA as depcted n Fg. 8.

9 Method of Adaptve Qualty Control n Servce Orented Archtectures 315 To calculate expected number of nvocatons to the end of the month, system estmated t on the movng average bass from the last 7 days, and mean number of vsts per day s multply by the number of days to the end. nvocatons/day day nvocatons day Estmated number of nvocatons Real number of nvocatons Fg. 6. Number of nvocatons per day Fg. 7. Estmatng number of nvocatons to the end of the month SLA 2 1 prce day day Varable QOS Constant QOS Fg. 8. Selected SLA Fg. 9. Partal bll 0,95 0,9 0,85 avalablty 0,8 0,75 0,7 0,65 0, nvocatons Avalablty Fg. 10. Convergence of avalablty SLA has been changed several tmes durng accountng perod hence, QoS metrcs had to convergence to the values contracted n selected SLA. One can notce that convergence schema n Fg. 10 s very smlar to the one known from the control theory. 4.3 Dscusson Wthout varable QoS, customer would be asked to pay 50, whch s a lot more than assured 30. Wth varable QoS actvated, system s able to encompass busy week on

10 316 T. Szydlo and K. Zelnsk the web ste. As t has been stated n contracted SLAs, data qualty was the same durng the whole month, but avalablty and response tme have changed as many tmes as SLA has changed. In Fg. 9 we can fnd partal bll durng the whole month. The proposed approach does not take nto account devatons caused by nternet connectons. Possble extenson to ncorporate t s to desgn remote nvocaton montorng whch would be deployed at the customer sde. Secondly, accountng method mght be unfar, especally when number of composte servce nvocaton s very low or when nvocatons are not equally spread over the accountng perod. 5 Concluson In ths paper, we have presented novel approach to managng composte servces. Wth the growng popularty of the Internet, provdng servces wth guaranteed QoS has become ncreasngly mportant. Our algorthm ntegrates statstcal methods for predctng qualty of servce for composte servces nvocatons, as well as, automatc adaptaton strateges to keep consumer s budget by changng SLA durng executon. Presented case study verfed usablty of our method. Many remanng ssues are worth further research. The most nterestng s how ths model behaves n real applcatons. Another nterestng aspect s how to mprove accountng algorthm to prevent unfar charges. Fnally, further examples, expermental tests and practcal experence are needed to fnd true potental of applyng adaptve qualty control to dfferent class of composte servces. Ths remans an mportant focus for our future research. References 1. Menascé, D.A.: Composng Web Servces: A QoS Vew. IEEE Internet Computng 8(6), (2004) 2. Forman, E.H., Selly, M.A.: Decson By Objectves How To Convnce Others That You Are Rght. World Scentfc Publshng Co. Pte. Ltd., Sngapore (2001) 3. Cardoso, J., Sheth, A.P., Mller, J.A., Arnold, J., Kochut, K.: Qualty of servce for workflows and web servce processes. J. Web Sem. 1(3), (2004) 4. Zeng, L., Benatallah, B., Ngu, A.H.H., Dumas, M., Kalagnanam, J., Chang, H.: QoS-Aware Mddleware for Web Servces Composton. IEEE Transactons on Software Engneerng 30(5), (2004) 5. Arsanjan, A., Zhang, L.-J., Ells, M., Allam, A., Channabasavaah, K.: S3: A Servce- Orented Reference Archtecture. IT Professonal 9(3), (2007) 6. Kokash, N.: A Servce Selecton Model to Improve Composton Relablty. In: Proc. Proceedngs of the Internatonal Workshop on AI for Servce Composton (2006) 7. Gu, X., Nahrstedt, K., Chang, H., Ward, C.: QoS-Assured Servce Composton n Managed Servce Overlay Networks. In: Proc. ICDCS 03: Proceedngs of the 23rd Internatonal Conference on Dstrbuted Computng Systems, Washngton, DC, USA, p. 194 (2003) 8. Abdelzaher, T., Stankovc, J., Lu, C., Zhang, R., Lu, Y.: Feedback performance control n software servces. Control Systems Magazne, 23(3), (2003)