290 likes | 301 Views
This paper presents a general approach for dynamically adapting existing software to support pervasive and autonomic computing. It discusses a middleware-based approach and a language-based approach, along with relevant related work and conclusions.
E N D
Transparent Shaping of Existing Software to Support Pervasive and Autonomic Computing S. Masoud Sadjadi School of Computer Science Florida International University Miami, FL 33199 sadjadi@cs.fiu.edu http://www.cs.fiu.edu/~sadjadi/ Philip K. McKinley Dept. of Computer Science and Engineering Michigan State University East Lansing, MI 48824 mckinley@cse.msu.edu http://www.cse.msu.edu/~mckinley Betty H.C. Cheng Dept. of Computer Science and Engineering Michigan State University East Lansing, MI 48824 chengb@cse.msu.edu http://www.cse.msu.edu/~chengb
Outline Overview: • Motivation • General Approach • Middleware-Based Approach • Language-Based Approach • Related Work • Conclusions Motivation Pervasive Comp. Autonomic Comp. Observation General Approach Middleware-Based Language-Based Related Work Conclusions
Wearable Computing Military Applications Why Dynamic Adaptation? Overview: • Demand for Pervasive Computing • Promises anywhere, anytime access to data and computing. • Examples • Need for dynamic adaptation • Heterogeneity of hardware, network, software • Dynamics of the environmental conditions • Limited resources (CPU, memory, battery, etc.) Motivation Pervasive Comp. Autonomic Comp. Observation General Approach Middleware-Based Language-Based Related Work Conclusions
Financial Networks Water/Power Systems Why Dynamic Adaptation? • Demand for Autonomic Computing • Promises self-management in complex and critical systems. • Examples: Overview: • Need for dynamic adaptation • hardware component failures • network outages • software faults • security attacks Motivation Pervasive Comp. Autonomic Comp. Observation General Approach Middleware-Based Language-Based Related Work Conclusions
RAPIDware Project: Observation Overview: • RAPIDware Project • a research project on the design and operation of adaptive software. • Observation • Adaptive code, which implements the adaptive behavior of a software system, crosscuts the functional decomposition of the system. • Examples: QoS, security, scalability, performance, and fault-tolerance • Adaptive code is typically tangled into functional code. • Adaptable applications are difficult to develop and maintain. • Our Solution: • Separation of concerns during the development, deployment, and execution of software systems. Motivation Pervasive Comp. Autonomic Comp. Observation General Approach Middleware-Based Language-Based Related Work Conclusions
Outline Overview: • Motivation • General Approach • Middleware-Based Approach • Language-Based Approach • Related Work • Conclusions Motivation General Approach Adapt. Programs Trans. Shaping Program Families Dynamic Adapt. Realizations Middleware-Based Language-Based Related Work Conclusions
Adaptable Programs Overview: • Definition • An adaptable program is a program whose behavior can be changed (adapted) dynamically (at run time). • Problem • Developing and maintaining adaptable programs are nontrivial tasks. • Challenges • New adaptable programs • Adaptive code is scattered over functional code. • Unanticipated and transient adaptations. • Enhancing existing programs • Source code may not be available. • It may not be desirable to modify the source code. Motivation General Approach Adapt. Programs Trans. Shaping Program Families Dynamic Adapt. Realizations Middleware-Based Language-Based Related Work Conclusions
Aspect-Oriented Programming Behavioral Reflection Component- Based Design Transparent Shaping Middleware Transparent Shaping Overview: • Definition • A new programming model that supports dynamic adaptation in existing programs without the need to modify their source code directly. • Key technologies Motivation General Approach Adapt. Programs Trans. Shaping Program Families Dynamic Adapt. Realizations Middleware-Based Language-Based Related Work Conclusions
Families of Adaptable Programs Overview: • Observation • Adaptable programs derived from an existing program share the functional code of the program. • They differ only in their adaptive behavior. • Approach • Instead of developing each adaptable program individually, transparent shaping provides a model to produce a family of adaptable programs derived from an existing program. • Definition • A program family is a set of programs whose extensive commonalities justify the expensive effort required to study them as a whole rather than individually [Parnas76]. Motivation General Approach Adapt. Programs Trans. Shaping Program Families Dynamic Adapt. Realizations Middleware-Based Language-Based Related Work Conclusions
Dynamic adaptation in two steps • An adapt-ready program is produced statically • The existing program with generic interceptors, called hooks, at certain points in its execution path. X0 (existing program) X1 (adapt-ready program) X2 (adapt-ready program) First Step: at compile, startup, or load time Second Step: at run time X3 X4 X5 X6 X7 X8 X9 S1 S2 X subfamily boundary working program design decision reversible design decision Dynamic Adaptation Overview: • Dynamic adaptation in two steps • Dynamic adaptation in two steps • An adapt-ready program is produced statically • The existing program with generic interceptors, called hooks, at certain points in its execution path. • Adaptable programs are produced dynamically • Using the hooks, a composer can convert the adapt-ready program into a more appropriate adaptable program by inserting and removing new adaptive code. Motivation General Approach Adapt. Programs Trans. Shaping Program Families Dynamic adapt. Realizations Middleware-Based Language-Based Related Work Conclusions
Transparent shaping targets distributed applications. • Depending on where the hooks are incorporated inside an existing program during the first step of the shaping process, we identify three approaches to transparent shaping. • inside an application program itself • inside its supporting middleware • inside the system platform. TRAP ACT Transparent Shaping Realizations Overview: • Transparent shaping targets distributed applications. • Depending on where the hooks are incorporated inside an existing program during the first step of the shaping process, we identify three approaches to transparent shaping. • inside an application program itself • inside its supporting middleware • inside the system platform. Motivation General Approach Adapt. Programs Trans. Shaping Program Families Dynamic Adapt. Realizations Middleware-Based Client Program Server Program Language-Based Interaction Application Layer Related Work Requester Component Provider Component Conclusions Middleware Layer Operating System Network process boundaries Hook Program component Flow of service request A typical client/server application.
Outline Overview: • Motivation • General Approach • Middleware-Based Approach • Language-Based Approach • Related Work • Conclusions Motivation General Approach Middleware-Based Motivation ACT Case Study Summary Language-Based Related Work Conclusions
Middleware-Based Approach Overview: • Motivation • We focus on adapting distributed systems. • Incorporating adaptive code inside middleware produces transparency to the application code. • Most middleware have embedded interception techniques. • Approach [ICDCS’04,ICAC’04] • We use CORBA portable interceptors • A generic interceptor is incorporated into a CORBA program at startup time (adapt-ready) • Later at run time, the generic interceptor can be used to insert adaptive code into the adapt-ready program (adaptable programs) Motivation General Approach Middleware-Based Motivation ACT Case Study Summary Language-Based Related Work Conclusions
ACT Architecture Overview Overview: The flow of a request/reply in an ACT-ready application. Motivation General Approach Middleware-Based Client Program Server Program Server Program Motivation Application Layer ACT Case Study Requester object Provider object ACT Core ACT Core Summary Middleware Layer Language-Based Generic Interceptor Generic Interceptor Related Work Client ORB Server ORB Conclusions Network Operating System process boundaries Program component Request flow Request flow Hook
Outline Overview: • Motivation • General Approach • Middleware-Based Approach • Language-Based Approach • Related Work • Conclusions Motivation General Approach Middleware-Based Language-Based Motivation TRAP TRAP/J Case Study Summary Related Work Conclusions
Language-Based Approach Overview: • Motivation • Not all distributed systems use middleware. • Not all middleware provide facilities for interception. • Lack of behavioral reflection in many OO languages. • Need for direct modifications to source code. • Direct modification is difficult and error-prone • Approach [ICAC’05,DOA’04] • Using a compile- or load-time program transformation technique • compile-time aspect weaving (e.g., AspectJ) • compile-time meta-object protocols (e.g., Open C++) • load-time meta-object protocols (e.g., JOIE) Motivation General Approach Middleware-Based Language-Based Motivation TRAP TRAP/J Case Study Summary Related Work Conclusions
TRAP Overview: • Transparent Reflective Aspect Programming (TRAP) is an instance of transparent shaping • Supports dynamic adaptation in OO programs • Does not require direct modifications to source code • A two-step approach to dynamic adaptation • The developer can select, at compile time, a subset of classes in the existing program to be reflective at run time. • The objects of such reflective classes can be adapted at run time. Motivation General Approach Middleware-Based Language-Based Motivation TRAP TRAP/J Case Study Summary Related Work Conclusions
Original Application (.class files) A configuration file (contains a list of classes to become reflective) TRAP/J at Compile Time Intercepting Aspect Generator Reflective Class Generator Intercepting Aspects Wrapper-Level Class Meta-Level Class Aspect MetaLevel Class BaseLevel Class Aspect MetaLevel Class BaseLevel Class AspectJ Compiler (ajc) Generated adapt-ready application (.class files) Data Flow A File A Process TRAP/J Boundary TRAP/J Operation at Compile Time Overview: • Existing program • Selecting classes • Generating hooks • Weaving hooks • Existing program • Selecting classes • Generating hooks • Weaving hooks • Existing program • Selecting classes • Generating hooks • Weaving hooks • Existing program • Selecting classes • Generating hooks • Weaving hooks Motivation General Approach Middleware-Based Language-Based Motivation TRAP TRAP/J Case Study Summary Related Work Conclusions
Outline Overview: • Motivation • General Approach • Middleware-Based Approach • Language-Based Approach • Related Work • Conclusions Motivation General Approach Middleware-Based Language-Based Related Work When? Where and How? Conclusions
Middleware Type Mutable Tunable Configurable Customizable Hardwired Dynamic Middleware Static Middleware Develop. Time Compile Time Startup Time Run Time Middleware Lifetime When? Overview: • When the adaptivr code is incorporated? Motivation General Approach Middleware-Based Language-Based Transparent Shaping Related Work When? Where and How? Conclusions Hardwired Middleware: Electra, Totem, Horus, Isis Customizable Middleware: Personal/Embedded Java, Orbix/E Configurable Middleware: Eternal, IRL, FTS, TAO-LB, Rocks, Racks, Orbix, ORBacus, JacORB, QuO Tunable Middleware: TAO, ZEN, CIAO, DynamicTAO, UIC, OpenCORBA, ACE, FlexiNet, Iguana/J, MetaXa Mutable Middleware: Open ORB, Open COM
TRAP/J, Composition Filters, RNTL ARCAD, … ACT/J, IRL,FTS,TAO-LB, … Transparent Shaping Iguana/J, PROSE, Guaraná, … KMX, Eternal, Rocks, Racks, DEOS, GRACE, Graybox, … Where and How? Overview: • Where the adaptive code resides? • How the adaptive code is incorporated? Motivation General Approach Middleware-Based Adaptable Applications, Existing/Non-Adaptable Applications Application Language-Based Related Work Domain-Specific Services BBS, … When? Where and How? Common Services QuO, OGS, … Conclusions Middleware Distribution Services Java RMI, TAO,DynamicTAO,Orbix, JacORB, Squirrel,OpenCorba, OpenORB, Electra,… Host-Infrastructure Services MetaSockets, Java Net Package, ACE, Horus, Isis, Ensemble, … Windows OS, Linux OS, Sun Solaris OS, Mac OS System Platform Transparent shaping boundary Hooks to incorporate adaptive code dynamically
Outline Overview: • Motivation • General Approach • Middleware-Based Approach • Language-Based Approach • Related Work • Conclusions Motivation General Approach Middleware-Based Language-Based Related Work Conclusions Summary Future Tools Future Apps
Model …….………………….. Transparent Shaping Programming Model Extensions..………………… TRAP ACT Prototypes ……………..……. TRAP/J ACT/J Hooks ….………………………………… Wrappers & Metaobjects Generic Interceptors Coarse-Grained .. Delegates: MetaSockets Proxies: Generic Proxy Core Assets adaptive code Fine-Grained …… Filters: FEC, Encryption/Dec., Compression/Dec. Rules: Conn. Management,App. Integration supports instantiates provides uses is applied to Existing Applications …………………... Audio Streaming App. Image Retrieval App. Frame Grabber App. Crosscutting Concerns ………….………………. QoS Security QoS vs. Energy Man. Self-Management/Optimization App. Integration Summary Overview: • A high level view of our accomplishments Motivation General Approach Middleware-Based Language-Based Related Work Conclusions Summary Future Tools Future Apps
Future Work: Tools Overview: • TRAP.NET • All programming languages supported in .NET • Onyeka Ezenwoye and Ana Rodriguez • Lazaro Millo and Alain Rodriguez • TRAP.BPEL • Enabling Robustness in Existing BPEL Processes • Onyeka Ezenwoye • Safe Adaptation • specifying adaptation semantics and monitoring and ensuring system invariants during adaptation (Zhang and Cheng, WADS05) • Safe Adaptation using Constraint Programming and Dynamic Testing • Drs. Xudong He, Peter Clarke, and Martine Ceberio • Gonzalo Argote Motivation General Approach Middleware-Based Language-Based Related Work Conclusions Summary Future Tools Future Apps
Future Work: Applications Overview: • IP_Comm (Futuristic Telecommunication) • Drs. Deng, Clarke, Hristidis, Rangaswami, Zhang, Chen, Prabakar, Ege, and Li • Weixiang Sun, Yingbo, Onyeka Ezenwoye • Eduardo and Adeline • Constructing Autonomic Computing Systems by Combining Adaptive Software and Knowledge Discovery Techniques • Dr. Li • Knowledge Discovery for Computing System Management • Drs. Li and Zhang Motivation General Approach Middleware-Based Language-Based Related Work Conclusions Summary Future Tools Future Apps
References (1) Overview: [Computer’04] Philip K. McKinley, S. Masoud Sadjadi, Eric P. Kasten, and Betty H. C. Cheng. Composing adaptive software. IEEE Computer, pages 56-64, July 2004. [DOA'04] S. M. Sadjadi, P. K. McKinley, B. H.C. Cheng, and R. E. K. Stirewalt. “TRAP/J: Transparent generation of adaptable java programs,” To appear In the Proceedings of the International Symposium on Distributed Objects and Applications, Larnaca, Cyprus, October 2004. [IWQoS'04] Z. Zhou, P. K. McKinley, and S. M. Sadjadi. On quality-of-service and energy consumption tradeoffs in fec-enabled audio streaming. In Proceedings of the 12th IEEE International Workshop on Quality of Service (IWQoS 2004), Montreal, Canada, June 2004. [ICAC'04-1] S. M. Sadjadi, P. K. McKinley,``Transparent Self-Optimization in Existing CORBA Applications,'' To appear in Proceedings of the International Conference on Autonomic Computing (ICAC-04), New York, NY, May 2004. [ICDCS'04] S. M. Sadjadi and P. K. McKinley. ACT: An adaptive CORBA template to support unanticipated adaptation. In Proceedings of the 24th IEEE International Conference on Distributed Computing Systems (ICDCS'04), Tokyo, Japan, March 2004. To appear. [FTDCS'03]S. M. Sadjadi, P. K. McKinley, and E. P. Kasten. Architecture and operation of an adaptable communication substrate. In Proceedings of the Ninth IEEE International Workshop on Future Trends of Distributed Computing Systems, pages 46-55, San Juan, Puerto Rico, May 2003. [ISWC'02] Philip K. McKinley, S. M. Sadjadi, E. P. Kasten, and R. Kalaskar. Programming language support for adaptive wearable computing. In Proceedings of International Symposium on Wearable Computers (ISWC'02), pages 205-214, Seattle, Washington, October 2002. [ICAC'04-2] S. M. Sadjadi, P. K. McKinley, R. E. K. Stirewalt, and B. H.C. Cheng, ``Self-Optimization in Wireless Audio Streaming,'' To appear in Proceedings of the International Conference on Autonomic Computing (ICAC-04), New York, NY, May 2004. Motivation General Approach Middleware-Based Language-Based Related Work Conclusions
References (2) Overview: [Bruegge04] Bernd Bruegge and Allen H. Dutoit. Object-oriented software engineering using UML, patterns, and Java, second edition, Prentice Hall, 2004. [Parnas76] David L. Parnas. On the design and development of program families. IEEE Transactions on Software Engineering, March 1976. [Johnson01] Ralph Johnson. Introduction to “on the design and development of program families.” In Daniel M. Hoffman and David M. Weiss, editors, Software fundamentals: collected papers by David L. Parnas, pages 191–192. Addison-Wesley Longman Publishing Co., Inc., 2001. [Maes87] Pattie Maes. Concepts and experiments in computational reflection. In Proceedings of the ACM Conference on Object-Oriented Languages. ACM Press, December 1987. [Kiczales97] G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Videira Lopes, J. M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proceedings of the European Conference on Object-Oriented Programming. Springer-Verlag LNCS 1241, June 1997. [Szyperski99] C. Szyperski, Component Software: Beyond Object-Oriented Programming. Addison-Wesley, 1999. [Blair97] Gordon Blair, Geoff Coulson, and Nigel Davies. Adaptive middleware for mobile multimedia applications. In Proceedings of the Eighth International Workshop on Network and Operating System Support for Digital Audio and Video, pages 259-273, 1997. [Schmidt02] Douglas C. Schmidt. Middleware for real-time and embedded systems. Communications of the ACM, 45(6), June 2002. [CORBA03] Object Management Group, Framingham, Massachusett. The Common Object Request Broker: Architecture and Specification Version 3.0, July 2003. [Zinky97] John A. Zinky, David E. Bakken, and Richard E. Schantz. Architectural support for quality of service for CORBA objects. Theory and Practice of Object Systems, 3(1), 1997. [Yang02] 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. In Proceedings of the ACM SIGSOFT Workshop On Self-healing Software (WOSS'02), November 2002. Motivation General Approach Middleware-Based Language-Based Related Work Conclusions
Acknowledgements Overview: • Thanks to my colleagues at SENS laboratory for their insightful discussions and feedbacks (in alphabetical order). • Eric Kasten • Farshad Samimi • Jesse Sowell • Kurt Stirewalt • Laura K. Dillon • Scott Fleming • Udiyan Padmanabhan • Zhenxiao Yang • Zhinan Zhou • This work was supported in part by the U.S. Department of the Navy, Office of Naval Research under Grant No. N00014-01-1-0744, and in part by National Science Foundation grants CCR-9912407, EIA-0000433, EIA-0130724, and ITR-0313142. Motivation General Approach Middleware-Based Language-Based Related Work Conclusions
Contact Information S. Masoud Sadjadi Assistant Professor of Computer Science University Park, ECS 212C 11200 S.W. 8th Street Miami, FL 33199 Email: sadjadi@cs.fiu.edu URL: http://www.cs.fiu.edu/~sadjadi/ RAPIDware Project: http://www.cse.msu.edu/rapidware/ SENS Laboratory: http://www.cse.msu.edu/sens/ Overview: Questions? Motivation General Approach Middleware-Based Language-Based Related Work Conclusions Thank you!