A Framework to Support the Construction of Autonomic Osgi-Based Applications

A Framework to Support the Construction of Autonomic Osgi-Based Applications

A-OSGi: A framework to support the construction of autonomic OSGi-based applications Jo~ao Tiago de Jesus Elias Ferreira Disserta¸c~aopara obten¸c~aodo Grau de Mestre em Engenharia Inform´aticae de Computadores J´uri Presidente: Professor Doutor Jos´eManuel Nunes Salvador Tribolet Orientador: Professor Doutor Lu´ısEduardo Teixeira Rodrigues Vogais: Professora Doutora Maria Ant´oniaLopes Outubro 2009 Acknowledgements I wish to thank my family, friends and colleagues. I wish also to thank my advisor Professor Luis Rodrigues for his commitment in the pro- duction of the work described here. I am also grateful to Jo~aoLeit~aofor the helpful discussions regarding the contributions of my work, his help when preparing the Autonomics 2009 paper, and his comments on earlier versions of this manuscript. Finally, I would also like to thank the Apache Felix community for the support and the help provided in the clarification of my questions regarding the OSGi implementation. The fast response and the ability to patch Ponder2 toolkit provided by Kevin Twidle was also very valuable. This work was partially supported by FCT, through project Pastramy, PTD- C/EIA/72405/2006. Lisboa, Outubro 2009 Jo~aoTiago de Jesus Elias Ferreira Resumo A especifica¸c~aoOSGi est´aa ser cada vez mais utilizada na constru¸c~aode aplica¸c~oescom- plexas. Esta fornece o suporte para a constru¸c~aode aplica¸c~oesmodulares, atrav´esda composi¸c~ao de m´odulosreutiliz´aveis e auto-contidos, denominados bundles ou pacotes. Os pacotes podem ser adicionados e removidos em tempo de execu¸c~ao,sem ser necess´arioparar toda a aplica¸c~ao. O suporte para arquitecturas orientadas ao servi¸cofornecido pela plataforma OSGi permite que estes pacotes estejam fracamente ligados. Aplica¸c~oescomplexas t^emsido constru´ıdassobre a plataforma OSGi sendo compostas por um n´umeroelevado de pacotes com m´ultiplas interdepend^enciasentre si. Embora o OSGi facilite a gest~aodestas aplica¸c~oes(devido a modularidade introduzida), esta tarefa ´eainda complexa e lenta. Esta disserta¸c~aoapresenta A-OSGi, uma bancada que assenta nas capacidades nativas da plataforma OSGi para suportar a constru¸c~aode aplica¸c~oesauton´omicas,isto ´e,aplica¸c~oesque apresentam capacidades de auto-gest~ao,baseadas no OSGi. A bancada A-OSGi oferece um conjunto de mecanismos para este fim: a possibilidade de recolher indicadores de desempenho dos m´odulosinstalados, controlar a forma como os diferentes m´odulosse ligam a servi¸cos,recolher informa¸c~aoem tempo de execu¸c~aosobre a liga¸c~aoentre os pacotes e interpretar uma linguagem que descreve as pol´ıticasque definem o comportamento auton´omicoda aplica¸c~ao. Um prot´otipo da bancada A-OSGi foi desenvolvido de forma a ilustrar as capacidades da arquitectura, tendo para tal sido desenvolvido v´ariosmecanismos com base em tecnologias e ferramentas existentes. O prot´otipo foi avaliado com um caso de estudo onde a aplica¸c~aofoi di- namicamente adaptada em fun¸c~aode uma carga vari´avel. Os resultados mostram que a aplica¸c~ao obteve um melhor desempenho em compara¸c~aocom a aplica¸c~aosem adapta¸c~ao. Abstract The OSGi specification is becoming widely adopted to build complex applications. It offers adequate support to build modular applications, based on the composition of small, reusable and self-contained modules, called bundles. Bundles can be added and removed in runtime without stopping the entire application. Bundles can be loosely coupled by leveraging on OSGi service-oriented architecture support. Complex applications have been built on top of OSGi, resulting from the composition of a large number of bundles with many inter-dependencies. Although OSGi facilitates the manage- ment of a complex application (because of the modularity introduced), this is still a complex and time-consuming task. This dissertation presents A-OSGi, a framework that leverages on the native features of the OSGi platform to support the construction of autonomic OSGi-based applications. Autonomic applications present self-management capabilities, that ease the execution of the management tasks. A-OSGi offers a number of complementary mechanisms for this purpose, such as: the ability to extract indicators for the performance of deployed bundles, mechanisms that allow to have a fine grain control of how bundles bind to services and to gather this information in runtime, and a policy language that allows to define the autonomic behavior of the OSGi application. A prototype of A-OSGi has been implemented to illustrate the capabilities of our architec- ture. To this goal, we have implemented a number of mechanisms that integrate several existing technologies and tools. The prototype was evaluated with a proof-of-concept case study, where the application is adapted in face of a changing workload. Results show that the application exhibits a better performance when compared with the execution of the application without adaptation. Palavras Chave Keywords Palavras Chave Computa¸c~aoAuton´omica OSGi Computa¸c~aoOrientada ao Servi¸co Keywords Autonomic Computing OSGi Service Oriented Computing Index 1 Introduction 1 1.1 Motivation . .1 1.2 Contributions . .2 1.3 Results . .2 1.4 Research History . .3 1.5 Dissertation Structure . .3 2 Related Work 5 2.1 OSGi Platform . .5 2.1.1 OSGi Architecture . .6 2.1.2 OSGi Service Oriented Components . .8 2.1.2.1 Declarative Services . .9 2.1.2.2 Spring Dynamic Modules . .9 2.1.2.3 iPOJO . 10 2.1.3 OSGi and Java Specifications . 10 2.2 Autonomic Computing . 11 2.2.1 Historical Perspective . 13 2.2.2 MAPE-K Autonomic Loop . 14 2.2.2.1 Monitoring . 15 2.2.2.2 Analysis . 16 i 2.2.2.3 Planning . 17 2.2.2.4 Execution . 18 2.2.2.5 Knowledge . 18 2.2.3 MAPE-K Loop Implementation Examples . 19 2.2.3.1 ABLE Toolkit . 19 2.2.3.2 Kinesthetics eXtreme . 21 2.2.4 Autonomic Computing in Virtualized Server Environments . 23 2.2.5 Degrees of Autonomicity . 26 2.3 Java Monitoring Tools . 26 2.3.1 JVM Tools Interface . 26 2.3.2 Java Management Extensions . 27 2.4 Performance Metrics Overview . 28 2.4.1 Uptime . 29 2.4.2 Yield . 29 2.4.3 Harvest . 29 2.4.4 DQ Principle . 30 2.5 Autonomic computing support for OSGi . 30 2.5.1 OSGi Monitoring . 31 2.5.2 Service Oriented Components Models . 32 3 A-OSGi Architecture 33 3.1 Overview . 33 3.2 A-OSGi design requirements . 33 3.2.1 Monitoring . 34 3.2.2 Analysis . 34 ii 3.2.3 Planning . 35 3.2.4 Execution . 35 3.2.5 Knowledge . 35 3.3 A-OSGi Architecture . 36 3.3.1 A-OSGi Monitoring and Analysis Component (MAC) . 36 3.3.2 A-OSGi Execution Component (EC) . 38 3.3.3 A-OSGi Knowledge Component (KC) . 39 3.3.4 A-OSGi Policy Interpreter and Enforcer (PIE) . 39 4 Prototype Implementation 41 4.1 Underlying Technologies . 41 4.2 Using A-OSGi . 42 4.3 MAC Implementation . 44 4.3.1 Performance Sensor . 44 4.3.2 Resource Consumption Sensor . 45 4.3.3 OSGi Platform Sensor . 47 4.3.4 MAC analysis . 47 4.4 EC Implementation . 47 4.5 KC Implementation . 49 4.6 PIE Implementation . 50 4.7 Framework Modifications . 52 5 Evaluation 55 5.1 Case Study . 55 5.2 Using A-OSGi . 57 5.3 Performance Evaluation . 59 iii 5.4 Other Alternative Policies . 63 6 Conclusions 65 iv List of Figures 2.1 OSGi Architecture . .6 2.2 OSGi Service . .8 2.3 MAPE-K Control Loop Architecture . 15 2.4 ABLE Autotune component architecture . 21 2.5 ABLE Autotune development scenario for Apache Web Server . 22 2.6 Kinesthetics eXtreme reference model . 22 2.7 Kinesthetics eXtreme architecture overview . 23 2.8 Architecture for generating adaptation policies for virtualized environments . 25 2.9 JMX Architecture . 28 3.1 A-OSGi Architecture . 36 3.2 Isolation Example . 37 3.3 Isolation Example Sequence Diagram . 38 4.1 Comparison of ThreadGroups hierarchy . 45 5.1 Case Study Components . 55 5.2 Workload Description . 60 5.3 Throughput . 61 5.4 Quality of Service . 62 5.5 Processed Requests . 62 5.6 Overhead . 63 v vi List of Tables 2.1 Autonomic Self-* Properties . 12 4.1 A-OSGi MAC Events . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    90 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us