An Efficient Component Based Software Architecture Model Using Hybrid PSO CS Algorithm

Size: px
Start display at page:

Download "An Efficient Component Based Software Architecture Model Using Hybrid PSO CS Algorithm"

Transcription

1 46 An Effcent Component Based Software Archtecture Model Usng Hybrd PSO CS Algorthm Prashanth Kumar Bolsetty *, Prasanth Yalla 2 Shnas College of Technology, Oman 2 KL Unversty, Inda *Correspondng author s Emal: bprashanthkumar0779@gmal.com Abstract: The Software archtecture s generated by usng the nterfaces and structural components of the software systems n an organzaton. Software archtecture, along wth the structure and behavor, also concerned wth functonalty, performance, reuse, economc and technologcal constrants etc. In software ts components are related to one another n large varety of ways. The man ntenson of our research s to buld the component based software archtecture wth adaptve confguratons usng Partcle Swarm Optmzaton and clusterng technques. Buldng archtecture s an nsprng progresson. In ths paper, we wll propose Hybrd Partcle Swarm Optmzaton (PSO) Cuckoo Search (CS) algorthm for developng an adaptve software archtecture based on the Process control model. Intally, the components are selected based on testcases generated. After that, adaptve archtecture wll be bult by usng PSO - CS on the bass of clusterng results. The archtecture s bult along wth ts functonal requrements, responsblty and evaluaton. The functonal requrements are gven as graphs of functonal responsbltes where modfablty, effcency and traceablty are consdered as the qualty attrbutes. The proposed method produced soluton wth ncreased qualty and better metrc values. Keywords: Component archtecture; Relablty; Computatonal tme; hybrd Partcle swarm optmzaton; cuckoo search. Introducton Durng the past decade, self-adaptaton has progressvely become a fundamental concern n the engneerng of software systems. Ths helps to reduce the hgh costs of software mantenance and evoluton and to regulate the satsfacton of functonal and extra-functonal requrements under varyng condtons. Even wth wde nvestgaton of adaptaton mechansms n the engneerng of dynamc software systems, ther applcaton to real problems s stll lmted due to lack of methods for valdaton and verfcaton of complex, adaptve, nonlnear applcatons []. A major challenge n self-adaptve systems one has to face s to provde guarantees about the requred runtme qualtes. A self-adaptve system comprses of two parts: the managed system that deals wth the doman functonalty and the managng system that montors the managed system. Ths s adapted to acheve partcular qualty objectves. The man underlyng dea behnd self-adaptaton s complexty management through separaton of concerns [2]. The Dynamc adaptve systems capabltes nclude automotve systems, telecommuncaton systems, envronmental montorng, and power grd management systems. It s to be enabled to tolerate a range of envronmental condtons and contexts, but the exact nature of these contexts remans vague [3]. The need for adaptablty arses more at the wreless edge of the Internet, where moble devces balance several conflctng and possbly cross-cuttng concerns, ncludng qualty of servce on wreless connectons, changng securty polces, and energy consumpton. An adaptaton can be termed safe f () t does not volate dependency relatonshps and (2) f t does not nterrupt communcaton ether wthn a component or between components that would potentally yeld erroneous or unexpected results. If adaptve software mechansms are not grounded n formalsms that codfy nvarants and other propertes that t must hold durng decomposton, Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 DOI: /jes

