SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
Pattern-based design of
autonomic systems
Giacomo Cabri - giacomo.cabri@unimore.it
Giovanna Di Marzo Serugendo–giovanna.dimarzo@unige.ch
Jose Luis Fernandez-Marquez –joseluis.fernandez@unige.ch
Outline
• Design patterns
– Reuse
– Composition
• Bio-inspired patterns for autonomic
computing
• A classification of patterns for autonomic
computing
• References
GiacomoCabri
Design patterns
• While designing systems, some problems are
frequent
• Having solutions that can be reused allows to
save time and to rely on tested experiences
• A design pattern is acommon solution to
different yet very similar problems
Giovanna.DiMarzo@unige.ch
GiacomoCabri
Design for the reuse
• The design patterns describe generic solutions
that can be applied to specific recurrent
problems
• Do not reinvent the wheel!
• Usually, patterns are collected in a catalogue
GiacomoCabri
Pattern description
• For each pattern, the following pieces of
information are usually reported:
– Name
– Aliases
– Problem
– Solution
– Applicability
– Implementation
– … other useful information
GiacomoCabri
Composition of patterns
• Patterns can be composed, in order to solve
different problems (sometimes at different
levels)
• The catalogue can provide some suggestions
GiacomoCabri
From components to ensembles
• Single components can be autonomous
– Or at least exhibit a certain degree of autonomy
• When they are put together in ensembles,
there are different architectural choices to
make the ensembles autonomic
GiacomoCabri
Patterns for autonomic systems
• Also in autonomic systems there are some
frequent problems that are likely to be already
faced and solved
GiacomoCabri
BIO-INSPIRED PATTERNS
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Computational Model
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Computational Model
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Computational Model
• Software agents
– Active autonomous entities (services, information, etc.)
• Host
– Computing device hosting agent execution
• E.g. sensors, PDAs, computers, …
• Environmental agents
– Autonomous entity working on behalf of infrastructure
• E.g. evaporating pheromone, updating gradients
• Environment
– Anything else on which agents have no control
• E.g. user switching device off, temperature, humidity, etc.
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Bio-inspired Design Patterns
• Bio-inspired design patterns’ Catalogue
– Self-organising mechanisms recurrent and frequently
involved in more complex mechanisms
– Identification of:
• Inter-relations between mechanisms
• Boundaries of each mechanism
– Classification into three levels
[FMDMSM+12]
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Self-Organising Design Patterns
• Description
– Abstract Transition Rule
– Sequence Diagram, Implementation details, Explanations
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Self-Organising Design Patterns
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Spreading
http://ergodd.zoo.ox.ac.uk/eurasia/Eurasian%20Street%20Web/Studies/animations/Sim_30_608_393_smoothed.gif
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Spreading
• Problem
– in systems, where agents perform only local interactions, agents’ reasoning suffers
from the lack of knowledge about the global system.
• Solution
– a copy of the information (received or held by an agent) is sent to neighbours and
propagated over the network from one node to another. Information spreads
progressively over the system and reduces the lack of knowledge of the agents
while keeping the constraint of the local interaction.
• Entities – Dynamics – Environment
• Usage
– Information dissemination
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Spreading
• Implementation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Aggregation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
• Problem
– Excess of information produces overloads. Information must be distributively
processed in order to reduce the amount of information and to obtain meaningful
information.
• Solution
– Aggregation consists in locally applying a fusion operator to synthesise macro
information (filtering, merging, aggregating, or transforming)
• Entities – Dynamics – Environment
• Usage
– Aggregation of pheromones, fusion of information, context-awareness
Aggregation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Aggregation
• Implementation
Host
Infrastuctural
Agent or
Agent
data_req()
send_data()
Apply
Aggregation
send_data_aggr()
Store
Aggregated
Data
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Evaporation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Evaporation
• Problem
– Outdated information cannot be detected and it needs to be removed, or its detection
involves a cost that needs to be avoided. Agent decisions rely on the freshness of the
information presented in the system, enabling correct responses to dynamic environments.
• Solution
– Evaporation is a mechanism that periodically reduces the relevance of information. Thus,
recent information becomes more relevant than older information.
• Entities – Dynamics – Environment
• Usage
– Digital pheromone, context-awareness (ageing information)
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Evaporation
• Implementation
Rel(Inf) > 0 ?
Start
Apply Evap.Stop
YesNo
rev?
yesNo
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Repulsion
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
• Problem
– Agents’ movements have to be coordinated in a decentralised manner in order to achieve a
uniform distribution and to avoid collisions among them
• Solution
– The Repulsion Pattern creates
a repulsion vector that guides
agents to move from regions
with high concentrations of
agents to regions with lower concentrations.
Thus, after few iterations agents reach a more uniform distribution in the environment
• Entities – Dynamics – Environment
• Usage
– Shape formation
Repulsion
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Repulsion
• Implementation
Start
Calculate
Repulsion()
Received
Positions?
yes
No
SendPositionReque
stToNeighbours()
CalculateDesired
Position()
MoveToHostClosest
ToNewPosition()
HostAgent Neighbouring
Hosts
SendPositionRequest()
SendPositionRequest()
SendPosition()
SendPosition()
CalculateRepulsion
Vector()
CalculateDesired
Position()
MoveToHostClosest
ToNewPosition() MoveToHostClosest
ToNewPosition()
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Self-Organising Design Patterns
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Gossip
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Gossip
• Problem
– in large-scale systems, agents need to reach an agreement, shared among all agents,
with only local perception and in a decentralised way
• Solution
– information spreads to neighbours, where it is aggregated with local information.
Aggregates are spread further and their value progressively reaches the agreement
• Entities – Dynamics – Environment
• Usage
– Computation of sums, averages
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Gossip
• Implementation
Start
Broadcast
aggregated
Information
Stop
input
events?
yes
no
Same value
broadcasted
before?
yes
no
Apply
aggregation
operator
apply aggr.
operator
Host
Agent or
Infras. Agent
Neighbour
Hosts
send(inf)
send(inf)
send(aggr)
send(aggr)
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Gradient
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
• Problem
– agents belonging to large systems suffer from lack of global knowledge to estimate the consequences of
their actions or the actions performed by other agents beyond their communication range
• Solution
– information spreads from the location it is initially deposited and aggregates when it meets other
information. During spreading, additional information about the sender’s distance and direction is
provided: either through a distance value (incremented or decremented); or by modifying the information
to represent its concentration (lower concentration when information is further away).
• Entities – Dynamics – Environment
• Usage
– Routing in ad-hoc networks
Gradient
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Gradient
• Implementation
Start
Broadcast
inf. incrementing
counter
Stop
input
events?
yes
No
Distance is
lower than
local one?
no
yes
Aggregated inf.
(The one with
lower distance
stays stored)
HostAgent
check inf and
Aggregate.
Neighbour
Hosts
send(inf,0)
send(inf,0)
Host
Agent or
Infras. Agent
Neighbour
Hosts
send(inf,d)
send(inf,d)
send(inf, d+1)
send(inf, d+1)
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Digital Pheromone
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Digital Pheromone
• Problem
– coordination of agents in large scale environments using indirect communication
• Solution
– digital pheromone provides a way to coordinate agent’s behaviour using indirect
communication in high dynamic environments. Digital pheromones create
gradients that spread over the environment, carrying information about their
distance and direction. Thus, agents can perceive pheromones from the distance
and increase the knowledge about the system. Moreover, as time goes by digital
pheromones evaporate, providing adaptation to environmental changes
• Usage
– Autonomous coordination of swarms (UAV)
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Digital Pheromone
• Entities – Dynamics – Environment
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Self-Organising Design Patterns
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Ant Foraging
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Ant Foraging
• Problem
– large scale optimisation problems that can be transformed into the
problem of finding the shortest path on a weighted graph.
• Solution
– the Ant Foraging Pattern provides rules to explore the environment
in a decentralised manner and to exploit resources
• Entities – Dynamics – Environment
• Usage
– Ant Colony Optimisation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Ant Foraging
• Implementation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Morphogenesis
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Morphogenesis
• Problem
– in large-scale decentralised systems, agents decide on their roles or plan their
activities based on their spatial position
• Solution
– specific agents spread morphogenetic gradients. Agents assess their positions in
the system by computing their relative distance to the morphogenetic gradients
sources
• Entities – Dynamics – Environment
• Usage
– Meta-morphic robots, shape formation
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Morphogenesis
• Implementation
Start
No
Gradients
Received?
yes
Estimate relative
position based on
received gradients
Change role
according to the
relative position
HostAgent
Neighbour
Hosts
GradInf()
GradInf()
Estimate
relative position
Change
Agent's role
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Chemotaxis
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Chemotaxis
• Problem
– decentralised motion coordination aiming at detecting sources or boundaries of
events
• Solution
– agents locally sense gradient information and follow the gradient in a specified
direction (i.e. follow higher gradient values, lower gradient values, or
equipotential lines of gradients).
• Entities – Dynamics – Environment
• Usage
– Routing messages
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Chemotaxis
• Implementation
Start
yes
No Inf. Received?
yes
Move to host with
highest gradient
Send concetration
request to n
neighbouring hosts
HostAgent
Neighbour
Hosts
GradRequest()
GradRequest()
Send_grad()
Send_grad()
Choose host
with highest
concentration
MoveToHost(h)
MoveToHost(h)
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Quorum Sensing
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
• Problem
– collective decisions in large-scale decentralised systems, requiring a threshold number
of agents or estimation of the density of agents in a system, using only local
interactions.
• Solution
– the Quorum Sensing Pattern allows to take collective decisions through an estimation
by individual agents of the agents’ density (assessing the number of other agents they
interact with) and by determination of a threshold number of agents necessary to take
the decision
• Entities – Dynamics – Environment
– Gradient, Morphogenesis
• Usage
– Power saving in wireless sensor networks, swarms decisions
Quorum Sensing
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Quorum Sensing
• Implementation
Start
No
Gradients
Receved?
yes
Trigger collaborative
task
Gradient's
concentration higher
than threshold?
No
yes
HostAgent
Neighbour
Hosts
GradInf()
GradInf()
if Grad > thres
trigger task
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Flocking
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
Flocking
• Problem
– Dynamic motion coordination and pattern formation of swarms
• Solution
– The Flocking Pattern provides a set of rules for moving groups of agents over the
environment while keeping the formation and interconnections between them
• Entities – Dynamics – Environment
– Cohesion (group)
– Separation
– Alignment (velocity, direction)
– Group objective (target)
• Usage
– Movies, advertisement, games, modelling crowds
G.DiMarzoSerugendo – J.L. Fernandez-Marquez
CLASSIFICATION OF PATTERNS
GiacomoCabri
Why a classification?
• Classification of the existing patterns
• Suggestions to developers
GiacomoCabri
The considered components
• Service component (SC)
– It is the basic component of ensembles
– It provides some services
– It can be reactive or goal-driven
• Autonomic manager (AM)
– It is the component that adds autonomicity to the
ensemble
– It is goal-driven
GiacomoCabri
The considered components
Service
Component
Autonomic
Manager
GiacomoCabri
Classification mechanisms
• Two orthogonal directions
– Component level
– Ensemble level
• Component level
– Relates to the addition of autonomic manager(s)
to a component
• Ensemble level
– Relates to the aggregation of more service
components in an ensemble
GiacomoCabri
Component level
• One or more AM can be added
• When more AMs are present, there can be
two relations:
– P2P, in which AMs work in parallel on different
aspects
– Hierarchical, in which one AM manages another
AM
GiacomoCabri
Ensemble level
• An ensemble can be made of different SCs
• They can
– Interact directly
– Interact by means of the environemnt
– Interact by means of the AM
GiacomoCabri
Component and ensemble levels
• Putting together the two directions, we can
have a “table”, where each cell represents a
step related to components along with a step
related to ensembles
GiacomoCabri
The complete taxonomy
SC
ENVIRONMENT
SC SC
S
C
A
M
S
C
S
C
SC
AM
A
M
S
C
A
M
S
C
A
M
S
C
ENVIRONMEN
T
A
M
S
C
A
M
S
C
A
M
S
C
A
M
AM
SC
AM
A
M
S
C
A
M
A
M
S
C
A
M
A
M
S
C
A
M
E
N
V
I
R
O
N
M
E
N
T
A
M
S
C
A
M
A
M
S
C
A
M
S
C
A
M
S
C
ENVIRONMENT
A
M
A
M
A
M
A
M
S
C
A
M
S
C
A
M
S
C
A
M
A
M
A
M
A
M
S
C
A
M
S
C
A
M
S
C
A
M
A
M
A
M
S
C
A
M
S
C
A
M
S
C
A
M
A
M
A
M
A
M
Reacti
ve
ENVIRONMENT
Proac
tive
ENVIRONMENT
ENVIRONMENT
ENVIRONMENT ENVIRONMENT
ENVIRONMENT
ENVIRONMENT ENVIRONMENT
A
M
S
C
A
M
S
C
A
M
S
C
ENVIRONMENT ENVIRONMENT
Pr
o
act
ive
Pr
o
act
ive
Pr
o
act
ive
ENVIRONMENT
GiacomoCabri
Examples of classified patterns
• Reactive Stigmergy Service Components
Ensemble
• Cognitive Stigmergy Service Components
Ensemble
GiacomoCabri
Reactive Stigmergy Service
Components Ensemble
• Pattern Name: Reactive Stigmergy Service Components Ensemble.
• Classification: Pattern for Service Components Ensemble.
• Intent: There are a large amount of components that are not able
to directly interact one to each other. The components simply react
to the environment and sense the environment changes.
• Context: This patterns has to be adopted when:
– there are a large amount of components acting together;
– the components need to be simple component, without having a lot of
knowledge;
– the environment is frequently changing;
– the components are not able to directly communicate one with the
other.
GiacomoCabri
Reactive Stigmergy Service
Components Ensemble (2)
• Behaviour: This pattern has not a direct feedback
loop. Each single component acts like a bioinspired
component (e.g. an ant). To satisfy its simple goal,
the SC acts in the environment that senses with its
“sensors” and reacts to the changes in it with its
“effectors”. The different components are not able to
communicate one with the other, but are able to
propagate information (their actions) in the
environment. Than they are able to sense the
environment changes (other components reactions)
and adapt their behaviour due to these changes.
GiacomoCabri
Reactive Stigmergy Service
Components Ensemble (3)
Service Component
SENSO
R
EFFECTOR
INPUT
(service
request)
OUTPUT
(service
response)
ENVIRONMENT
Service Component
SENSO
R
EFFECTOR
INPUT
(service
request)
OUTPUT
(service
response)
Service Component
SENSO
R
EFFECTOR
INPUT
(service
request)
OUTPUT
(service
response)
GiacomoCabri
Cognitive Stigmergy Service
Components Ensemble
• Pattern Name: Cognitive Stigmergy Service Components Ensemble.
• Classification: Pattern for Service Components Ensemble.
• Intent: In this pattern each component needs an external feedback
loop because it is not able to fully adapt alone. The component
(and its AM) is not able to direct communicate with the others
components. It reacts to the environment changes and uses its AM
to choose how to act.
• Context: This patterns has to be adopted when:
– there are a large amount of components acting together;
– the components are simple and necessitate an external AM to manage
adaptation;
– the components and the AMs are not be able to directly communicate one
to the other;
– the environment is frequently changing.
GiacomoCabri
Cognitive Stigmergy Service
Components Ensemble (2)
• Behaviour: Each single components acts like an
autonomic component: the SC has an explicit
feedback loop managed by an external AM. The
different components and the AMs are not able to
directly communicate one with the other, but are
able to propagate information in the environment via
“effectors”. Than, using “sensors”, they are able to
sense the environment changes (other components
reactions) and adapt their behaviour due to these
changes.
GiacomoCabri
Cognitive Stigmergy Service
Components Ensemble (3)
Autonomic
Manager
Service
Component
EMITTERCONTROL
SENSOREFFECTOR
EFFECTOR SENSO
R
Autonomic
Manager
Service
Component
EMITTERCONTROL
SENSOREFFECTOR
EFFECTOR SENSO
R
Autonomic
Manager
Service
Component
EMITTERCONTROL
SENSOREFFECTOR
EFFECTOR SENSO
R
ENVIRONMENT
GiacomoCabri
Classifying patterns
• The pattern «Ant foraging» can be classified as
Reactive Stigmergy Service Components
Ensemble
• If an AM is added to the Ant foraging, this can
be classified as Cognitive Stigmergy Service
Components Ensemble
GiacomoCabri
Going further
• Multi-level architecture
– Autonomic managers
– Service components
– Environemt AM layer
SC layer
ENVIRONMENT
GiacomoCabri
References
• E. Gamma, R. Helm, R. Johnson, J. Vlissides, “Design Patterns”, Pearson
• Fernandez-Marquez, Jose Luis and Di MarzoSerugendo, Giovanna and
Montagna, Sara and Viroli, Mirko and Arcos, JosepLluis, “Description and
composition of bio-inspired design patterns: a complete overview”,
Natural Computing, 2012, Springer Verlag
• G. Cabri, M. Puviani, F. Zambonelli , “Towards a Taxonomy of Adaptive
Agent-based Collaboration Patterns for Autonomic Service Ensembles”, The
2011 International Workshop on Adaptive Collaboration at the
International Conference on Collaboration Technologies and Systems
(AC/CTS 2011), Philadelphia, Pennsylvania, USA, May 2011
• M. Puviani, G. Cabri, L. Leonardi , “Adaptive Patterns for Intelligent
Distributed Systems: a Swarm robotics Case Study”, The 6th International
Symposium on Intelligent Distributed Computing - IDC 2012, Calabria,
Italy, September 2012, Springer Verlag
GiacomoCabri

