Adaptive Deployment in Component-Based Distributed
Total Page:16
File Type:pdf, Size:1020Kb
AGH — UNIVERSITY OF SCIENCE AND TECHNOLOGY IN KRAKÓW,POLAND FACULTY OF ELECTRICAL ENGINEERING,AUTOMATICS,COMPUTER SCIENCE AND ELECTRONICS INSTITUTE OF COMPUTER SCIENCE Adaptive Deployment of Component-based Applications in Distributed Systems A dissertation for the degree of Doctor of Philosophy author: MSc. Eng. Jacek Cała supervisor: Prof. Dr. Eng. Krzysztof Zielinski´ January 2010 AKADEMIA GÓRNICZO-HUTNICZA IM.STANISŁAWA STASZICA W KRAKOWIE WYDZIAŁ ELEKTROTECHNIKI,AUTOMATYKI,INFORMATYKI I ELEKTRONIKI KATEDRA INFORMATYKI Rozmieszczanie adaptacyjne aplikacji komponentowych w systemach rozproszonych Rozprawa doktorska autor: mgr in˙z. Jacek Cała promotor: prof. dr hab. in˙z. Krzysztof Zielinski´ Styczen´ 2010 To my Mother Abstract Deployment of distributed applications in heterogeneous environments is an interest- ing yet complex area in the software life cycle. A proper deployment infrastructure can alleviate many important issues related to software execution and management such as finding suitable location for application components and automation of low-level deployment tasks. It also promotes component-based software design and enables creating more sophisticated dynamic and adaptive solutions. Applying adap- tation to the software deployment process has great potential. Generally, it allows reacting to context changes and reorganizing application components to improve their execution. Specifically, it may support ubiquitous environments, autonomic computing solutions and highly available systems. This work presents design, imple- mentation and evaluation of the Adaptive Deployment Framework (ADF) created in the course of our research in this area. The key role in adaptive deployment plays the model-based approach to software deployment. By separation between a model of software and a model of execution environment, it improves reusability and enables automation of the deployment process. However, many of the existing model-based solutions are limited to the spatial distribution of application components in the execution environment. We extended the notion of deployment and defined three basic deployment dimensions: spatial, temporal and semantic. Deployment can be considered in each of these dimensions separately but also the dimensions can be combined together creating more elaborated deployment scenarios. One of the important requirements that enable adaptive deployment is avail- ability of reconfiguration mechanisms. What mechanisms are needed, however, depends on the way how deployment update is performed. We distinguished four possible redeployment techniques: full, deep, shallow and runtime redeployment. In this thesis we concentrate on runtime redeployment which is supposed to guarantee the most agile adaptive deployment system. To realize runtime redeployment we designed, implemented and evaluated runtime component migration mechanism. It is the foundation for the ADF framework. We found that the component level and particularly the CCM model, used as a basis for application design, is very well suited for migration and enables effective deployment adaptation. For the purpose of evaluation of our Adaptive Deployment Framework we designed and implemented Force-Directed Deployment Planning (FDDP) a novel approach to deployment planning. It demonstrates that adaptive deployment can be successfully used to improve application performance. iv Acknowledgements I would like to thank my supervisor Prof. Krzysztof Zielinski´ for his ideas and constructive advice that allowed me to complete this thesis. To my colleagues from Distributed Systems Research Group for creating friendly work atmosphere and specially to Dr. Łukasz Czekierda to whom I am deeply indebted for his invaluable help in the most critical moments of writing this dissertation. I am also very grateful to my wife Ania for her continuous support and motivation on the long journey. Last but not least, I wish to thank Prof. Paul Watson for his surprising indulgence during my work at Newcastle University. Jacek Cała v Contents 1 Introduction1 1.1 Motivation.............................2 1.2 Approach and Challenges....................4 1.3 Thesis Statement and Objectives................7 1.4 Thesis Contributions.......................8 1.5 Roadmap.............................8 2 Background and Related Work 10 2.1 Definition of the Deployment Process.............. 12 2.2 Deployment Automation..................... 15 2.2.1 Deployment Automation on a Single Machine..... 15 2.2.2 Deployment Automation in Distributed System.... 18 2.2.3 Deployment Automation in Virtualized Environments. 25 2.2.4 Deployment Automation in Grids............ 27 2.2.5 Deployment Automation in SOA ............. 28 2.3 Deployment Planning....................... 29 2.3.1 Definition of Deployment Planning........... 30 2.3.2 Planning Dimensions................... 31 2.3.3 Complexity of Deployment Planning.......... 35 2.4 Adaptive Deployment...................... 39 2.4.1 Definition of Adaptation................. 40 2.4.2 Benefits of Adaptive Deployment............ 41 2.4.3 Reflective Systems.................... 43 vi CONTENTS vii 2.4.4 Autonomic Computing.................. 44 2.5 Adaptive Deployment Platforms................. 45 2.6 Conclusions............................ 53 3 Towards Adaptive Software Deployment 59 3.1 Plain Deployment Platform................... 61 3.1.1 Support for Component-based Applications...... 61 3.1.2 Support for Deployment in Distributed Systems.... 62 3.1.3 Support for Deployment Planning Dimensions..... 64 3.1.4 Support for Virtualization................ 69 3.2 Support for Adaptation...................... 72 3.2.1 Requirements for Adaptive Deployment........ 72 3.2.2 Monitoring Facilities................... 73 3.2.3 Reconfiguration Mechanisms.............. 74 3.2.4 Adaptation Control Loop................. 77 3.3 Summary............................. 78 4 Adaptive Deployment Framework 79 4.1 The Model of Deployable Components............. 80 4.2 Overview of the Framework................... 81 4.3 Plain Deployment Infrastructure................. 83 4.3.1 Repository Manager................... 84 4.3.2 Target Manager...................... 84 4.3.3 First-stage Planner.................... 85 4.3.4 Deployment Plan Execution............... 88 4.4 Adaptive Deployment Infrastructure.............. 91 4.4.1 The Management Layer — Sensors and Effectors... 92 4.4.2 The Adaptation Layer.................. 99 4.5 Framework Usage Scenario................... 102 4.6 Summary............................. 105 5 Monitoring and Management Infrastructure 107 CONTENTS viii 5.1 Support for Runtime Component Migration.......... 108 5.1.1 Suspension and Dealing with Requests......... 110 5.1.2 Factory Support for Reconnection............ 112 5.1.3 Life Cycle of a Mobile Component............ 115 5.1.4 Passivation During Synchronous Requests....... 119 5.1.5 Summary......................... 121 5.2 COPI-based Application Monitoring............... 123 5.3 Component Instance Identification............... 124 5.4 Summary............................. 127 6 Evaluation of the Framework Building Blocks 129 6.1 Configuration of the Testing Environment........... 129 6.2 Testing Applications....................... 130 6.2.1 Traffic Generator..................... 130 6.2.2 Asymmetric Ray Tracing................. 131 6.3 Evaluation of the Plain Deployment Infrastructure....... 132 6.3.1 Conformance to the D&C Specification......... 133 6.3.2 Performance of the Deployment Infrastructure..... 136 6.3.3 Possible Extensions.................... 139 6.4 Performance of the Migration Mechanism........... 140 6.4.1 Effectiveness of the Migration Mechanism....... 140 6.4.2 Influence of Migration on Communication Performance 142 6.4.3 Influence of Migration on Processing Performance... 143 6.4.4 Overhead of the Migration Infrastructure........ 147 6.5 Overhead of Monitoring Infrastructure............. 148 6.6 Summary and Conclusions.................... 150 7 Adaptive Deployment with Force-Directed Algorithms 152 7.1 Overview of FDA algorithms................... 153 7.2 Force-Directed Deployment Planning.............. 154 7.2.1 Graph Representation of the Deployment Problem.. 155 CONTENTS ix 7.2.2 Forces in FDDP ....................... 156 7.2.3 Mapping of Observables on Model Parameters..... 159 7.2.4 Experimenting with the FDDP Model.......... 160 7.3 Evaluation of the Adaptive Deployment Framework...... 161 7.3.1 Using the ADF Framework................ 161 7.3.2 Costs of Runtime Adaptation.............. 163 7.3.3 Application Performance................. 165 7.3.4 Adaptation to an External Disturbance......... 167 7.4 Limitations of the FDDP Planner................. 170 7.5 Summary and Conclusions.................... 171 8 Conclusions and Possible Research Directions 173 A IDL interfaces 176 B Description of an Execution Environment 180 C Support for the Planning Dimensions 184 Bibliography 187 Acronyms 199 List of Tables 2.1 Main challenges for adaptive deployment framework and how they are met by existing solutions................ 54 3.1 An example of mapping of an execution node and software component entities for selected virtualization levels...... 71 4.1 Preferred BFS heuristics for initial deployment planning.... 86 4.2 CIM-based sensors provided by the framework.......... 95 6.1 The software and hardware configuration of the testing envi- ronment.............................. 129 6.2 The number and percentage of the entities and operations defined in D&C that are implemented by our deployment in- frastructure............................