The Viable System Model & Cybernetics: Realizing Self-Adaptive Software Andy Laws School of...

20
The Viable System Model & Cybernetics: Realizing Self-Adaptive Software Andy Laws School of Computing & Mathematical Sciences

Transcript of The Viable System Model & Cybernetics: Realizing Self-Adaptive Software Andy Laws School of...

The Viable System Model & Cybernetics:

Realizing Self-Adaptive Software

Andy Laws

School of Computing & Mathematical Sciences

Presentation Overview

Review the context and motivations for this work.

Summarize some related work in this area.

Outline the cybernetic foundations of our approach.

See where this has taken us so far. Speculate on where these findings may

take us in the future.

The Context

Software Engineering Considerations

The aim of Software Engineering has been described as:“...the systematic, principled, design and deployment of applications that

fulfil software’s original promise - applications that retain their full malleability throughout their lifetime and that are as easy to modify in the field as they are on the drawing board.” (Laddaga,1997)

In the thirty years since its establishment as a discipline many techniques have been introduced in pursuit of this goal, e.g.

structured programming - high-level languages- OO - process maturity etc. (Lehman, ) All require the software designer to predict every software circumstance and code to be provided to deal with the situation.

While significant improvements and highly successful have undoubtedly resulted, these efforts have failed to deliver on-going malleability and most software systems exhibit a growing fragility caused by continual adaptation to meet changing requirements.

There is growing evidence to suggest that it is time to reconsider the engineering and maintenance of software systems in a manner similar to physical products and that a more organic view of software should be adopted.

Coupled with this.. Over the last two decades, the development of raw

computing power coupled with the proliferation of computing devices has grown exponentially.

The production of evermore complex, ambitious and connected systems – distributed systems underpinned by internet developments

Such complexity strains the ability to adapt and maintain such systems manually in a timely manner – yet they are required to be consistently available, highly-resilient, highly dependable etc.

Consequently, much recent attention has focused on devolving some of the responsibility for adaptive and evolutionary activities to the software itself.

Some Related Work

IBM’s Autonomic Computing Approach

Inspired by the “autonomic” function of the human central nervous system. Such autonomic control regulates temperature, breathing, heart-rate etc. at a sun-conscious level.

Ideally, autonomic software systems will take care of the mundane elements of systems management themselves

Eight Characteristics of Autonomic Systems

Self-knowledge - Detailed knowledge of constituent components, current status etc.

Self-configuration/re-configuration - Adjustments to a changing environment

Self-optimizing - Monitor constituent parts and optimize accordingly

Self-healing - The ability to recover from malfunction

Self-protecting - Detect, identify and protect itself from attack

Environmentally aware – know its environment, the context surrounding its activity and act accordingly

Co-operative – Interact with other systems in a heterogeneous world – open standards

Anticipatory – anticipate and transparently implement the resources required to meet user goals

How these should be effectively structured is still open to question.

A Cybernetic Approach

The Viable System Model Beer’s VSM implements a control &

communication structure via hierarchies of homeostats (feedback loops)

6 major systems ensure ‘viability’ of the system ImplementationS1 Monitoring S2 Audit S3* Control S3 Intelligence S4 Policy S5

Offers an extensible, recursive, model-based architecture, devolving autonomy to sub-systems

Homeostasis

N am e of th e V iab le S ys tem in F ocu s :

T h e V ia b le S ystem M od e l

F orm at © S . B ee r 1 9 8 5

F IV E - P olicy

Sys tem F OU RE x te rn a l & F u tu reS e lf-re fe re n c eS im u la tio nP la n n in g

Sys tem THR E EIn te rn a l & C u rre n tS e lf-o rg a n iz a tio nA u to n o m ic re g u la tio n

ON E

ON E

ON E

L o ca lR eg u la to ry

L o ca lR eg u la to ry

L o ca lR eg u la to ry

S y s te m T W Oa n ti-o sc illa to ry

S y s te m T H R E E *S p o ra d ic A u d it

T W O L o ca la n ti-o sc illa to ry

T W O L o ca la n ti-o sc illa to ry

T W O L o ca la n ti-o sc illa to ry

F u tu re

T O T A LE n v iro n m en t

AutonomicSystems

AnticipatorySelf-awarenessDeliberative

Recursion in the Model Each System One is

expected to develop as a VSM in its own right

Consequently, the model is re-produced in its entirety at each level

So this model contains further VSM’s and is itself contained in a higher level VSM

System 5Policy

System 4Intelligence

System 3Control

System 3*Audit

System One (S1)

5

4

3

2

2

2

2

3*

1

Org

an

iza

tion

al E

nvi

ron

me

nt

System 2Coordination

System 2Coordination

System One (S1)

5

3

43*

1

System 2Coordination

System One (S1)

5

3

43*

1

System 2Coordination

Where this begins to get really interesting

T h ree *S p o ra d ic A u d it

a lw a y s sta n d s fo r

T w o

T w o

T w oa n ti

o sc illa to ry

T h reein sid e & n o w se lf-o rg a n iza tio n a u to n o m ic reg u la tio n

F o u ro u tsid e & fu tu re se lf-re fe ren ce sim u la tio n p la n n in g

F iv e p o licy

a lg ed o n ic