Contenu connexe

Similaire à Academic Course: 08 Pattern-based design of autonomic systems

session on pattern oriented software architecture
session on pattern oriented software architecturesession on pattern oriented software architecture
session on pattern oriented software architectureSUJOY SETT
 
Expert Finding System in Pet Domain
Expert Finding System in Pet DomainExpert Finding System in Pet Domain
Expert Finding System in Pet DomainAnkit Gupta
 
Expert systems and decision making
Expert systems and decision makingExpert systems and decision making
Expert systems and decision makingAkhil Kumar
 
A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...IWSM Mensura
 
Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...
Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...
Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...Wilfried Elmenreich
 
Dss & knowledge management
Dss & knowledge managementDss & knowledge management
Dss & knowledge managementHiren Selani
 
DSD-INT 2019 Modelling in DANUBIUS-RI-Bellafiore
DSD-INT 2019 Modelling in DANUBIUS-RI-BellafioreDSD-INT 2019 Modelling in DANUBIUS-RI-Bellafiore
DSD-INT 2019 Modelling in DANUBIUS-RI-BellafioreDeltares
 
Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...
Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...
Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...Daniel Roggen
 
Introduction to Decision Science
Introduction to Decision ScienceIntroduction to Decision Science
Introduction to Decision Sciencekirwin3192
 
