1 / 32

TRAP.NET: A Realization of Transparent Shaping in .NET

TRAP.NET: A Realization of Transparent Shaping in .NET. S. Masoud Sadjadi and Fernando Trigoso. Florida International University Miami, Florida, U.S.A. Outline. Motivation Background TRAP.NET Overview Demo Conclusion and Future Work. Why Dynamic Adaptation?. Pervasive computing

hosanna
Télécharger la présentation

TRAP.NET: A Realization of Transparent Shaping in .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TRAP.NET: A Realization of Transparent Shaping in .NET S. Masoud Sadjadi and Fernando Trigoso Florida International University Miami, Florida, U.S.A.

  2. Outline • Motivation • Background • TRAP.NET Overview • Demo • Conclusion and Future Work TRAP.NET: A Realization of Transparent Shaping in .NET

  3. Why Dynamic Adaptation? • Pervasive computing • Promises access to information: anywhere at anytime. • Adaptation required to changes in the mobile/wireless environments. • Critical systems • Promises systems with high fault tolerance • Adaptation required to respond to unanticipated faults. • Grid computing • Promises a dependable virtual supercomputer that solves long-running scientific applications. • Adaptation required to respond to the dynamic changes in availability of distributed resources. TRAP.NET: A Realization of Transparent Shaping in .NET

  4. Background • Software adaptation • Compositional adaptation • Transparent Shaping • TRAP • Related work • .NET Support • Runtime • Reflection • Attributes TRAP.NET: A Realization of Transparent Shaping in .NET

  5. Software Adaptation [6] • Parameter adaptation • Modifies program variables to alter behavior • Does not allow new algorithms or components • Cannot adapt new strategies • Compositional adaptation • Exchanges components • Allows new algorithms • Can adapt to unforeseen circumstances TRAP.NET: A Realization of Transparent Shaping in .NET

  6. Transparent Shaping [1] • First Step • Adapt-ready program produced • Compile, startup or load time • Interception: weaves hooks • Second Step • At runtime • Redirection: hooks used to adapt behavior TRAP.NET: A Realization of Transparent Shaping in .NET

  7. Related Work • TRAP/J [1] • Java: offers structural reflection only • Use wrapper classes and Aspect/J • Can only adapt classes by sub-classing • TRAP/C++ [2] • C++: offers no reflection • Similar implementation than TRAP/J • TRAP/BPEL [3] • For BPEL processes and Web Services TRAP.NET: A Realization of Transparent Shaping in .NET

  8. Background • Compositional Adaptation • Transparent Shaping • TRAP • Related work • .NET Support • Runtime • Reflection • Attributes TRAP.NET: A Realization of Transparent Shaping in .NET

  9. CIL, CLR and TRAP.NET [4] TRAP.NET works with CIL for language independence TRAP.NET: A Realization of Transparent Shaping in .NET

  10. .NET Reflection and Attributes • Metadata is data about the program • .NET Reflection • Encapsulates metadata • Structural and behavioral reflection • CIL and Metadata bundled together • In module or assembly file • TRAP.NET uses both • Attributes to label adapt-ready methods TRAP.NET: A Realization of Transparent Shaping in .NET

  11. Outline • Motivation • Background • TRAP.NET Overview • Demo • Conclusion and Future Work TRAP.NET: A Realization of Transparent Shaping in .NET

  12. TRAP.NET • Step 1: Generation of an adapt-ready application • Step 2: Static and Dynamic adaptation • Static adaptation • Algorithmic decision delayed until load time • According to deployed environment • Dynamic adaptation • Components can be replaced during run time • No need to halt or restart application TRAP.NET: A Realization of Transparent Shaping in .NET

  13. Step 1 • Generation of adapt-ready applications • Staging using attributes • Generation process • Intersection and redirection of control flow TRAP.NET: A Realization of Transparent Shaping in .NET

  14. TRAP.NET: A Realization of Transparent Shaping in .NET

  15. Staging • Development time • Reference to TRAP.NET class library • TRAP.NET and application unified at compile time TRAP.NET: A Realization of Transparent Shaping in .NET

  16. TRAP.NET: A Realization of Transparent Shaping in .NET

  17. Generation Process TRAP.NET Generator TRAP.NET: A Realization of Transparent Shaping in .NET

  18. Adapt-Ready Method Generation • Original implementation wrapped in an if-then-else statement Interception Redirection TRAP.NET: A Realization of Transparent Shaping in .NET

  19. TRAP.NET: A Realization of Transparent Shaping in .NET

  20. Step 2 • Static and Dynamic adaptation • Composer • Dynamic method generation • Member Access with Reference Redirection • Static adaptation TRAP.NET: A Realization of Transparent Shaping in .NET

  21. Composer • TRAP.NET hosts the server composer • Opens communication channel • The client composer can be exposed as • .NET Remoting Server – Windows Applications • HTTP Server – Web Application TRAP.NET: A Realization of Transparent Shaping in .NET

  22. Composer • Delegate: method to replace adapt-ready method • User uploads delegate assembly through Composer • Dynamic method created from delegate method • TRAP.NET stores dynamic methods Delegate Dynamic Method TRAP.NET: A Realization of Transparent Shaping in .NET

  23. Dynamic method can be executed at runtime Initialized with elements and contents of delegate method Replicates functionality of delegate method Dynamic Method Generation Delegate Method Dynamic Method Parameter Types Parameter Types Return Type Return Type Local Variables Types Local Variables Types IL Contents IL Contents TRAP.NET: A Realization of Transparent Shaping in .NET

  24. New functionality may have external references Delegate assembly is not being executed References not in execution context of running application Member Access Running Application Delegate Assembly Delegate Method Dynamic Method IL Contents IL Contents Some Field Some Method TRAP.NET: A Realization of Transparent Shaping in .NET

  25. Find references with Token Parser Resolve delegate members to obtain their metadata Locate corresponding members in running application Replace references Reference Redirection Running Application Delegate Assembly Delegate Method Dynamic Method IL Contents IL Contents 1 4 2 3 Some Field Some Method Some Field Some Method TRAP.NET: A Realization of Transparent Shaping in .NET

  26. Static Adaptation • Static adaptation reuses mechanism to achieve dynamic adaptation • At load time • Adapted functionality is not allowed to be re-adapted or rolled back TRAP.NET: A Realization of Transparent Shaping in .NET

  27. Outline • Motivation • Background • TRAP.NET Overview • Demo • Conclusions and Future Work TRAP.NET: A Realization of Transparent Shaping in .NET

  28. Summary • Attribute-based approach • Enabled unification of the adapt-ready application and server composer • Avoided using another UI for the Generator • Adheres to .NET development practices • Used to carry extra metadata information • Generator • Adds adaptive code in CIL • Enables language independence • No UI required • Visual Studios add-in • Composer • Enables mutable and reconfigurable software • Member access through reference redirection • Delegate can reuse existing functionality • User can monitor status, upload new code and adapt running application • Using Windows application or Web interface TRAP.NET: A Realization of Transparent Shaping in .NET

  29. Future Work • Access to new members in delegate assembly • Applying TRAP.NET to Grid Computing • Safe adaptation and security • Dependency analysis • Side effects analysis • Restriction on the power that TRAP.NET provides TRAP.NET: A Realization of Transparent Shaping in .NET

  30. Acknowledgements • Peers who contributed in the development phase of this work • Allen Lee, Tuan Cameron, Ana Rodriguez, Juan H. Cifuentes, Javier Ocasio, Amit Patel, Mitul Patel, Enrique E. Villa, Frank Suero, Etnan Gonzalez, Edwin Garcia, Alain Rodriguez, and Lazaro Millo. • This work was supported in part by IBM, the National Science Foundation (grants OCI-0636031, REU-0552555, and HRD-0317692). TRAP.NET: A Realization of Transparent Shaping in .NET

  31. References • [1] S. Masoud Sadjadi. Transparent Shaping of Existing Software to Support Pervasive and Autonomic Computing. A Dissertation submitted to Michigan State University, 2004. • [2] Scott D. Fleming, Betty H.C. Cheng, R. E. Kurt Stirewalt and Philip K. McKinley. An Approach to Implementing Dynamic Adaptation in C++. In Proceedings of the 2005 workshop on Design and evolution of autonomic application software, 2005. • [3] Onyeka Ezenwoye and S. Masoud Sadjadi. TRAP/BPEL: A framework for dynamic adaptation of composite services. In Proceedings of the International Conference on Web Information Systems and Technologies (WEBIST 2007), Barcelona, Spain, March 2007. (in press). • [4] Common Language Infrastructure. Wikipedia. 21 December 2006. Available at URL: http://en.wikipedia.org/wiki/Image:Overview_of_the_Common_Language_ Infrastructure.png. • [5] Serge Lidin. Expert .NET 2.0 IL Assembler. Apress. 2006, page 6. • [6] Philip K. McKinley, S. Masoud Sadjadi, Eric P. Kasten and Betty H.C. Chen. Composing Adaptive Software. Computer. July 2004, pages 56-64. TRAP.NET: A Realization of Transparent Shaping in .NET

  32. Questions/Comments • Contact Information: S. Masoud Sadjadi (sadjadi@cs.fiu.edu) Autonomic Computing Research Lab. (ACRL) School of Computing and Information Sciences (SCIS) Florida International University (FIU) • TRAP.NET and other Transparent Shaping tools can be downloaded from http://acrl.cis.fiu.edu/ TRAP.NET: A Realization of Transparent Shaping in .NET

More Related