2 47 the resultng systems wll be prone to errant behavor [4]. Software archtecture desgn s of supreme mportance to the software development lfe-cycle and s used to represent and communcate the system structure and behavor to all of a system s stakeholders. In addton to ths, archtecture can facltate stakeholders n understandng archtecture desgn decsons and desgn ratonale, further promotng a communcaton and understandng, reuse and effcent evoluton [5]. Software archtecture (SA) s gven great mportance to the software development lfe-cycle whch s used to represent and communcate the system structure and behavor to all of ts stakeholders wth varous concerns. Addtonally, SA facltates stakeholders to understand desgn decsons and ratonale, thereby promotng reuse and effcent evoluton. One of the major ssues to be tackled n software systems development today s systematc SA restructurng to accommodate new requrements due to the new market opportuntes, technologes, platforms and frameworks [6]. The ultmate goal of software engneerng s to enable automatcally produce software systems based on ther requrements. At present, we pass the synthess of executable programs, and concentrate on the automated dervaton of archtectural desgns of software systems. Ths s made possble because archtectural desgn largely means the applcaton of known standard solutons n a combnaton that optmzes the qualty propertes of the software system [7]. The software archtecture of a system s the set of structures needed to reason about the system, whch comprses software elements, relatons among them, and propertes of both. The term also refers to documentaton of a system's software archtecture. Documentng software archtecture facltates communcaton between stakeholders, documents early decsons about hgh-level desgn, and allows the reuse of desgn components and patterns between projects [8]. Software programmng s a hard desgn task, manly due to the complexty nvolved n the process. Nowadays ths complexty s ncreasng to levels n whch reuse of prevous software desgns are very useful to short cut the development tme [9]. The varous benefts of the software archtectng are as gven below Archtectng helps manage complexty. Archtectng ensures archtectural ntegrty. Archtectng reduces mantenance costs. Archtectng provdes a bass for reuse [0]. The major desgn task n buldng enterprse applcatons s to desgn good software archtecture. Durng recent years, the noton of software archtecture has emerged as the approprate level for dealng wth software qualty. One of the major ssues n software systems development today s qualty. A qualty attrbute s a nonfunctonal characterstc of a component or a system []. Software must possess the qualtes lke Safety, Relablty, Avalablty, Cost, Mantanablty, Performance or Response, Tme, Energy consumpton [2]. There are some recent attempts to establsh software scence as a foundaton of software engneerng. Ths may promote more analytcal reasonng about software archtecture, f t becomes popular. Software archtectural desgn would beneft from analytcal reasonng wth scentfc foundatons. Importance of software archtecture n the software desgn process s generally accepted among practtoners [3]. The rest of the paper s organzed as follows: Secton 2 gves a bref dscusson on varous recent researches done on the software desgn feld. Secton 3 explans about the proposed technque for software archtecture usng HPSO. Secton 4 gves the detaled explanaton about the results obtaned and the secton 5 concludes our proposed methodology. 2. Related Research Archtecture-based management approaches promote the use of archtectural models. They serve as gudelnes for varous management functons. Some of the recent research works done by the researchers are gven n ths secton Over the past decade the dynamc capabltes of self-adaptve software-ntensve systems have prolferated and mproved sgnfcantly. To advance the feld of self-adaptve and self-managng systems further and to leverage the benefts of selfadaptaton, there was a need to develop methods and tools to assess and possbly certfy adaptaton propertes of self-adaptve systems, not only at desgn tme but also, and especally, at run-tme. N. M. Vllegas et al [] proposed a framework for evaluatng qualty-drven self-adaptve software systems. Ther framework was based on a survey of self-adaptve system papers and a set of adaptaton propertes derved from control theory propertes. They also establshed a mappng between those propertes and software qualty attrbutes. Thus, correspondng software qualty metrcs can then be used to assess adaptaton propertes. Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 DOI: /jes