lo ca l reg u la to ry

lo ca l reg u la to ry

O n e

O n e

5

5

3

4

4

3

2

2

2

2

3 *

3 *

1

1

The recursive nature of the underlying model suggests that each System One should develop as a Viable System Model in its own right.

If the recursion is pursued below the level of the human software team then we arrive at the level of the software system.

This strongly implies that the software system should assume the same overall management structure as the human software process

Consequently, we appear to have a theoretically supported management architecture for “self-managing autonomic software”

Bratman et al’s IRMA Architecture

Bratman et al’s Intelligent Resource-Bounded Machine Architecture (IRMA), a classic BDI agent model

It is noticeable that many of the elements contained in the model correlate directly to elements of the VSM

So Planning & Means-Ends

Reasoning S3 Opportunity Analyser & Filtering

S4 Beliefs about the world S5 Desires and Deliberative

Process S5 Intentions - S5 Policy passed to

S3 for enactment It is also apparent that some

elements are missing for Viability

J-Reference Model

Desires

Wor

ldM

odel Deliberation

Process

Intentions

O pportunityAnalyser

EnvironmentalScan

FilteringProcess

Plans

S

urv i

v in

g P

lans

Intentions

Planning Process

PlanLibrary

Reasoner

Internal Model

Internal Model

Status

ResourceBargaining

Process

Intentions

Overall Plans

Reso ur cesA

cco

un

tab

ilit

y

Inten

tions

System Three

System Four

System Five

OperationalStatus

Scheduling

Overall Schedule

Local Plans

Local Schedule

Local Monitoring data

Local Monitoring data

Local Monitoring data

Ove

rall

Sch

edul

e M

onit

orin

g to

nex

t re

curs

ion

Monitoring data

A Viable Intelligent Agent Architecture

Using Bratman et al’s IRMA approach and using the VSM as a reference model, we designed a Viable Intelligent Agent Architecture realizable using a multi-agent approach.

The design specifies, in some detail, the higher, deliberative processes of adaptation.

In some respects, the ready-mapping of existing IRMA components and the inclusion of viability components demonstrates the applicability of the VSM-based approach.

Desires

Wor

ldM

odel Deliberation

Process

Intentions

OpportunityAnalyser

EnvironmentalScan

FilteringProcess

Plans

S

urvi

ving

Pla

ns

Intentions

Planning Process

PlanLibrary

Reasoner

Internal Model

InternalModel

Status

ResourceBargaining

Process

Intentions

Overall Plans

Resources

Acco

unta

bilit

y Intentions

System Three

System Four

System Five

Operational

Status

Scheduling

Ov er a ll Sch e dul eLocal Plans

Local Schedule

Local Monitoring data

Local Monitoring data

Local Monitoring data

Ove

rall

Sche

dule

Mon

itorin

g to

nex

t rec

ursio

n

Monitoring data

Perhaps more excitingly: A Practical ApplicationIn-Vehicle Telematics System (IVTS)

IVTS cover a broad range of computer-based systems, these may include or combine:

Engine Management Systems Driver’s Information Systems Vehicle Navigation & Tracking Systems Collision Avoidance Systems Vehicle Security Systems

Using Jini + Java RMI allows distributed applications to be developed as a series of clients that interact with application services via a look-up service.

The service-oriented abstraction considers a service as a logical concept that can be discovered dynamically by a client and used according to a contract of use

Monitoring & Instrumentation Considerations

In order to debug, monitor and manage Jini applications, a dynamic instrumentation system, based again on Jini technology has been developed

Uses: Monitor service - connects with

an application or lookup service and observes dynamic parameters

Logger utility - invoked by a monitor to record data

Analyzer utility - invoked by a monitor to compute complex parameters

A Management Service creates and controls the monitor service

LookupServices

ApplicationServices

JVMsMonitorServices

ManagementServices

AnalyzerUtilities

ObservationsandMeasurements

MonitorConfiguration

Jini ApplicationInstrumentationSystem

LoggerUtilities

Clients

The instrumentation system is implemented by combining Jini’s

code mobility capabilities Java’s dynamic proxies Jini’s event models

To apply instrumentation: the management service requests

the application service to set an instrumented parameter

The Look-up service monitor detects a change of state and notifies client

Management service wraps service in monitor service and sends proxy to client

Some Implications and Final Comments

The complete realization of a self-adaptive autonomic software system using the conceptual guidance of classical cybernetics and the VSM still has some way to go. Indeed, it isn’t yet clear that full realization is possible and there are still many problems outstanding.

Nevertheless, the approach offers a recursive generalized architecture from human software team to self-managing software systems

However, the inclusion of the anticipatory and deliberative (Systems 4 and 5) systems appear to offer a step forward from purely “autonomic” systems. Of course, this brings its own problems – environmental modelling ?

Nevertheless, using off-the-shelf technology that does not necessarily reflect this viewpoint exactly has allowed us to make significant progress and indicates that this approach may supply a ready-made theoretical underpinning for such software systems.

Speculations on further applications

Without wishing to impinge on the following speaker’s domain The Grid

Perhaps applicable as an architecture for sustainable, viable “virtual grid-like systems”?

E-Science A similar requirement for viable, adaptive

structures?

Thanks & Any Questions?