Module 5: Decision Trees
Module 5: Decision TreesModule 5: Decision Trees
Module 5: Decision TreesSara Hooker
 
Decision Support Systems
Decision Support SystemsDecision Support Systems
Decision Support SystemsHadi Fadlallah
 
introduction to pattern recognition
introduction to pattern recognitionintroduction to pattern recognition
introduction to pattern recognitionMohammadMoattar2
 
CAS Symposium (Oct 12 2013)
CAS Symposium (Oct 12 2013)CAS Symposium (Oct 12 2013)
CAS Symposium (Oct 12 2013)Jungpil Hahn
 
Chapter 10(mis&dss and other)
Chapter 10(mis&dss and other)Chapter 10(mis&dss and other)
Chapter 10(mis&dss and other)Seanglay Chhoeurn
 

Similaire à Academic Course: 08 Pattern-based design of autonomic systems (20)

Operations Research
Operations ResearchOperations Research
Operations Research
 
session on pattern oriented software architecture
session on pattern oriented software architecturesession on pattern oriented software architecture
session on pattern oriented software architecture
 
Expert Finding System in Pet Domain
Expert Finding System in Pet DomainExpert Finding System in Pet Domain
Expert Finding System in Pet Domain
 
Design Patterns.ppt
Design Patterns.pptDesign Patterns.ppt
Design Patterns.ppt
 
