Post on 19-Jan-2018
description
transcript
CEN-4015, Software Project, Spring 2006
Transparent Shaping Transparent Shaping of Existing Software to Support of Existing Software to Support
Pervasive and Autonomic ComputingPervasive and Autonomic Computing
S. Masoud Sadjadi
Autonomic Computing Research Laboratory (ACRL)School of Computing and Information Sciences
Florida International University
Email: sadjadi@cs.fiu.eduURL: http://www.cs.fiu.edu/~sadjadi/
2CEN-4015, Software Project, Spring 2006.
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.)
Pervasive Comp.
Why Dynamic Adaptation?Why Dynamic Adaptation?OvervieOverview:w:Motivation
Autonomic Comp.
Wearable Computing Military ApplicationsTRAP.NET
Language-Based
Approach
3CEN-4015, Software Project, Spring 2006.
Demand for Autonomic Computing– Promises self-management in complex and critical systems.
Examples:
Pervasive Comp.
Why Dynamic Adaptation?Why Dynamic Adaptation?
Need for dynamic adaptation– hardware component failures– network outages– software faults– security attacks
Autonomic Comp.
OvervieOverview:w:Motivation
Financial Networks Water/Power SystemsTRAP.NET
Language-Based
Approach
4CEN-4015, Software Project, Spring 2006.
Adaptable ProgramsAdaptable Programs 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.
Adapt. Programs
OvervieOverview:w:Motivation
Trans. Shaping
Dynamic Adapt.
Approach
Realizations
TRAP.NET
Language-Based
5CEN-4015, Software Project, Spring 2006.
Transparent ShapingTransparent Shaping Definition
– A new programming model that supports dynamic adaptation in existing programs without the need to modify their source code directly.
Key technologies
Aspect-Oriented Programming
Behavioral Reflection
Component-Based Design
Middleware
Transparent ShapingTransparent Shaping
Trans. Shaping
Adapt. Programs
Dynamic Adapt.
OvervieOverview:w:Motivation
Realizations
Approach
TRAP.NET
Language-Based
6CEN-4015, Software Project, Spring 2006.
Dynamic AdaptationDynamic Adaptation
Dynamic adapt.
Adapt. Programs
Trans. Shaping
OvervieOverview:w:Motivation
Realizations
X4X3
X8
Second Step:at run time
X5 X7X6
X9S1 S2
Dynamic adaptation in two steps
X1
(adapt-ready program)
First Step:at compile, startup, or load time
X2
(adapt-ready program)
X0
(existing program)
X working program reversible design decisiondesign decision subfamily boundary
Dynamic adaptation in two steps1. An adapt-ready program is produced statically
The existing program with generic interceptors, called hooks, at certain points in its execution path.
Dynamic adaptation in two steps1. An adapt-ready program is produced statically
The existing program with generic interceptors, called hooks, at certain points in its execution path.
2. 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.
Approach
TRAP.NET
Language-Based
7CEN-4015, Software Project, Spring 2006.
Transparent Shaping RealizationsTransparent Shaping Realizations 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.1. inside an application program itself2. inside its supporting middleware3. inside the system platform.
Client Program Server Program
ApplicationLayer
MiddlewareLayer
Program component Flow of service request Hook
process boundaries
NetworkNetwork
Requester Component
ProviderComponent
OperatingSystem
Interaction
A typical client/server application.
Adapt. Programs
Trans. Shaping
Dynamic Adapt.
OvervieOverview:w:Motivation
Realizations
Approach
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.1.1. inside an application program itselfinside an application program itself2. inside its supporting middleware3. inside the system platform.
TRAP
TRAP.NET
Language-Based
8CEN-4015, Software Project, Spring 2006.
TRAPTRAP
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.
TRAP/J
Case Study
TRAP
Summary
Language-Based
OvervieOverview:w:Motivation
Approach
TRAP.NET
9CEN-4015, Software Project, Spring 2006.
TRAP/J Operation at Compile TimeTRAP/J Operation at Compile Time
TRAP
Case Study
TRAP/J
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 hooksSummary
A configuration file (contains a list of classes to become reflective)
Original Application(.class files)
AspectJ Compiler (ajc)
Generated adapt-ready application (.class files)
Data Flow A File A Process TRAP/J Boundary
MetaLevelClass
BaseLevelClassAspect
MetaLevelClass
BaseLevelClassAspect
Wrapper-Level Class
Meta-Level Class
Intercepting Aspects
Intercepting Aspect Generator Reflective Class Generator
TRAP/J at Compile Time
Language-Based
OvervieOverview:w:Motivation
Approach
TRAP.NET
14CEN-4015, Software Project, Spring 2006.
Contact InformationContact Information
Questions?Thank you!
S. Masoud SadjadiAssistant Professor of Computer Science University Park, ECS 212C11200 S.W. 8th StreetMiami, FL 33199
Email: sadjadi@cs.fiu.eduURL: http://www.cs.fiu.edu/~sadjadi/
RAPIDware Project: http://www.cse.msu.edu/rapidware/SENS Laboratory: http://www.cse.msu.edu/sens/
OvervieOverview:w:Motivation
Language-Based
Approach
TRAP.NET