3 48 Software valdaton and verfcaton (V&V) ensures that software products satsfy user requrements and meet ther expected qualty attrbutes throughout ther lfecycle. Whle hgh levels of adaptaton and autonomy provde new ways for software systems to operate n hghly dynamc envronments, developng certfable V&V methods for guaranteeng the achevement of selfadaptve software goals s one of the major challenges facng the entre research feld. G. Tamura et al. [4] proposed a paper n whch they have () analyzed fundamental challenges and concerns for the development of V&V methods and technques that provde certfable trust n selfadaptve and self-managng systems; and () presented a proposal for ncludng V&V operatons explctly n feedback loops for ensurng the achevement of software self-adaptaton goals. Both of those contrbutons provde valuable startng ponts for V&V researchers to help advance ths feld. Self-adaptaton has been wdely recognzed as an effectve approach to deal wth the ncreasng complexty and dynamcty of modern software systems. One major challenge n self-adaptve systems was to provde guarantees about the requred runtme qualtes, such as performance and relablty. Exstng research employs formal methods ether to provde guarantees about the desgn of self-adaptve systems, or to perform runtme analyss supportng adaptatons for partcular qualty goals. Yet, work products of formalzaton were not exploted over dfferent phases of the software lfe cycle. D. Weyns [2] proposed a paper, n whch they have argued for an ntegrated formally founded approach to valdate the requred software qualtes of self-adaptve systems. That approach ntegrated three actvtes: () model checkng of the behavor of a self-adaptve system durng desgn, (2) model-based testng of the concrete mplementaton durng development, and (3) runtme dagnoss after system deployment. They have llustrated that approach wth excerpts of an ntal study and dscuss for each actvty research challenges ahead. Qualty of software s one of the major ssues n software ntensve systems and t s mportant to analyze t as early as possble. An ncreasngly mportant qualty attrbute of complex software systems s adaptablty. Software archtecture for adaptve software systems should be flexble enough to allow components to change ther behavors dependng upon the envronmental and stakeholders' changes and goals of the system. Evaluatng adaptablty at software archtecture level to dentfy Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 the weaknesses of the archtecture and further to mprove adaptablty of the archtecture are very mportant tasks for software archtects today. P. Tarvanen [5] proposed an Adaptablty Evaluaton Method (AEM) that defnes, before system mplementaton, how adaptablty requrements can be negotated and mapped to the archtecture, how they can be represented n archtectural models, and how the archtecture can be evaluated and analyzed n order to valdate whether or not the requrements are met. AEM flls the gap from requrements engneerng to evaluaton and provdes an approach for adaptablty evaluaton at the software archtecture level. In that paper AEM was descrbed and valdated wth a real-world wreless envronment control system. Furthermore, adaptablty aspects, role of qualty attrbutes, and dversty of adaptablty defntons at software archtecture level are dscussed. Over a perod of some 20 years, dfferent aspects of co-management (the sharng of power and responsblty between the government and local resource users) have come to the forefront. F. Berkes [6] proposed a paper whch focused on a selecton of these: knowledge generaton, brdgng organzatons, socal learnng, and the emergence of adaptve co-management. Co-management can be consdered a knowledge partnershp. Dfferent levels of organzaton, from local to nternatonal, have comparatve advantages n the generaton and moblzaton of knowledge acqured at dfferent scales. Brdgng organzatons provde a forum for the nteracton of these dfferent knds of knowledge, and the coordnaton of other tasks that enable cooperaton: accessng resources, brngng together dfferent actors, buldng trust, resolvng conflct, and networkng. Socal learnng was one of those tasks, essental both for the co-operaton of partners and an outcome of the co-operaton of partners. It occurs most effcently through jont problem solvng and reflecton wthn learnng networks. Through successve rounds of learnng and problem solvng, learnng networks can ncorporate new knowledge to deal wth problems at ncreasngly larger scales, wth the result that maturng comanagement arrangements become adaptve comanagement n tme. 3. Component Archtecture for Software Adapton If archtecture can be termed as the set of plan resolutons, then textng the archtecture reduces the documentaton of the collecton of plan resolutons. However, ths does not appear to be practcal. Our DOI: /jes