Expert systems and decision making
Expert systems and decision makingExpert systems and decision making
Expert systems and decision making
 
A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...A functional software measurement approach bridging the gap between problem a...
A functional software measurement approach bridging the gap between problem a...
 
Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...
Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...
Machine Learning Techniques for the Smart Grid – Modeling of Solar Energy usi...
 
TRIZ by VIZ
TRIZ by VIZTRIZ by VIZ
TRIZ by VIZ
 
Dss & knowledge management
Dss & knowledge managementDss & knowledge management
Dss & knowledge management
 
DSD-INT 2019 Modelling in DANUBIUS-RI-Bellafiore
DSD-INT 2019 Modelling in DANUBIUS-RI-BellafioreDSD-INT 2019 Modelling in DANUBIUS-RI-Bellafiore
DSD-INT 2019 Modelling in DANUBIUS-RI-Bellafiore
 
Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...
Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...
Wearable Computing - Part IV: Ensemble classifiers & Insight into ongoing res...
 
Introduction to Decision Science
Introduction to Decision ScienceIntroduction to Decision Science
Introduction to Decision Science
 
Module 5: Decision Trees
Module 5: Decision TreesModule 5: Decision Trees
Module 5: Decision Trees
 
Decision Support Systems
Decision Support SystemsDecision Support Systems
Decision Support Systems
 
