Your SlideShare is downloading. ×
0
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Academic Course: 08 Pattern-based design of autonomic systems
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Academic Course: 08 Pattern-based design of autonomic systems

266

Published on

By Giacomo Cabri, Giovanna Di Marzo Serugendo and Jose Luis Fernandez-Marquez

By Giacomo Cabri, Giovanna Di Marzo Serugendo and Jose Luis Fernandez-Marquez

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
266
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  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
  9. BIO-INSPIRED PATTERNS G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  10. Computational Model G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  11. Computational Model G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  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
  15. Self-Organising Design Patterns G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  16. 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
  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
  18. Spreading • Implementation G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  19. Aggregation 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
  21. 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
  22. Evaporation 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
  25. Repulsion 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
  27. 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
  28. Self-Organising Design Patterns G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  29. Gossip 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
  32. Gradient 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
  35. Digital Pheromone 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
  38. Self-Organising Design Patterns 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
  41. Ant Foraging • Implementation G.DiMarzoSerugendo – J.L. Fernandez-Marquez
  42. Morphogenesis 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
  45. Chemotaxis 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
  51. Flocking 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
  53. CLASSIFICATION OF PATTERNS GiacomoCabri
  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
  56. The considered components Service Component Autonomic Manager 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

×