4 49 general poston s to get at the outcome of the plan resolutons, wth the results selected, but the logc behnd them s naccessble. Most of the logc behnd the solutons generally vanshes for good, or s stored only n the brans of the few people lnked wth them, f they are stll around. Therefore, the logc behnd a soluton s not acqured defntely. But t s mpled data, ndspensable for the soluton selected, but not recorded. The data contanng the pros and cons of software structural desgn and ts background s called Archtectural Knowledge and has caused a standard modfcaton n the software archtecture communty. The most sgnfcant knd of AK s archtectural decsons, whch moulds software archtecture. Supplementary knds of AK s comprsed of notons from archtectural plan, needs engneerng, people and the growth actvty. Software archtecture s normally the structure of modules n a program or system, ther nter relatons, and the doctrnes and plan strateges. They help to manage the plan and growth n due course. 3.. Proposed Methodology for Software Archtecture Our research work ntends to buld the component based software archtecture wth adaptve confguratons usng Partcle Swarm Optmzaton and clusterng technques. Snce Buldng archtecture s an nsprng progresson, n ths paper, we wll propose Hybrd Partcle Swarm Optmzaton (PSO) Cuckoo Search (CS) algorthm. Ths s used for developng an adaptve software archtecture based on the Process control model. In the ntal stage, the components selecton s done based on test cases. Subsequently, adaptve archtecture wll be bult usng PSO - CS on the bass of clusterng results. The archtecture buldng s enabled wth ts functonal requrements, responsblty and evaluaton. The basc block dagram of our proposed component based software archtecture model s shown n the fgure below: Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 Fgure. Flow dagram of our proposed method 3.2. Component Optmzaton wth the Ad of HPSO PSO desgnng was done on the bass of the socal behavor of brds n a flock. In PSO, each partcle soars n the exploraton space wth a velocty adjusted by ts own flyng memory and also by ts companon s flyng experence. It s a ftness functon whch determnes the task value of each partcle. PSO s an evolutonary algorthm whch s very smlar to that of the Genetc Algorthm. Here a partcular scheme s ntated by consderng a populaton of arbtrary soluton. Here we have ncorporated the Cuckoo Search algorthm nto PSO whch helps to obtan better optmzaton result than n normal PSO. In HPSO along wth each soluton, arbtrary velocty s also assgned. Ths forms a partcle whch montors ts coordnates n the problem space n assocaton wth the best soluton. For the remanng process to be executed, the ftness value remans the major consderaton. Ths s referred to as pbest, whereas Gbest n HPSO refers to the locaton of the above soluton. The HPSO thus provdes better soluton and the steps nvolved are gven n the below secton. Hosptal management applcaton s the applcaton DOI: /jes

5 50 used n our proposed method. The test cases generated from ths nput s appled to the HPSO for optmzaton. It s through whch the optmzed components are selected Steps n Hybrd Partcle Swarm Optmzaton The varous steps nvolved for mplementng the HPSO s explaned below, Frst ntate a populaton of elements (solutons) wth poston and velocty chosen randomly for n-varable n the problem space. For each of these arbtrarly created elements estmate the ftness functons n n- varables. Now compare ths ftness value wth the partcles pbest value. If these recent ftness value s mproved than the pbest then chose the current ftness value as the pbest for the further processng. These ftness values s weghed aganst the overall fnest precedng values and f the current value s better then update the gbest for the current partcles array ndex and value as the new gbest. The poston and velocty of the partcle are assorted and then repeat the steps untl the crteron of better ftness s obtaned. Updaton of velocty and the poston of the partcle s performed by utlzng the equatons gven below, x ( t ) x ( t) a k ( d ( t) p ( t)) 2 2 ' a k ( d ( t) p ( t)) p ( t ) p ( t) x ( t ) () (2) Here a and a2 represents the acceleraton constants that s needed for combnng each partcle wth the pbest and gbest. Updatng the best poston of the partcle can be gven as per the equaton below, d( t), f ( p ( t )) f ( d( t)) d ( t ) p ( t ), f ( p ( t )) f ( d( t)) (3) The ftness of the soluton s estmated usng the equaton mentoned above and the better soluton are selected based on these ftness values. The obtaned solutons from the PSO are then gven as nput to the cuckoo search algorthm norder to optmze the soluton further. The optmzed soluton from PSO wll be the nput for cuckoo whch s further processed Cuckoo Search Algorthm The cuckoo search algorthm represents a bologcally nspred algorthm. Its orgn can be dated back to the breedng conduct of the cuckoos and t s easy to mplement. Each egg sgnfes a soluton and an egg of a cuckoo corresponds to a novel soluton. The novel and superor soluton replaces the worst soluton n the nest. The varous steps that are nvolved n the modfed cuckoo search algorthm s explaned brefly n the below steps, Step : Intalzaton Phase The populaton (P, where =, 2, N) of host nest s ntalzed at random. Step 2: Generatng New Cuckoo Phase Wth the help of the levy flghts a cuckoo s selected randomly whch generates novel solutons. Subsequently, the engendered cuckoo s evaluated by employng the objectve functon for ascertanng the excellence of the solutons. Step 3: Ftness Evaluaton Phase The ftness functon s evaluated n accordance wth Equatons 4 and 5 shown hereunder, followed by the selecton of the best one. PC Fm (4) pn ftness max mum popularty F m (5) Where, P - sgnfes the selected populaton C PN - represents the total populaton Step 4: Updaton Phase At the begnnng, the soluton s optmzed by the levy flghts by employng the cosne transform. The superorty of the fresh soluton s estmated and a nest s chosen at random among them. If the superorty of new soluton n the elected nest s advanced to the prevous soluton, t s restored by the new soluton (Cuckoo). Otherwse, the precedng soluton s consdered as the fnest soluton. The levy flghts employed for the general cuckoo search algorthm s expressed by the Equaton 6 shown below: * ( n ) ( n) Lf Lf Lf Lvy( N) (6) Step 5: Reject Worst Nest Phase In ths secton, the worst nests are unobserved, consderng ther possblty values and fresh ones are created. Consequently, based upon ther ftness functon the best solutons are ranked. Thereafter, the best solutons are dstngushed and marked as optmal solutons. Step 6: Stoppng Crteron Phase The above process s repeated untl the best soluton s reached based on the termnaton crtera. 4. Result and Dscusson Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 DOI: /jes