introduction to pattern recognition
introduction to pattern recognitionintroduction to pattern recognition
introduction to pattern recognition
 
Mis 8
Mis 8Mis 8
Mis 8
 
CAS Symposium (Oct 12 2013)
CAS Symposium (Oct 12 2013)CAS Symposium (Oct 12 2013)
CAS Symposium (Oct 12 2013)
 
Unit 1 DSS
Unit 1 DSSUnit 1 DSS
Unit 1 DSS
 
Chapter 10(mis&dss and other)
Chapter 10(mis&dss and other)Chapter 10(mis&dss and other)
Chapter 10(mis&dss and other)
 
Turning Information chaos into reliable data
Turning Information chaos into reliable dataTurning Information chaos into reliable data
Turning Information chaos into reliable data
 

Plus de FET AWARE project - Self Awareness in Autonomic Systems

Plus de FET AWARE project - Self Awareness in Autonomic Systems (20)

Academic Course: 07 Introduction to the Formal Engineering of Autonomic Systems
Academic Course: 07 Introduction to the Formal Engineering of Autonomic SystemsAcademic Course: 07 Introduction to the Formal Engineering of Autonomic Systems
Academic Course: 07 Introduction to the Formal Engineering of Autonomic Systems
 
Academic Course: 06 Morphogenetic Engineering
Academic Course: 06 Morphogenetic EngineeringAcademic Course: 06 Morphogenetic Engineering
Academic Course: 06 Morphogenetic Engineering
 
Academic Course: 04 Introduction to complex systems and agent based modeling
Academic Course: 04 Introduction to complex systems and agent based modelingAcademic Course: 04 Introduction to complex systems and agent based modeling
Academic Course: 04 Introduction to complex systems and agent based modeling
 
Academic Course: 03 Autonomic Multi-Agent Systems
Academic Course: 03 Autonomic Multi-Agent SystemsAcademic Course: 03 Autonomic Multi-Agent Systems
Academic Course: 03 Autonomic Multi-Agent Systems
 
Academic Course: 02 Self-organization and emergence in networked systems
Academic Course: 02 Self-organization and emergence in networked systemsAcademic Course: 02 Self-organization and emergence in networked systems
Academic Course: 02 Self-organization and emergence in networked systems
 
Academic Course: 01 Self-awarenesss and Computational Self-awareness
Academic Course: 01 Self-awarenesss and Computational Self-awarenessAcademic Course: 01 Self-awarenesss and Computational Self-awareness
Academic Course: 01 Self-awarenesss and Computational Self-awareness
 
Awareness: Layman Seminar Slides
Awareness: Layman Seminar SlidesAwareness: Layman Seminar Slides
Awareness: Layman Seminar Slides
 
Industry Training: 04 Awareness Applications
Industry Training: 04 Awareness ApplicationsIndustry Training: 04 Awareness Applications
Industry Training: 04 Awareness Applications
 
Industry Training: 03 Awareness Simulation
Industry Training: 03 Awareness SimulationIndustry Training: 03 Awareness Simulation
Industry Training: 03 Awareness Simulation
 
Industry Training: 02 Awareness Properties
Industry Training: 02 Awareness PropertiesIndustry Training: 02 Awareness Properties
Industry Training: 02 Awareness Properties
 
Industry Training: 01 Awareness Overview
Industry Training: 01 Awareness OverviewIndustry Training: 01 Awareness Overview
Industry Training: 01 Awareness Overview
 
Robot Swarms as Ensembles of Cooperating Components - Matthias Holzl
Robot Swarms as Ensembles of Cooperating Components - Matthias HolzlRobot Swarms as Ensembles of Cooperating Components - Matthias Holzl
Robot Swarms as Ensembles of Cooperating Components - Matthias Holzl
 
Towards Systematically Engineering Ensembles - Martin Wirsing
Towards Systematically Engineering Ensembles - Martin WirsingTowards Systematically Engineering Ensembles - Martin Wirsing
Towards Systematically Engineering Ensembles - Martin Wirsing
 
Capturing the Immune System: From the wet-­lab to the robot, building better ...
Capturing the Immune System: From the wet-­lab to the robot, building better ...Capturing the Immune System: From the wet-­lab to the robot, building better ...
Capturing the Immune System: From the wet-­lab to the robot, building better ...
 
Underwater search and rescue in swarm robotics - Mark Read
Underwater search and rescue in swarm robotics - Mark Read Underwater search and rescue in swarm robotics - Mark Read
Underwater search and rescue in swarm robotics - Mark Read
 
Computational Self-awareness in Smart-Camera Networks - Lukas Esterle
Computational Self-awareness in Smart-Camera Networks - Lukas EsterleComputational Self-awareness in Smart-Camera Networks - Lukas Esterle
Computational Self-awareness in Smart-Camera Networks - Lukas Esterle
 
Why Robots may need to be self-­‐aware, before we can really trust them - Ala...
Why Robots may need to be self-­‐aware, before we can really trust them - Ala...Why Robots may need to be self-­‐aware, before we can really trust them - Ala...
Why Robots may need to be self-­‐aware, before we can really trust them - Ala...
 
