self-adaptive systems : an introduction

41
Sagar Sen Scientist, Ecole des Mines, Nantes, France Self-adaptive Software An Introduction

Upload: sagar-sen

Post on 12-Jul-2015

1.674 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Self-adaptive Systems : An Introduction

Sagar Sen Scientist, Ecole des Mines, Nantes, France

Self-adaptive SoftwareAn Introduction

Page 2: Self-adaptive Systems : An Introduction

From?

Ecole des Mines, Nantes

City of Nantes(Rivers: Erdre, Loire|Population: 300,000)

Page 3: Self-adaptive Systems : An Introduction

Three real stories...

Page 4: Self-adaptive Systems : An Introduction

The Gardner Heist in Boston

1. In 1990, two men dressed as police officers broke into the Isabella Stewart Gardner Museum in Boston

2. Stole a Vermeer, five Degas and three Rembrandts.

3. Estimated cost : $500 million only /-!

4. OBSERVATION: Total failure of motion sensor and video surveillance systems!

Page 5: Self-adaptive Systems : An Introduction

An Analysis...

1. Video surveillance software system did not capture clear images in the darkness of the night!

2. Security guard was gagged and tied up! Software requires human interaction!

3. No automatic communication to police! The thieves had all night to displace the art! Software did not adapt to the situation that the guard was in distress!

4. Reward $5 million!

Software

Page 6: Self-adaptive Systems : An Introduction

The Ariane V501 Disaster• 4 juin, 1996, H0 at 08h35mn

• The Ariane 501 launcher tilts brutally and is subject to extreme aerodynamic forces.

• Self-destruct at H0+40sec.

• Cost: 500 million dollars!

Page 7: Self-adaptive Systems : An Introduction

Qu'est-il arrivé?

15 14 0

0Value (15)Sign (1)

63 62 52 51 0

0Mantissa (52)Exp (11)Sign (1)

CAST

For example,32769.445 leads to overflow in signed Int

Overflow in BOTH (main+redundant) Inertial Reference Systems

Page 8: Self-adaptive Systems : An Introduction

The Earthquake in Japan

• March 2011, Tohoku Earthquake close to Japan, Cost $235 billion

• Number of crisis management services were engaged in parallel

• Communication software helps engage ambulances, fire-fighters, medics, police...

Page 9: Self-adaptive Systems : An Introduction

Lessons learned...

Page 10: Self-adaptive Systems : An Introduction

Software is fragile! (Ariane!)

Page 11: Self-adaptive Systems : An Introduction

Software must adapt to context (Gardner Heist)

Page 12: Self-adaptive Systems : An Introduction

Software communicates with unreliable distributed services

Page 13: Self-adaptive Systems : An Introduction

Towards a Solution...Self-adaptive Software

Page 14: Self-adaptive Systems : An Introduction

Software should adapt at runtime

Page 15: Self-adaptive Systems : An Introduction

Architectural Elements in Self-adaptive Software

Page 16: Self-adaptive Systems : An Introduction

Services/Components

Page 17: Self-adaptive Systems : An Introduction

Software Function as a Service

Lifecyle of an OSGi service

Biological Analogy

Interacting cells in the body with specific function

Page 18: Self-adaptive Systems : An Introduction

The Notion of a Dynamic Service/Module

1. A software module or service that can be unloaded/loaded at runtime. (Open heart surgery)

2. Each module has its own life-cycle, memory space

3. Modules have well-defined interfaces and communicate using messages

4. Stopping/replacing a module need not stop the software system!

5. Available inherently in dynamic languages such as Python

6. Implemented in statically typed languages such as JAVA under the name Open Service Gateway Interface (OSGi)

Page 19: Self-adaptive Systems : An Introduction

Service Registry

Page 20: Self-adaptive Systems : An Introduction

Service Registry

Provider

subscribespublishes

msg

delivers

msg

Consumer

Page 21: Self-adaptive Systems : An Introduction

Service RegistryBiological Analogy

Gene Expressionvs.

Subscribing to and Using a ServiceService Registry vs. DNA

Page 22: Self-adaptive Systems : An Introduction

Context Manager

Page 23: Self-adaptive Systems : An Introduction

Context Manager

[NightFall, IntrusionDetected, Low Memory]Context Configuration

Context Manager

Sensors Monitoring Metrics(self)

Page 24: Self-adaptive Systems : An Introduction

Context Manager

Biological Analogy

Night Fall!

Page 25: Self-adaptive Systems : An Introduction

Adaptation Planner

Adaptation Planner Set of Rules

[Infrared Camera, Face Detection, GarbageCollector]System Configuration

[NightFall, IntrusionDetected, Low Memory]Context Configuration

Page 26: Self-adaptive Systems : An Introduction

Adaptation Planner

Biological Analogy

External/Internal Stimulus

Action decision

Page 27: Self-adaptive Systems : An Introduction

Component/Service Executor

Component Executor

[Infrared Camera, Face Detection, GarbageCollector]System Configuration

1subscribe

2

service3

4execute

Page 28: Self-adaptive Systems : An Introduction

Component ExecutorBiological Analogy

Taking Action!

Page 29: Self-adaptive Systems : An Introduction

Tekio: A Self-adaptive Vision System

With Santiago Hurtado, Colombia

Page 30: Self-adaptive Systems : An Introduction

Tekio: A Self-adaptive Vision System

Page 31: Self-adaptive Systems : An Introduction

Variability inTekio

Page 32: Self-adaptive Systems : An Introduction

Example Execution

Intrusion Detection Face Detection

Page 33: Self-adaptive Systems : An Introduction

Simple Demo

Page 34: Self-adaptive Systems : An Introduction

Is Tekio good enough?

Page 35: Self-adaptive Systems : An Introduction

Experimental Questions

Q1: Is Self-adaptation in Tekio fast?

Q2: Is Self-adaptation in Tekio robust?

Page 36: Self-adaptive Systems : An Introduction

Experimental Setup

Measurements1. Throughput in Frames per second (FPS)2. Memory usage in %3. CPU usage in %4. Settling time in seconds (time required to execute normally after adaptation)Machine: iMac with the Intel Core i3 Processor of 3.06GHz and 4GB 1333 MHz DDR3.

Page 37: Self-adaptive Systems : An Introduction

Comparison of Tekio to Static Implementation

Page 38: Self-adaptive Systems : An Introduction

Stress Testing

Page 39: Self-adaptive Systems : An Introduction

Lessons Learned?

Page 40: Self-adaptive Systems : An Introduction

Lessons Learned1. Modern software must adapt to context. Eg. Gmail docs on context such as desktop, mobile phone, geography, language, local ads.

2. Building a self-adaptive system relies of services that can be loaded dynamically.

3. The adaptation planner is a key component that maps context to a system configuration based on rules.

4. Self-adaptive systems need to be performant compared to traditional software. As seen in Tekio.

Page 41: Self-adaptive Systems : An Introduction

Thank you.