6 5 In our expermental procedure, we have utlzed the Partcle swarm optmzaton for the software archtecture. The mplementaton s done n the JAVA platform and the results are gven as follows. The hosptal management system s utlzed n our proposed method as the source software and the nput to our proposed system s the hosptal management applcaton. From the Hosptal management system, the test cases are extracted and the components are optmzed. The test cases nvolved are from a number of derved classes. Our analyzed components are coupled wth devce, couplng of object, cost, relablty and popularty. It s on the bass of the ftness value of the parameter chosen that the whole process labors n Hybrd Partcle Swarm optmzaton. For the purpose of addtonal processng, the parameter wth hgh ftness value s chosen. For both Partcle Swarm optmzaton and Genetc Algorthm, the ftness values of the chromosomes are computed. For dssmlar teraton the results are charted. Whle vewng Table t can be confrmed that the ftness value for the suggested technque verfed s superor to the technque where there s GA applcaton. Table. Ftness value between HPSO, Conventonal PSO and GA for each teraton. Ftness value Iteratons Proposed method usng PSO Usng GA HPSO For the above table the correspondng graphcal representaton s shown n the below fgure 2. From the graph t s clear that our proposed method has delvered better outcome n terms of ftness when compared to conventonal PSO and GA Fgure.2 Comparson of Ftness value between HPSO, Conventonal PSO and GA The computatonal tme s well thought-out as the most mportant ssue n software archtecture as made cleared n the precedng secton. The computatonal tme for the software archtecture plan based on the chosen test cases by means of HPSO are computed and the resultng values are charted. The smlar evaluaton for exstng algorthms lke PSO and GA are also tabulated norder to compare our proposed system performance. The sgnfcances of the computaton tme we attaned for dfferent test cases are shown n Table 2. Table 2. Computatonal tme for HPSO, Conventonal PSO and GA for varous optmal testcases Optmal Test Computatonal tme Cases HPSO PSO GA The graph s desgned for computatonal tme for optmal test cases based on the values shown n above table. Usng HPSO, PSO and GA the graphcal representaton of computatonal tme for our suggested method are compared whch s shown n fgure 3. As shown n the graph, the computatonal tme for PSO has been less sgnfcant when match up to that of GA. Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 DOI: /jes