Morphogenetic Engineering: Reconciling Architecture and Self-Organization Thr...
Morphogenetic Engineering: Reconciling Architecture and Self-Organization Thr...Morphogenetic Engineering: Reconciling Architecture and Self-Organization Thr...
Morphogenetic Engineering: Reconciling Architecture and Self-Organization Thr...
 
Ensemble-oriented programming of self-adaptive systems - Michele Loreti
Ensemble-oriented programming of self-adaptive systems - Michele LoretiEnsemble-oriented programming of self-adaptive systems - Michele Loreti
Ensemble-oriented programming of self-adaptive systems - Michele Loreti
 
Self-awareness and Adaptive Technologies: the Future of Operating Systems?
Self-awareness and Adaptive Technologies: the Future of Operating Systems? Self-awareness and Adaptive Technologies: the Future of Operating Systems?
Self-awareness and Adaptive Technologies: the Future of Operating Systems?
 

Academic Course: 08 Pattern-based design of autonomic systems

  • 1. Pattern-based design of autonomic systems Giacomo Cabri - giacomo.cabri@unimore.it Giovanna Di Marzo Serugendo–giovanna.dimarzo@unige.ch Jose Luis Fernandez-Marquez –joseluis.fernandez@unige.ch
  • 2. Outline • Design patterns – Reuse – Composition • Bio-inspired patterns for autonomic computing • A classification of patterns for autonomic computing • References GiacomoCabri
  • 3. Design patterns • While designing systems, some problems are frequent • Having solutions that can be reused allows to save time and to rely on tested experiences • A design pattern is acommon solution to different yet very similar problems Giovanna.DiMarzo@unige.ch GiacomoCabri
  • 4. Design for the reuse • The design patterns describe generic solutions that can be applied to specific recurrent problems • Do not reinvent the wheel! • Usually, patterns are collected in a catalogue GiacomoCabri
  • 5. Pattern description • For each pattern, the following pieces of information are usually reported: – Name – Aliases – Problem – Solution – Applicability – Implementation – … other useful information GiacomoCabri
  • 6. Composition of patterns • Patterns can be composed, in order to solve different problems (sometimes at different levels) • The catalogue can provide some suggestions GiacomoCabri
  • 7. From components to ensembles • Single components can be autonomous – Or at least exhibit a certain degree of autonomy • When they are put together in ensembles, there are different architectural choices to make the ensembles autonomic GiacomoCabri
  • 8. Patterns for autonomic systems • Also in autonomic systems there are some frequent problems that are likely to be already faced and solved GiacomoCabri
  • 12. Computational Model • Software agents – Active autonomous entities (services, information, etc.) • Host – Computing device hosting agent execution • E.g. sensors, PDAs, computers, … • Environmental agents – Autonomous entity working on behalf of infrastructure • E.g. evaporating pheromone, updating gradients • Environment – Anything else on which agents have no control • E.g. user switching device off, temperature, humidity, etc. G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 13. Bio-inspired Design Patterns • Bio-inspired design patterns’ Catalogue – Self-organising mechanisms recurrent and frequently involved in more complex mechanisms – Identification of: • Inter-relations between mechanisms • Boundaries of each mechanism – Classification into three levels [FMDMSM+12] G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 14. Self-Organising Design Patterns • Description – Abstract Transition Rule – Sequence Diagram, Implementation details, Explanations G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 17. Spreading • Problem – in systems, where agents perform only local interactions, agents’ reasoning suffers from the lack of knowledge about the global system. • Solution – a copy of the information (received or held by an agent) is sent to neighbours and propagated over the network from one node to another. Information spreads progressively over the system and reduces the lack of knowledge of the agents while keeping the constraint of the local interaction. • Entities – Dynamics – Environment • Usage – Information dissemination G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 20. • Problem – Excess of information produces overloads. Information must be distributively processed in order to reduce the amount of information and to obtain meaningful information. • Solution – Aggregation consists in locally applying a fusion operator to synthesise macro information (filtering, merging, aggregating, or transforming) • Entities – Dynamics – Environment • Usage – Aggregation of pheromones, fusion of information, context-awareness Aggregation G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 23. Evaporation • Problem – Outdated information cannot be detected and it needs to be removed, or its detection involves a cost that needs to be avoided. Agent decisions rely on the freshness of the information presented in the system, enabling correct responses to dynamic environments. • Solution – Evaporation is a mechanism that periodically reduces the relevance of information. Thus, recent information becomes more relevant than older information. • Entities – Dynamics – Environment • Usage – Digital pheromone, context-awareness (ageing information) G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 24. Evaporation • Implementation Rel(Inf) > 0 ? Start Apply Evap.Stop YesNo rev? yesNo G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 26. • Problem – Agents’ movements have to be coordinated in a decentralised manner in order to achieve a uniform distribution and to avoid collisions among them • Solution – The Repulsion Pattern creates a repulsion vector that guides agents to move from regions with high concentrations of agents to regions with lower concentrations. Thus, after few iterations agents reach a more uniform distribution in the environment • Entities – Dynamics – Environment • Usage – Shape formation Repulsion G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 30. Gossip • Problem – in large-scale systems, agents need to reach an agreement, shared among all agents, with only local perception and in a decentralised way • Solution – information spreads to neighbours, where it is aggregated with local information. Aggregates are spread further and their value progressively reaches the agreement • Entities – Dynamics – Environment • Usage – Computation of sums, averages G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 31. Gossip • Implementation Start Broadcast aggregated Information Stop input events? yes no Same value broadcasted before? yes no Apply aggregation operator apply aggr. operator Host Agent or Infras. Agent Neighbour Hosts send(inf) send(inf) send(aggr) send(aggr) G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 33. • Problem – agents belonging to large systems suffer from lack of global knowledge to estimate the consequences of their actions or the actions performed by other agents beyond their communication range • Solution – information spreads from the location it is initially deposited and aggregates when it meets other information. During spreading, additional information about the sender’s distance and direction is provided: either through a distance value (incremented or decremented); or by modifying the information to represent its concentration (lower concentration when information is further away). • Entities – Dynamics – Environment • Usage – Routing in ad-hoc networks Gradient G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 34. Gradient • Implementation Start Broadcast inf. incrementing counter Stop input events? yes No Distance is lower than local one? no yes Aggregated inf. (The one with lower distance stays stored) HostAgent check inf and Aggregate. Neighbour Hosts send(inf,0) send(inf,0) Host Agent or Infras. Agent Neighbour Hosts send(inf,d) send(inf,d) send(inf, d+1) send(inf, d+1) G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 36. Digital Pheromone • Problem – coordination of agents in large scale environments using indirect communication • Solution – digital pheromone provides a way to coordinate agent’s behaviour using indirect communication in high dynamic environments. Digital pheromones create gradients that spread over the environment, carrying information about their distance and direction. Thus, agents can perceive pheromones from the distance and increase the knowledge about the system. Moreover, as time goes by digital pheromones evaporate, providing adaptation to environmental changes • Usage – Autonomous coordination of swarms (UAV) G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 37. Digital Pheromone • Entities – Dynamics – Environment G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 39. Ant Foraging G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 40. Ant Foraging • Problem – large scale optimisation problems that can be transformed into the problem of finding the shortest path on a weighted graph. • Solution – the Ant Foraging Pattern provides rules to explore the environment in a decentralised manner and to exploit resources • Entities – Dynamics – Environment • Usage – Ant Colony Optimisation G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 43. Morphogenesis • Problem – in large-scale decentralised systems, agents decide on their roles or plan their activities based on their spatial position • Solution – specific agents spread morphogenetic gradients. Agents assess their positions in the system by computing their relative distance to the morphogenetic gradients sources • Entities – Dynamics – Environment • Usage – Meta-morphic robots, shape formation G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 44. Morphogenesis • Implementation Start No Gradients Received? yes Estimate relative position based on received gradients Change role according to the relative position HostAgent Neighbour Hosts GradInf() GradInf() Estimate relative position Change Agent's role G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 46. Chemotaxis • Problem – decentralised motion coordination aiming at detecting sources or boundaries of events • Solution – agents locally sense gradient information and follow the gradient in a specified direction (i.e. follow higher gradient values, lower gradient values, or equipotential lines of gradients). • Entities – Dynamics – Environment • Usage – Routing messages G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 47. Chemotaxis • Implementation Start yes No Inf. Received? yes Move to host with highest gradient Send concetration request to n neighbouring hosts HostAgent Neighbour Hosts GradRequest() GradRequest() Send_grad() Send_grad() Choose host with highest concentration MoveToHost(h) MoveToHost(h) G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 48. Quorum Sensing G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 49. • Problem – collective decisions in large-scale decentralised systems, requiring a threshold number of agents or estimation of the density of agents in a system, using only local interactions. • Solution – the Quorum Sensing Pattern allows to take collective decisions through an estimation by individual agents of the agents’ density (assessing the number of other agents they interact with) and by determination of a threshold number of agents necessary to take the decision • Entities – Dynamics – Environment – Gradient, Morphogenesis • Usage – Power saving in wireless sensor networks, swarms decisions Quorum Sensing G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 50. Quorum Sensing • Implementation Start No Gradients Receved? yes Trigger collaborative task Gradient's concentration higher than threshold? No yes HostAgent Neighbour Hosts GradInf() GradInf() if Grad > thres trigger task G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 52. Flocking • Problem – Dynamic motion coordination and pattern formation of swarms • Solution – The Flocking Pattern provides a set of rules for moving groups of agents over the environment while keeping the formation and interconnections between them • Entities – Dynamics – Environment – Cohesion (group) – Separation – Alignment (velocity, direction) – Group objective (target) • Usage – Movies, advertisement, games, modelling crowds G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  • 54. Why a classification? • Classification of the existing patterns • Suggestions to developers GiacomoCabri
  • 55. The considered components • Service component (SC) – It is the basic component of ensembles – It provides some services – It can be reactive or goal-driven • Autonomic manager (AM) – It is the component that adds autonomicity to the ensemble – It is goal-driven GiacomoCabri
  • 57. Classification mechanisms • Two orthogonal directions – Component level – Ensemble level • Component level – Relates to the addition of autonomic manager(s) to a component • Ensemble level – Relates to the aggregation of more service components in an ensemble GiacomoCabri
  • 58. Component level • One or more AM can be added • When more AMs are present, there can be two relations: – P2P, in which AMs work in parallel on different aspects – Hierarchical, in which one AM manages another AM GiacomoCabri
  • 59. Ensemble level • An ensemble can be made of different SCs • They can – Interact directly – Interact by means of the environemnt – Interact by means of the AM GiacomoCabri
  • 60. Component and ensemble levels • Putting together the two directions, we can have a “table”, where each cell represents a step related to components along with a step related to ensembles GiacomoCabri
  • 61. The complete taxonomy SC ENVIRONMENT SC SC S C A M S C S C SC AM A M S C A M S C A M S C ENVIRONMEN T A M S C A M S C A M S C A M AM SC AM A M S C A M A M S C A M A M S C A M E N V I R O N M E N T A M S C A M A M S C A M S C A M S C ENVIRONMENT A M A M A M A M S C A M S C A M S C A M A M A M A M S C A M S C A M S C A M A M A M S C A M S C A M S C A M A M A M A M Reacti ve ENVIRONMENT Proac tive ENVIRONMENT ENVIRONMENT ENVIRONMENT ENVIRONMENT ENVIRONMENT ENVIRONMENT ENVIRONMENT A M S C A M S C A M S C ENVIRONMENT ENVIRONMENT Pr o act ive Pr o act ive Pr o act ive ENVIRONMENT GiacomoCabri
  • 62. Examples of classified patterns • Reactive Stigmergy Service Components Ensemble • Cognitive Stigmergy Service Components Ensemble GiacomoCabri
  • 63. Reactive Stigmergy Service Components Ensemble • Pattern Name: Reactive Stigmergy Service Components Ensemble. • Classification: Pattern for Service Components Ensemble. • Intent: There are a large amount of components that are not able to directly interact one to each other. The components simply react to the environment and sense the environment changes. • Context: This patterns has to be adopted when: – there are a large amount of components acting together; – the components need to be simple component, without having a lot of knowledge; – the environment is frequently changing; – the components are not able to directly communicate one with the other. GiacomoCabri
  • 64. Reactive Stigmergy Service Components Ensemble (2) • Behaviour: This pattern has not a direct feedback loop. Each single component acts like a bioinspired component (e.g. an ant). To satisfy its simple goal, the SC acts in the environment that senses with its “sensors” and reacts to the changes in it with its “effectors”. The different components are not able to communicate one with the other, but are able to propagate information (their actions) in the environment. Than they are able to sense the environment changes (other components reactions) and adapt their behaviour due to these changes. GiacomoCabri
  • 65. Reactive Stigmergy Service Components Ensemble (3) Service Component SENSO R EFFECTOR INPUT (service request) OUTPUT (service response) ENVIRONMENT Service Component SENSO R EFFECTOR INPUT (service request) OUTPUT (service response) Service Component SENSO R EFFECTOR INPUT (service request) OUTPUT (service response) GiacomoCabri
  • 66. Cognitive Stigmergy Service Components Ensemble • Pattern Name: Cognitive Stigmergy Service Components Ensemble. • Classification: Pattern for Service Components Ensemble. • Intent: In this pattern each component needs an external feedback loop because it is not able to fully adapt alone. The component (and its AM) is not able to direct communicate with the others components. It reacts to the environment changes and uses its AM to choose how to act. • Context: This patterns has to be adopted when: – there are a large amount of components acting together; – the components are simple and necessitate an external AM to manage adaptation; – the components and the AMs are not be able to directly communicate one to the other; – the environment is frequently changing. GiacomoCabri
  • 67. Cognitive Stigmergy Service Components Ensemble (2) • Behaviour: Each single components acts like an autonomic component: the SC has an explicit feedback loop managed by an external AM. The different components and the AMs are not able to directly communicate one with the other, but are able to propagate information in the environment via “effectors”. Than, using “sensors”, they are able to sense the environment changes (other components reactions) and adapt their behaviour due to these changes. GiacomoCabri
  • 68. Cognitive Stigmergy Service Components Ensemble (3) Autonomic Manager Service Component EMITTERCONTROL SENSOREFFECTOR EFFECTOR SENSO R Autonomic Manager Service Component EMITTERCONTROL SENSOREFFECTOR EFFECTOR SENSO R Autonomic Manager Service Component EMITTERCONTROL SENSOREFFECTOR EFFECTOR SENSO R ENVIRONMENT GiacomoCabri
  • 69. Classifying patterns • The pattern «Ant foraging» can be classified as Reactive Stigmergy Service Components Ensemble • If an AM is added to the Ant foraging, this can be classified as Cognitive Stigmergy Service Components Ensemble GiacomoCabri
  • 70. Going further • Multi-level architecture – Autonomic managers – Service components – Environemt AM layer SC layer ENVIRONMENT GiacomoCabri
  • 71. References • E. Gamma, R. Helm, R. Johnson, J. Vlissides, “Design Patterns”, Pearson • Fernandez-Marquez, Jose Luis and Di MarzoSerugendo, Giovanna and Montagna, Sara and Viroli, Mirko and Arcos, JosepLluis, “Description and composition of bio-inspired design patterns: a complete overview”, Natural Computing, 2012, Springer Verlag • G. Cabri, M. Puviani, F. Zambonelli , “Towards a Taxonomy of Adaptive Agent-based Collaboration Patterns for Autonomic Service Ensembles”, The 2011 International Workshop on Adaptive Collaboration at the International Conference on Collaboration Technologies and Systems (AC/CTS 2011), Philadelphia, Pennsylvania, USA, May 2011 • M. Puviani, G. Cabri, L. Leonardi , “Adaptive Patterns for Intelligent Distributed Systems: a Swarm robotics Case Study”, The 6th International Symposium on Intelligent Distributed Computing - IDC 2012, Calabria, Italy, September 2012, Springer Verlag GiacomoCabri