110 likes | 241 Views
An Aspect-Oriented Approach to Dynamic Adaptation. August 8, 2002 Presented by: Sherri Goings Advisors: Dr. Dillon, Dr. Cheng, Dr. Stirewalt SENS Lab www.cse.msu.edu/sens. What is Dynamic Adaptation?. Traditional programs defined at compile time, code cannot be changed at run-time
E N D
An Aspect-Oriented Approach to Dynamic Adaptation August 8, 2002 Presented by: Sherri Goings Advisors: Dr. Dillon, Dr. Cheng, Dr. Stirewalt SENS Lab www.cse.msu.edu/sens
What is Dynamic Adaptation? • Traditional programs • defined at compile time, • code cannot be changed at run-time • Dynamically adaptiveprograms • Code may change at run-time • Changes are triggered by environmental conditions
Dynamic Adaptation • Concerns that warrant dynamic adaptation include • Quality of Service (QoS) • Security • Error Logging • Such concerns are cross-cutting in nature • Code is scattered throughout program • Difficult to read, understand, debug, and modify
Example of tangled code • Code in red pertains to Error Logging • Spread throughout the program
Aspects • Mechanisms used to collect and extract scattered but related code • Aspect can be woven into existing code at compile time • Code in Aspect is automatically scattered • This enables extension of existing programs functionality to handle a new concern • No need to modify original code
Code in aspectJ • Code for Error Logging has been pulled out into its own class
How does AOP apply to Dynamic Adaptation? • Start with a traditional program • Core program • Use aspects to • Make program ready for adaptation • Adapt-ready program • Define the dynamic adaptations • E.g. add security, improve QoS • At run-time the program adapts to changes in environmental conditions
Conclusions • Using aspects to achieve dynamic-adaptation allows • Separation of application code from adaptation code • Run-time changes in functionality of original program without modifying core program
References • Tzilla Elrad, Robert E. Filman, and Atef Bader. Aspect-oriented programming. In Communications of the ACM, October 2001-Volume 44, Number 10, pp29-32. • Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. Getting started with aspectJ. In Communications of the ACM, October 2001-Volume 44, Number 10, pp59-65. • Z. Yang, B.H.C. Cheng, R.E.K. Stirewalt, J. Sowell, S.M. Sadjadi, and P.K. McKinley. An Aspect-Oriented Approach to Dynamic Adaptation. SENS lab, CSE dept., MSU • http://aspectj.org/
Acknowledgements • Special thanks to • Masoud Sadjadi • Zhenxiao Yang • Jesse Sowell • Supported by • MSU College of Engineering • National Science Foundation Grant • For further info please visit http://www.cse.msu.edu/rapidware