7 52 Fgure.3 Comparson of Computatonal Tme for HPSO, PSO and GA 5. Concluson In ths paper, we have proposed Hybrd Partcle Swarm Optmzaton (PSO) Cuckoo Search (CS) algorthm for developng an adaptve software archtecture based on the Process control model. Intally, the components were clustered based on an effcent clusterng algorthm. After that, adaptve archtecture would be bult by usng PSO - CS on the bass of clusterng results. The archtecture was bult along wth ts functonal requrements, responsblty and evaluaton. The results showed that our proposed method had delvered better results n terms of test case optmzaton values when compared to other optmzaton technques lke conventonal Partcle Swarm Optmzaton (PSO) and Genetc Algorthm (GA). In future, we have planned to mprove the computatonal tme by employng alternate optmzaton technques and also varous other archtectural parameters could be consdered whch can ad n better archtecture of software. Reference [] N. M. Vllegas, G. Tamura, and R. Casallas, A Framework for Evaluatng Qualty-Drven Self- Adaptve Software Systems, In Proc. of the 6th Internatonal Symposum on Software Engneerng for Adaptve and Self-Managng Systems, pp , 20. [2] D. Weyns, Towards an Integrated Approach for Valdatng Qualtes of Self-Adaptve Systems, In Proc. of the 0th Internatonal Workshop on Dynamc Analyss, Mnneapols, MN, pp , 202. [3] J. Whttle, P. Sawyer, N. Bencomo, B. H. C. Chengy and J. M. Bruel, ELAX: Incorporatng Uncertanty nto the Specfcaton of Self-Adaptve Systems, In Proc. of the 7th IEEE Internatonal Requrements Engneerng Conference, pp , [4] J. Zhang, B. H. C. Cheng, Z. Yang, and P. K. McKnley, Enablng Safe Dynamc Component- Based Software Adaptaton, Archtectng Dependable Systems III, pp. 94 2, [5] A. Tang, P. Avgerou, A. Jansen, R. Caplla, and M. A. Babar, A comparatve study of archtecture knowledge management tools, The Journal of Systems and Software, Vol. 88, No. 3, pp , [6] L. Dobrca, A. D. Ionţa, R. Petraru And A. Olteanu, Automatc Transformaton Of Software Archtecture Models, U.P.B. Sc. Bull, Seres C, Vol. 73, No. 3, pp. 3-6, 20. [7] O. Raha, E. Maknen and T. Poranen, Usng Smulated Annealng for Producng Software Archtectures, Thess, Department Of Computer Scences, Unversty Of Tampere, pp , Apr [8] T. Ludk, J. Navratl, and A. Langerova, Process Orented Archtecture for Emergency Scenaros n the Czech Republc, World Academy of Scence, Engneerng and Technology, Vol. 59, pp , 20. [9] A. Sharma, R. Kumar, and P. S. Grover, A Crtcal Survey of Reusablty Aspects for Component-Based Systems, World Academy of Scence, Engneerng and Technology, Vol. 9, pp. 4-45, [0] P. Eeles, Software Archtecture Masterclass, In. proc. of IBM Ratonal Software Conference, [] H. Gumuskaya, Core Issues Affectng Software Archtecture n Enterprse Projects, World Academy of Scence, Engneerng and Technology, Vol. 9, pp , [2] I. Meedenya, Robust Optmzaton of Automotve Software Archtecture, In. proc. of AutoCRC Techncal Conference, 20. [3] P. P. Dey, Strongly Adequate Software Archtecture, World Academy of Scence, Engneerng and Technology, Vol. 60, pp , 20. [4] G. Tamura, N. M. Vllegas, H. A. Muller, J. P. Sousa, B. Becker, G. Karsa, S. Mankovsk, M. Pezze, W. Schafer, L. Tahvldar, and K. Wong, Towards Practcal Runtme Verfcaton and Valdaton of Self-Adaptve Software Systems, Software Engneerng for Self-Adaptve Systems, pp , Jun 202. [5] P. Tarvanen, Adaptablty Evaluaton at Software Archtecture Level, The Open Software Engneerng Journal, Vol. 2, No., pp. -30, [6] F. Berkes, Evoluton of co-management: Role of knowledge generaton, brdgng organzatons and socal learnng, Journal of Envronmental Management, Vol. 90, No. 5, pp , Internatonal Journal of Intellgent Engneerng and Systems, Vol.9, No.3, 206 DOI: /jes