selbst-adaptive software - inf-m2 - anwendungen 1 ...ubicomp/projekte/master2008/... · most...
TRANSCRIPT
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Selbst-adaptive SoftwareINF-M2 - Anwendungen 1 - Sommersemester 2008
Tobias Hutzler
Department InformatikHAW Hamburg
20. Mai 2008
Tobias Hutzler Selbst-adaptive Software 1
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Agenda
1 EinleitungMotivationDefinitionHerausforderung - Ansatz
2 AdaptionRealisierungParametrische AdaptionKompositionelle AdaptionAdaptions MechanismenVorhandene TechnologienAdaptation policies
3 Fazit
4 Ausblick
5 Literatur
Tobias Hutzler Selbst-adaptive Software 2
Einleitung Adaption Fazit Ausblick Literatur Diskussion Motivation Definition Herausforderung - Ansatz
Agenda
1 EinleitungMotivationDefinitionHerausforderung - Ansatz
2 Adaption
3 Fazit
4 Ausblick
5 Literatur
Tobias Hutzler Selbst-adaptive Software 3
Einleitung Adaption Fazit Ausblick Literatur Diskussion Motivation Definition Herausforderung - Ansatz
Locale - Android Developer Challenge - One of 50 Winners
!"#$%&''
()*$+,#'-&.*/-'+$*$/&0'12$1'
$31"+$4#$%%)'#2$*/&-')"30'
-&.*/-'5$-&6'"*'#"*6,4"*-7'
-3#2'$-')"30'#300&*1'%"#$4"*8'
9&1':1'$*6';"0/&1':1<'
=!'!"#$%&'&*-30&-')"30'0,*/&0'>,%%'*&?&0'/"'"@'$1'$*',*"AA"013*&'4+&'$/$,*'
=!'B2,06'A$04&-'#$*'%&?&0$/&'12&'!"#$%&'
A%$C"0+'1"'0&3-&'%"#$4"*-'"0'$66'#3-1"+'
-&.*/-'$*6'#"*6,4"*-'
=!'9"'&$-)'1"'3-&7')"3D%%'>"*6&0'2">')"3'
&?&0'%,?&6'>,12"31',1'
Developer: Clare Bayley, Carter Jernigan, Christina Wright, Jasper
Lin
Abbildung: Locale entwickelt von Studenten am MIT[http://code.google.com/android/adc.html]
Tobias Hutzler Selbst-adaptive Software 4
Einleitung Adaption Fazit Ausblick Literatur Diskussion Motivation Definition Herausforderung - Ansatz
Ideale Anwendungszenarien fur Adaption - Notwendigkeit
Mobile and pervasive computing, ...
Variabilitat der AnwendungenContextabhangige Benutzer Vorlieben
Tobias Hutzler Selbst-adaptive Software 5
Einleitung Adaption Fazit Ausblick Literatur Diskussion Motivation Definition Herausforderung - Ansatz
Selbst-adaptive Software
Definition:
Self-adaptive software modifies its own behavior in responseto changes in its operating environment [P. Oreizy et al, 1999]
Self-adaptive software evaluates its own behavior and changesbehavior when the evaluation indicates that it is notaccomplishing what the software is intended to do, or whenbetter functionality or performance is possible. [DARPA BAA]
Tobias Hutzler Selbst-adaptive Software 6
Einleitung Adaption Fazit Ausblick Literatur Diskussion Motivation Definition Herausforderung - Ansatz
Selbst-adaptive Software Systeme
Herausforderungen an Systemarchitekten undSoftwarearchitekten
Wie kann man Komponenten organisieren, damitUberwachung und Anpassung moglich wird?Wie, wann und wo soll man die Adaption ausfuhren?
Bekannter Ansatz: feed-back control systems, welcher dieautomatische Adaption ermoglicht!
Bekannt unter dem Namen: autonomic computing or self-*systems
Schon einige Vortage im Rahmen AW1 und AW2self-*: capturing automatic adaptation in a variety of waysself-managing, self-healing, self-configuring, self-optimizing,etc
Tobias Hutzler Selbst-adaptive Software 7
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Agenda
1 Einleitung
2 AdaptionRealisierungParametrische AdaptionKompositionelle AdaptionAdaptions MechanismenVorhandene TechnologienAdaptation policies
3 Fazit
4 Ausblick
5 LiteraturTobias Hutzler Selbst-adaptive Software 8
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Wie kann man dynamische Adaption realisieren?
Dynamische Adaption
Dynamische Adaption findet zur Laufzeit der Anwendung aufgrundvon Anderungen des Kontexts oder Ressourcenzustandesstatt.[Geihs]
Parametrische Adaption
Kompositionelle Adaption
Tobias Hutzler Selbst-adaptive Software 9
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Parametrische Adaption I
Einfache Form der dynamischen Adaption
Langst bekannt! Beispiele:
Helligkeitssensor eines Laptops, der die BildschirmhelligkeitanpasstTCP - Anpassung der Große des Ubertragungsfensters an dieLast- und Fehlersituation im Netzwerk
Tobias Hutzler Selbst-adaptive Software 10
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Parametrische Adaption II
Der Zustand der Umgebung beinflusst interne Parameter derAnwendung
Die Anwendungsstruktur wird nicht verandert
Die Adaptionsmoglichkeit wird zur Entwurfszeit durchParameter vom Entwickler festgelegt
Die Adaption erreicht meist eine gute Performanz
Tobias Hutzler Selbst-adaptive Software 11
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Kompositionelle Adaption
Compositional adaptation
Compositional adaptation results in the exchange of algorithmic orstructural parts of the system, in order to improve a program’sfitness to its current environment [McKinley, P.K., et al.]
Kontextabhangig zur Laufzeit konnen Komponenten derAnwendung ausgetauscht werden
Neue Komponenten konnen hinzukommen, alte Komponentenkonnen wegfallen
Komponenten sind unter Umstanden zur Entwurfszeit nochgar nicht bekannt
Sehr machtige Art der Adaption, aber auch sehr komplex
Tobias Hutzler Selbst-adaptive Software 12
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Adaptions Mechanismen
Parameter tuning
Code (agent or component) migration
Compositional adaptation
aspect weavingreflectioncomponent-based
Tobias Hutzler Selbst-adaptive Software 13
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Kompositionelle Adaption - bekannte Techniken
Abbildung: Main technologies supporting compositional adaptation [McKinley, P.K.,et al.]
Tobias Hutzler Selbst-adaptive Software 14
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Vorhandene Technologien - Aspect Weaving
AspektorientierteProgrammierung(AOP)
Verbreiteter Ansatz um mit crosscutting concerns umzugehen
cross cutting concerns (Security,QoS, Fault tolerant, etc)
AOP ermoglicht separation ofcross cutting concerns alsAspects
Aspects werden getrenntentwickelt und zurKompilierungszeit eingewoben(aktuell: Einwebung zur Laufzeit)
Pointcuts definieren Stellen, andenen Aspects eingewobenwerden konnen
Abbildung: Aspect Weaving[McKinley, P.K., et al.]
Tobias Hutzler Selbst-adaptive Software 15
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Vorhandene Technologien - Reflection
Introspection
Ermoglicht einer Anwendung sich selbstzu beobachten.
Intercession
Ermoglicht einer Anwendung ihr selbstbeobachtetes Verhalten zu andern.
Base level
Anwendung selbst (code)
Meta level
Selbstreprasentation (model) derAnwendung
Meta-object Protocol (MOP)
Systematische Introspection undIntercession
Abbildung: Metalevel understandingcollected into metaobject protocols(MOPs) [McKinley, P.K., et al.]
Tobias Hutzler Selbst-adaptive Software 16
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Vorhandene Technologien - Komponenten-basiertes Design
Idee: Software ist ein Netzwerk aus konkurrierenden Komponenten,die uber Konnektoren verbunden sind
dynamic recomposition
Notig (nicht hinreichend) fur Selbst-Adaption!
Abbildung: Component- based design enables static and dynamic recomposition[McKinley, P.K., et al.]
Tobias Hutzler Selbst-adaptive Software 17
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
When to compose?
Abbildung: Classification for software composition using the time of composition orrecomposition [McKinley, P.K., et al.]
Tobias Hutzler Selbst-adaptive Software 18
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Where to compose?
atop the operating system and provides a high-level API that hides the heterogeneity of hardware devices,
operating systems, and to some extent network protocols. Distribution middleware provides a high-level
programming abstraction, such as remote objects, enabling developers to write distributed applications in
a way similar to stand-alone programs. CORBA, DCOM, and Java RMI all fit in this layer. Common-
middleware services include fault tolerance, security, persistence, and transactions involving entities such as
remote objects. Finally, domain-specific middleware is tailored to match a particular class of applications.
Applications
Operating Systems and Protocols
Hardware Devices
DomainDomain--Specific Middleware ServicesSpecific Middleware Services
Common Middleware ServicesCommon Middleware Services
Distribution MiddlewareDistribution Middleware
HostHost--Infrastructure MiddlewareInfrastructure Middleware
Figure 5: Schmidt’s middleware layers.
Since the traditional role of middleware is to hide resource distribution and platform heterogeneity from
the business logic of applications, it is a logical place to put adaptive behavior related to various crosscutting
concerns such as quality-of-service, energy management, fault tolerance, and security policy.
Most adaptive middleware approaches are based on an object-oriented programming paradigm and de-
rive from popular object-oriented middleware platforms such as CORBA, Java RMI, and DCOM/.NET.
Many techniques work by intercepting and modifying messages. Figure 6 shows the flow of a CORBA
request/reply sequence in a simplified CORBA client/server application. This application comprises two
autonomous programs hosted on two computers connected by a network. Let us assume that the client has
a valid CORBA reference to the CORBA object realized by the servant. The client’s request to the servant
is first received by the stub, which represents the CORBA object at the client side. The stub marshals the
request and sends it to the client ORB. The client ORB sends the request to the server ORB, where it is de-
livered to the servant by way of a skeleton, which unmarshals the request. The servant replies to the request,
by way of the server ORB and skeleton. The reply will be received by the client ORB and be dispatched to
the client.
ApplicationsApplicationsClient
request flow
Client Application
Client ORB
Servant
Server Application
reply flow
DomainDomain--ServicesServicesCommonCommon--ServicesServices
DistributionDistribution
HostHost--InfrastructureInfrastructureSystem PlatformSystem Platform
Server ORB
NetworkNetwork
Stub Skeleton
Figure 6: CORBA call sequence.
Whether a given system uses message interception or one of several other approaches, discussed later,
middleware effectively provides a level of indirection and transparency that can be exploited to implement7
Abbildung: Schmidt’s Middleware Layers [Douglas C. Schmidt]
Tobias Hutzler Selbst-adaptive Software 19
Einleitung Adaption Fazit Ausblick Literatur Diskussion I II III IV V VI
Adaptation policies
Techniken, fur Auswahl, Berechnung oder Ableitung einer neuen Konfiguration, die
den aktuellen Status oder Kontext des Systems erfullt.
Situation-action rules
Spezifizert genau was zu tun istz.B. IF (RT>100msec) THEN (increase CPU by 5 %)
Goal-based
Spezifizert den gewunschten Zustand: RT < 100 msecSystem bleibt es selbst uberlassen das gewunschte Ziel zuerreichen (Planungsproblem)
Utility-based
utility-function: Bewertet alle machbaren/moglichenSystemzustande (Vorhersage)UR(CPU)=U(RT(CPU))
zugrunde liegendes Modell RT(CPU)
Adaption wird zum Optimierungsproblem: Ermittle brauchbareWerte fur die CPU, damit U maximal wird!
Tobias Hutzler Selbst-adaptive Software 20
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Agenda
1 Einleitung
2 Adaption
3 Fazit
4 Ausblick
5 Literatur
Tobias Hutzler Selbst-adaptive Software 21
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Fazit und offene Fragen
Software-Adaptivitat (in allen Disziplinen) ist und bleibt sehraktuell
Ausschreibungen und Tagungen zu Forschungsprojekten
Kompositionelle Adaption klingt sehr vielversprechend!
Benutzbarkeit
Ist Adaption vom Benutzer gewunscht?Wie empfindet der Benutzer die Adaption?Wie oft darf sich eine Anwendung anpassen, ohne dass es alsstorend empfunden wird?
Test und Validierung
Sicherheit
Wie schutzt man potenziell personliche Kontextinformationen?Schutz vor boswilliger, ungunstiger Adaption
Tobias Hutzler Selbst-adaptive Software 22
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Agenda
1 Einleitung
2 Adaption
3 Fazit
4 Ausblick
5 Literatur
Tobias Hutzler Selbst-adaptive Software 23
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Ausblick
Interessant fur mobile und pervasive Computing
Es gibt noch viele andere Technologien
Agenten klingen sehr vielversprechend!
Tobias Hutzler Selbst-adaptive Software 24
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Agenda
1 Einleitung
2 Adaption
3 Fazit
4 Ausblick
5 Literatur
Tobias Hutzler Selbst-adaptive Software 25
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Literatur I
McKinley, P.K., et al.
A taxonomy of Composational Adaptation.
Tech report, Software Engineering and Network Systems Laboratory,Michigan state university. 2004.
McKinley, P.K., et al.
Composing Adaptive Software.
IEEE Computer Volume 37, Issue 7, July 2004 Page(s):56 - 64.
Douglas C. Schmidt
Middleware for real-time and embedded systems.
Comm. ACM, June 2002, pp. 43-48.
Jeffrey O. Kephart, Rajarshi Das (IBM T.J.Watson Research Center)
Achieving Self-Management via Utility Functions.
Internet Computing, IEEE, Volume: 11 Issue: 1 Jan.-Feb. 2007 Page(s):40-48.
Tobias Hutzler Selbst-adaptive Software 26
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Literatur II
Jacqueline Floch (SINTEF)
D2.2 Theory of adaptation.
http://www.intermedia.uio.no/display/madam/Home , Dec 2006,referenziert 18.05.2008.
Kurt Geihs, et al.
D3.3 UML Modelling Elements and Approach for Application Adaptation(Final).
http://www.intermedia.uio.no/display/madam/Home , Dec 2006,referenziert 18.05.2008.
Alessandro Mamelli (Hewlett-Packard)
D4.2 MADAM Core Middleware Platform and Middleware Services.
http://www.intermedia.uio.no/display/madam/Home , Dec 2006,referenziert 18.05.2008.
IntegraSys (Pedro Ruiz, Jose Manuel Sanchez) Condat (Rolf Fricke)
MADAM development framework evaluation (Final).
http://www.intermedia.uio.no/display/madam/Home , Apr 2007,referenziert 18.05.2008.
Tobias Hutzler Selbst-adaptive Software 27
Einleitung Adaption Fazit Ausblick Literatur Diskussion
Literatur III
Geihs, Kurt
Selbst-Adaptive Software
Informatik-Spektrum, Volume 31, Number 2, page 133–145 - April 2008.
Mourad Alia, et al.
A Utility-based Adaptivity Model for Mobile Applications.
IEEE Computer Society, AINAW ’07, 2007
Holger Mugge
Integrating aspect-orientation and structural annotations to supportadaptive middleware.
ACM, Mai 2007
Christine R. Hofmeister
Dynamic Reconfiguration of Distributed Applications.
PhD thesis, Computer Science Department, University of Maryland
Robert Laddaga (DARPA BBN)
Self Adaptive Software - Problems and Projects.
IEEE Computer Society, Second International IEEE Workshop on SoftwareEvolvability (SE’06), 2006.
Tobias Hutzler Selbst-adaptive Software 28