Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Event-Based vs. Multi-Agent Systems: 
Towards a Uni
ed Conceptual Framework 
Preliminary Notes 
Andrea Omicini 
Dipartimento di Informatica { Scienza e Ingegneria (DISI) 
Alm...
Outline 
1 Programming Paradigms for Complex System Engineering 
2 Engineering MAS as Event-Based Systems 
3 Conclusion 
A...
Programming Paradigms for Complex System Engineering 
Outline 
1 Programming Paradigms for Complex System Engineering 
2 E...
Programming Paradigms for Complex System Engineering Complexity in Software Systems 
Outline 
1 Programming Paradigms for ...
Programming Paradigms for Complex System Engineering Complexity in Software Systems 
Accidental Complexity I 
Accidental c...
Programming Paradigms for Complex System Engineering Complexity in Software Systems 
Accidental Complexity II 
Sources of ...
Programming Paradigms for Complex System Engineering Complexity in Software Systems 
Distributed  Event-Based Systems 
Now...
Programming Paradigms for Complex System Engineering Complexity in Software Systems 
Object  Event-Based Systems 
Object-o...
eld (human-computer graphical interfaces) 
that made object-oriented languages mainstream is where 
event-driven programmi...
rst 
So, object-oriented and event-driven programming represent a good 
match 
However, distributed computing with object-...
Programming Paradigms for Complex System Engineering Complexity in Software Systems 
Agent-Based  Event-Based Systems 
Age...
Programming Paradigms for Complex System Engineering Mixing Paradigms 
Outline 
1 Programming Paradigms for Complex System...
Programming Paradigms for Complex System Engineering Mixing Paradigms 
Agent-Oriented vs. Object-Oriented Computing 
Agent...
Programming Paradigms for Complex System Engineering Mixing Paradigms 
The AA Metamodel 
In the agents  artefacts (AA) met...
Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems 
Outline 
1 Programming Paradigms...
Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems 
Agents-Events Integration? 
Eith...
Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems 
Examples I 
Integrating MAS with...
Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems 
Examples II 
Integrating actors ...
Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems 
Issues 
However, the above examp...
Engineering MAS as Event-Based Systems 
Outline 
1 Programming Paradigms for Complex System Engineering 
2 Engineering MAS...
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Outline 
1 Programming Paradigms for Complex Sys...
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Caveat Lector 
The notions of event-based system...
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Terminology for Event-Based Systems 
De
nition 
According to [Fiege et al., 2002], an event-based systems (EBS) is 
a system in which the integrated components co...
cations 
An event is an occurrence of a happening relevant for the system, e.g. 
a state change in some component 
A noti
cation is the rei
cation of an event within the system, and 
provides for its description 
A. Omicini (DISI, UniBO) Event-Based vs. Multi-Ag...
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Event Models 
Dierent event models can be suppor...
cations, 
e.g. [Fiege et al., 2002] 
name/value pairs [Carzaniga et al., 2001] 
objects [Eugster et al., 2001] 
semi-struc...
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Middleware and Events 
At the middleware level, ...
cations may take the form of messages, 
or, of any speci
c form adopted / promoted by the middleware 
services 
Being transmitted in the same way and format of messages does not 
...
cation service 
An event noti
cation service, or event system for short, applies dierent 
techniques and data and
lter models to distribute noti
cations between 
the components of an event-based system [Fiege et al., 2002] 
A. Omicini (DISI, UniBO) Event-Based vs. Mu...
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Event-Based Architectures 
Components in event-b...
cations 
Producers publish noti
cations, and provide an output interface for 
subscription 
Consumers subscribe to noti
cations as speci
ed by producers 
Being not real messages, noti
cations have not a designed receiver: 
they are distributed by the event noti
cation service to consumers 
that subscribed to that sort of noti
cation 
Expressiveness of subscriptions depends on the data model and
lter 
language used 
A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 24 / 62
Engineering MAS as Event-Based Systems Essentials of Event-Based Systems 
Issues in Event-Based Systems 
Mechanisms [Fiege...
cation
ltering 
noti
cation distribution 
Software engineering 
inversion of control [Haller and Odersky, 2006] 
coordination of events [Milice...
Engineering MAS as Event-Based Systems MAS as Event-Based Systems 
Outline 
1 Programming Paradigms for Complex System Eng...
Engineering MAS as Event-Based Systems MAS as Event-Based Systems 
Rethinking MAS Meta-Model 
The MAS triad: agents, socie...
Engineering MAS as Event-Based Systems MAS as Event-Based Systems 
Agents  Environment as Event Sources 
From a SE viewpoi...
Engineering MAS as Event-Based Systems MAS as Event-Based Systems 
An Event-based View of MAS 
MAS can be seen as event-ba...
Engineering MAS as Event-Based Systems MAS as Event-Based Systems 
Bene
ts of MAS as EBS 
since agents encapsulate control along with the criteria for control { 
expressed in terms of high level...
rst-class event-based abstraction, 
all causes of change and disruption in a MAS are modelled in a 
uniform way as event p...
Engineering MAS as Event-Based Systems MAS as Event-Based Systems 
Architectural Requirements for MAS as EBS 
agent autono...
t, boundary artefacts can deal with diversity of all 
sorts of events, and translate them all according to a common genera...
Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View 
Outline 
1 Programming Paradigms for Comple...
Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View 
An Event-based View of MAS as Interacting S...
Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View 
Harnessing the Complexity of Interaction 
A...
Upcoming SlideShare
Loading in …5
×

Event-Based vs. Multi-Agent Systems: Towards a Unified Conceptual Framework. Preliminary Notes

981 views

Published on

Multi-Agent Systems (MAS) and Event-Based Systems (EBS) are two fundamental paradigms for the engineering of complex software systems. In this talk, we summarise the most important features of the MAS and EBS, and discuss how they could be integrated within a unified conceptual framework. The resulting framework could work as the foundation of a principled discipline for the engineering of complex software systems, by promoting a coherent integration of agent-based and event-based abstractions, languages, technologies, and methods.

Published in: Science

Event-Based vs. Multi-Agent Systems: Towards a Unified Conceptual Framework. Preliminary Notes

  1. 1. Event-Based vs. Multi-Agent Systems: Towards a Uni
  2. 2. ed Conceptual Framework Preliminary Notes Andrea Omicini Dipartimento di Informatica { Scienza e Ingegneria (DISI) Alma Mater Studiorum|Universita di Bologna, Italy Short Course @ WOA 2014 Mini-school Workshop nazionale Dagli Oggetti agli Agenti Universita di Catania, Italy 25 Settembre 2014 A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 1 / 62
  3. 3. Outline 1 Programming Paradigms for Complex System Engineering 2 Engineering MAS as Event-Based Systems 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 2 / 62
  4. 4. Programming Paradigms for Complex System Engineering Outline 1 Programming Paradigms for Complex System Engineering 2 Engineering MAS as Event-Based Systems 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 3 / 62
  5. 5. Programming Paradigms for Complex System Engineering Complexity in Software Systems Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 4 / 62
  6. 6. Programming Paradigms for Complex System Engineering Complexity in Software Systems Accidental Complexity I Accidental complexity (originally called accidental diculty [Brooks, 1987]) is not related to the application problem, but rather to our lack of appropriate abstractions and tools to directly handle the essence of the problem (essential complexity) Whereas [Brooks, 1987] claims that software engineers nowadays mostly deal with essential complexity due to the high-level languages and frameworks available, new application scenarios have generated new forms of accidental complexity A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 5 / 62
  7. 7. Programming Paradigms for Complex System Engineering Complexity in Software Systems Accidental Complexity II Sources of accidental complexity [Milicevic et al., 2013] distributed interaction | the distributed architecture of multiple servers running on the cloud (server farms) interacting with clients running on dierent platforms (e.g., smartphones, web browsers, desktop widgets, etc.) abstraction gap | between the problem-domain level (high-level, often event-driven) and the implementation-level (low-level messages, queues, schedulers, asynchronous callbacks) shared data consistency | many sources of data are replicated and distributed, and accessed concurrently|as well as distributed resources, more generally concurrency issues | such as data races, atomicity violations, deadlocks, etc. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 6 / 62
  8. 8. Programming Paradigms for Complex System Engineering Complexity in Software Systems Distributed Event-Based Systems Nowadays, applications are increasingly distributed and event-driven [Milicevic et al., 2013] According to [Fiege et al., 2002], the event-based architectural style has become prevalent for large-scale distributed applications due to the inherent loose coupling of the participants facilitates the clear separation of communication from computation carries the potential for easy integration of autonomous, heterogeneous components into complex systems that are easy to evolve and scale A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 7 / 62
  9. 9. Programming Paradigms for Complex System Engineering Complexity in Software Systems Object Event-Based Systems Object-oriented languages, frameworks, and platforms are still dominating the SE landscape The same application
  10. 10. eld (human-computer graphical interfaces) that made object-oriented languages mainstream is where event-driven programming fully developed
  11. 11. rst So, object-oriented and event-driven programming represent a good match However, distributed computing with object-oriented programming suers from an abstraction gap: distributed objects requires either the design of distributed control or total transparency A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 8 / 62
  12. 12. Programming Paradigms for Complex System Engineering Complexity in Software Systems Agent-Based Event-Based Systems Agent-based engineering for complex software systems Encapsulation of control makes agents overcome the abstraction gap of OOP [Odell, 2002] Agent abstractions inherently deal with distribution [Jennings, 2000] Agent autonomy {{ along with the associated agent features such as sociality, pro-activeness, situatedness, and the like { make agent-oriented software engineering (AOSE) a viable approach for engineering complex software systems [Jennings, 2001] Extra agent features such as mobility and intelligence make AOSE the most eective approach available for the engineering of intelligent and pervasive distributed systems [Zambonelli and Omicini, 2004] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 9 / 62
  13. 13. Programming Paradigms for Complex System Engineering Mixing Paradigms Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 10 / 62
  14. 14. Programming Paradigms for Complex System Engineering Mixing Paradigms Agent-Oriented vs. Object-Oriented Computing Agents are not objects [Graesser, 1996], but they can mixed up with objects|e.g., by wrapping objects as agents [Odell, 2002] Agent middleware can build upon object middleware to enable the paradigm shift|e.g., Jade [Bellifemine et al., 2007], TuCSoN [Omicini and Zambonelli, 1999] The artefact notion works as a conceptually-coeherent bridge between agents and objects [Omicini et al., 2008] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 11 / 62
  15. 15. Programming Paradigms for Complex System Engineering Mixing Paradigms The AA Metamodel In the agents artefacts (AA) meta-model [Omicini et al., 2008], in short agents are autonomous computational entities, encapsulating control along with a criterion to govern it artefacts are computational entities aimed to be used by agents By extending the reach of the object notion to artefacts, agents can use objects in a MAS, thus making agent / object interaction sound from both a conceptual and a technical viewpoint A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 12 / 62
  16. 16. Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 13 / 62
  17. 17. Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems Agents-Events Integration? Either indirectly, since objects-oriented programming straightforwardly couples with event-driven systems agents can mixup with objects|by either wrapping objects, or using them as artefacts or directly, since agents are supposed to be reactive to change [Wooldridge and Jennings, 1995] agents and MAS are supposed to be situated [Weyns et al., 2007] agents and events could cope well, in principle, thus allowing for a seamless integration A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 14 / 62
  18. 18. Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems Examples I Integrating MAS with event-based system (EBS) Most of the agent architectures adopts some eective notion of event, in order to provide for agent reactiveness|e.g., BDI architectures [Rao and George, 1991] Most of the agent middlewares provide some event-based abstractions and mechanisms so as to deal with asynchronous message passing and environment change{{{such as Jade [Bellifemine et al., 2007] and TuCSoN [Omicini and Zambonelli, 1999] [Aiello et al., 2011] presents an agent-based architecture for coordinating event streams from WBSN ELDA is an event-driven agent meta-model [Fortino et al., 2010] eXAT [Di Stefano and Santoro, 2005] is an agent programming platform exploiting the Erlang concurrent language [Armstrong et al., 1996] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 15 / 62
  19. 19. Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems Examples II Integrating actors with event-based system Event-based actors allow for event-based programming without inversion of control [Haller and Odersky, 2006] Scala actors unify event-based with thread-based programming [Haller and Odersky, 2009] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 16 / 62
  20. 20. Programming Paradigms for Complex System Engineering Agent-Based vs. Event-Based Systems Issues However, the above examples just emphasise the need for the integration of the two paradigms, without providing a coherent and uniform conceptual framework for both Should we be content with the mere integration of technologies? What about conceptual integrity? Could we aim at a whole, coherent uniform conceptual framework for MAS and EBS ? A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 17 / 62
  21. 21. Engineering MAS as Event-Based Systems Outline 1 Programming Paradigms for Complex System Engineering 2 Engineering MAS as Event-Based Systems 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 18 / 62
  22. 22. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 19 / 62
  23. 23. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Caveat Lector The notions of event-based systems, event-based programming, event-driven programming are more or less ubiquitous in Computer Science literature Neither terminology is uniform, nor the many diverse ontologies are overall fully consistent What is considered essential, or, fundamental by researchers and teachers often does not coincide However, some shared ideas and terms can be pointed out to provide for a common ontology and terminology for event-based systems A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 20 / 62
  24. 24. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Terminology for Event-Based Systems De
  25. 25. nition According to [Fiege et al., 2002], an event-based systems (EBS) is a system in which the integrated components communicate by generating and receiving event noti
  26. 26. cations An event is an occurrence of a happening relevant for the system, e.g. a state change in some component A noti
  27. 27. cation is the rei
  28. 28. cation of an event within the system, and provides for its description A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 21 / 62
  29. 29. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Event Models Dierent event models can be supported by dierent sorts of noti
  30. 30. cations, e.g. [Fiege et al., 2002] name/value pairs [Carzaniga et al., 2001] objects [Eugster et al., 2001] semi-structured data [Fiege et al., 2003] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 22 / 62
  31. 31. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Middleware and Events At the middleware level, noti
  32. 32. cations may take the form of messages, or, of any speci
  33. 33. c form adopted / promoted by the middleware services Being transmitted in the same way and format of messages does not make them messages in all aspects Event noti
  34. 34. cation service An event noti
  35. 35. cation service, or event system for short, applies dierent techniques and data and
  36. 36. lter models to distribute noti
  37. 37. cations between the components of an event-based system [Fiege et al., 2002] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 23 / 62
  38. 38. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Event-Based Architectures Components in event-based systems act as either producers or consumers of noti
  39. 39. cations Producers publish noti
  40. 40. cations, and provide an output interface for subscription Consumers subscribe to noti
  41. 41. cations as speci
  42. 42. ed by producers Being not real messages, noti
  43. 43. cations have not a designed receiver: they are distributed by the event noti
  44. 44. cation service to consumers that subscribed to that sort of noti
  45. 45. cation Expressiveness of subscriptions depends on the data model and
  46. 46. lter language used A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 24 / 62
  47. 47. Engineering MAS as Event-Based Systems Essentials of Event-Based Systems Issues in Event-Based Systems Mechanisms [Fiege et al., 2002] noti
  48. 48. cation
  49. 49. ltering noti
  50. 50. cation distribution Software engineering inversion of control [Haller and Odersky, 2006] coordination of events [Milicevic et al., 2013] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 25 / 62
  51. 51. Engineering MAS as Event-Based Systems MAS as Event-Based Systems Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 26 / 62
  52. 52. Engineering MAS as Event-Based Systems MAS as Event-Based Systems Rethinking MAS Meta-Model The MAS triad: agents, society, environment agents are the autonomous computational entities encapsulating the designed (sub)goals for the MAS, which are expressed through their own course of actions environment captures the unpredictability of the MAS context, by modelling the external resources and features that are relevant for the MAS, along with their change over time societies represent the ensembles where the collective behaviours of the MAS are regulated towards the achievement of the overall system goals A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 27 / 62
  53. 53. Engineering MAS as Event-Based Systems MAS as Event-Based Systems Agents Environment as Event Sources From a SE viewpoint, agents and environment are the abstractions representing the only sources of events in a MAS agents represent the designed source of events, autonomously driving control towards their own goals, and producing internal events through their actions environment models the external events which are relevant for the MAS, whose dynamics is in principle unpredictable, through abstractions of some sorts { environment resources, sensors actuators, probes { that also capture the diversity of environment A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 28 / 62
  54. 54. Engineering MAS as Event-Based Systems MAS as Event-Based Systems An Event-based View of MAS MAS can be seen as event-based systems, where agents encapsulate internal events|more generally, they encapsulate the activities in MAS that generate events according to some application criterion environment models external events through dedicated abstraction|thus capturing the dynamics of the unpredictable events external but relevant to MAS A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 29 / 62
  55. 55. Engineering MAS as Event-Based Systems MAS as Event-Based Systems Bene
  56. 56. ts of MAS as EBS since agents encapsulate control along with the criteria for control { expressed in terms of high level abstractions such as beliefs, goals, intentions, plans { articulated events histories are modelled along with their motivations in MAS as EBS since environment is modelled as a
  57. 57. rst-class event-based abstraction, all causes of change and disruption in a MAS are modelled in a uniform way as event pro-sumers A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 30 / 62
  58. 58. Engineering MAS as Event-Based Systems MAS as Event-Based Systems Architectural Requirements for MAS as EBS agent autonomy | boundary artefacts for agents environment diversity | boundary artefacts for probes As a resulting bene
  59. 59. t, boundary artefacts can deal with diversity of all sorts of events, and translate them all according to a common general event model A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 31 / 62
  60. 60. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 32 / 62
  61. 61. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View An Event-based View of MAS as Interacting Systems MAS can be seen as event-based systems, where agents encapsulate internal events environment models external events through dedicated abstraction ! social abstractions of some sort take care of dealing with interaction agent-agent interaction agent-environment interaction environment-environment interaction and, any other more complex pattern of interaction taking care of their mutual dependencies, by coordinating the many resulting ows of events [Malone and Crowston, 1994] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 33 / 62
  62. 62. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View Harnessing the Complexity of Interaction An essential source of complexity for computational systems is interaction [Wegner, 1997] Coordination models work by constraining the space of interaction [Wegner, 1996] So, in principle, coordination abstractions and technologies can help harnessing the intricacies of interaction in the engineering of complex software systems A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 34 / 62
  63. 63. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View The Nature of Coordination Models According to [Ciancarini, 1996], A coordination model provides a framework in which the interaction of active and independent entities called agents can be expressed Coordination: a meta-model [Ciancarini, 1996] The components of a coordinated system are Coordination entities | the entities whose mutual interaction is ruled by the model, also called the coordinables, or agents Coordination media | the abstractions enabling and ruling interaction among coordinables Coordination laws | the rules governing the observable behaviour of coordinables, the behaviour coordination media, as well as their interactions of any sort A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 35 / 62
  64. 64. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View Coordination as Constrained Interaction [Wegner, 1996] Coordination models harness the complexity of interaction by disciplining the space of admissible interactions [Omicini, 1999] the coordination primitives provided by a coordination model constrain the possibile agent actions the coordination media provided by a coordination model constrain the possible targets of agent actions Coordination models as constrainers of interaction A coordination model constrains its coordinables (agents) to interact via a limited yet (possibly) expressive set of primitives acting on a class of pre-de
  65. 65. ned media of coordination, whose computational behaviour de
  66. 66. nes the laws of coordination A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 36 / 62
  67. 67. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View Event-Based Coordination The potential of event-based coordination has been recognized both in academia and industry and there exists a considerable amount of work on event noti
  68. 68. cation systems [Fiege et al., 2002] a number of event-based middleware providing such services, such as JEDI [Cugola et al., 2001] a number of event-based coordination models [Papadopoulos and Arbab, 1998, Viroli et al., 2002], technologies [Freeman et al., 1999], and formalisms [Omicini, 1999, Viroli and Ricci, 2002] witness the role of event-based middleware in the engineering of complex distributed systems, as well as the event-based nature of the most relevant coordination models, such as tuple-based ones [Omicini, 1999] A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 37 / 62
  69. 69. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View Coordination in MAS Given that artefacts are the reactive abstractions in MAS [Omicini et al., 2008] coordination artefacts are the social abstractions in charge of managing dependencies [Malone and Crowston, 1994] the social abstractions in charge of coordinating multiple event ow according to their mutual dependencies in MAS are the coordination artefacts [Omicini et al., 2004] Coordination models in MAS The role of coordination models in MAS [Ciancarini et al., 2000] is to provide event-driven coordination media as the coordination artefacts governing event coordination in MAS A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 38 / 62
  70. 70. Engineering MAS as Event-Based Systems MAS Coordination: An Event-driven View Bene
  71. 71. ts of MAS Coordination as EBS Since all events are uniformly represented through the same general event model { the same language for noti
  72. 72. cations {, coordination artefacts can be used to deal with both social and situated dependencies, governing agent-agent, agent-environment, environment-environment interaction through the same set of coordination abstractions, languages, and mechanisms [Mariani and Omicini, 2014] Coordination artefacts provide a speci
  73. 73. c, event-based computational model for dealing with event observation, manipulation, and coordination Coordination artefacts encapsulate the logic for the coordination of multiple related ows of events, thus counterfeiting inversion of control A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 39 / 62
  74. 74. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN Outline 1 Programming Paradigms for Complex System Engineering Complexity in Software Systems Mixing Paradigms Agent-Based vs. Event-Based Systems 2 Engineering MAS as Event-Based Systems Essentials of Event-Based Systems MAS as Event-Based Systems MAS Coordination: An Event-driven View A Case Study in MAS Coordination as EBS: TuCSoN 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 40 / 62
  75. 75. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN TuCSoN Architecture I A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 41 / 62
  76. 76. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN TuCSoN Architecture II agents | Any computational entity willing to exploit TuCSoN coordination services. Agents should request and obtain an ACC from the TuCSoN node. Any action from any agent towards the MAS { either social or situated { is then mediated by its associated ACC. ACC | Agent coordination contexts [Omicini, 2002] are TuCSoN boundary artefacts devoted to agents. ACC both enable and constraint agents interactions: in particular, ACCs map every agent operation into events asynchronously dispatched to tuple centres. ACCs thus decouple agents from MAS in control, reference, space, and time. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 42 / 62
  77. 77. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN TuCSoN Architecture III probes | Environmental resources in TuCSoN are called probes. They are dealt with as sources of perceptions (aka sensors) or makers of actions (aka actuators) in a uniform way. Probes do not directly interact with the MAS, but through mediation of their associated transducer. transducers | TuCSoN transducers [Casadei and Omicini, 2009] are the boundary artefacts devoted to probes. Each probe is assigned to a transducer, which is specialised to handle events from that probe, and to act on probes through situation operations. Transducers thus decouple in control, reference, space and time probes from tuple centres. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 43 / 62
  78. 78. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN TuCSoN Architecture IV events | TuCSoN adopts and generalises the ReSpecT event model. Events are the run-time data structure representing both activities and change in a uniform way. ACC and transducers translate external events (activities and change) into internal events (operations and situations) that tuple centres can handle to implement the policies required for MAS coordination tuple centres | TuCSoN architectural component implementing coordination artefacts, thus in charge of managing dependencies. As such, they are meant to govern both social and situated interactions [Omicini and Mariani, 2013]. By adopting ReSpecT tuple centres, TuCSoN relies on (i) the ReSpecT language to program coordination laws, and (ii) the ReSpecT situated event model to implement events A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 44 / 62
  79. 79. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN TuCSoN Event Model I hEventi ::= hStartCausei , hCausei , hEvaluationi hStartCausei ; hCausei ::= hActivityi j hChangei , hSourcei , hTargeti , hTimei , hSpace:Placei hSourcei ; hTargeti ::= hAgentIdi j hCoordArtefactIdi j hEnvResIdi j ? hEvaluationi ::= ? j fhResultig Table: ReSpecT situated event model A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 45 / 62
  80. 80. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN TuCSoN Event Model II hActivityi ::= hOperationi j hSituationi hOperationi ::= out( hTuplei ) j (in j rd j no j inp j rdp j nop) ( hTemplatei [, hTermi] ) hSituationi ::= getEnv( hKeyi , hValuei ) j setEnv( hKeyi , hValuei ) hChangei ::= env( hKeyi , hValuei ) j time( hTimei ) j from( hSpacei , hPlacei ) j to( hSpacei , hPlacei ) Table: ReSpecT triggering events A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 46 / 62
  81. 81. Engineering MAS as Event-Based Systems A Case Study in MAS Coordination as EBS: TuCSoN Event-Based TuCSoN: Summing Up In a TuCSoN-coordinated MAS ACCs and transducers represent agents and environment, respectively, in the MAS, by translating activities and changes in a common event model Tuple centres deals with both social and situated dependencies by making it possible to program the coordination of all sort of event in a uniform way In essence, TuCSoN seemingly provides both a model and a technology to engineer coordinated MAS as EBS A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 47 / 62
  82. 82. Conclusion Outline 1 Programming Paradigms for Complex System Engineering 2 Engineering MAS as Event-Based Systems 3 Conclusion A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 48 / 62
  83. 83. Conclusion Summing Up A unifying conceptual framework for MAS and EBS is possible could work as the foundation of a principled discipline for the engineering of complex software systems by promoting a coherent integration of agent-based and event-based abstractions, languages, technologies, and methods Interaction is a key issue as far as system complexity is concerned requires the availability of suitably-expressive event-driven coordination models and middleware for a disciplined engineering of complex MAS as EBS A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 49 / 62
  84. 84. References References I Aiello, F., Bellifemine, F. L., Fortino, G., Galzarano, S., and Gravina, R. (2011). An agent-based signal processing in-node environment for real-time human activity monitoring based on wireless body sensor networks. Engineering Applications of Arti
  85. 85. cial Intelligence, 24(7):1147{1161. Armstrong, J., Virding, R., Wikstrom, C., and Williams, M. (1996). Concurrent Programming in Erlang. Prentice Hall International, 2nd edition. Bellifemine, F. L., Caire, G., and Greenwood, D. (2007). Developing Multi-Agent Systems with JADE. Wiley. Brooks, F. P. (1987). No Silver Bullet Essence and Accidents of Software Engineering. Computer, 20(4):10{19. Carzaniga, A., Rosenblum, D. S., and Wolf, A. L. (2001). Design and evaluation of a wide-area event noti
  86. 86. cation service. ACM Transactions on Computer Systems, 19(3):332{383. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 50 / 62
  87. 87. References References II Casadei, M. and Omicini, A. (2009). Situated tuple centres in ReSpecT. In Shin, S. Y., Ossowski, S., Menezes, R., and Viroli, M., editors, 24th Annual ACM Symposium on Applied Computing (SAC 2009), volume III, pages 1361{1368, Honolulu, Hawai'i, USA. ACM. Ciancarini, P. (1996). Coordination models and languages as software integrators. ACM Computing Surveys, 28(2):300{302. Ciancarini, P., Omicini, A., and Zambonelli, F. (2000). Multiagent system engineering: The coordination viewpoint. In Jennings, N. R. and Lesperance, Y., editors, Intelligent Agents VI. Agent Theories, Architectures, and Languages, volume 1757 of LNAI, pages 250{259. Springer. 6th International Workshop (ATAL'99), Orlando, FL, USA, 15{17 July 1999. Proceedings. Cugola, G., Di Nitto, E., and Fuggetta, A. (2001). The JEDI event-based infrastructure and its application to the development of the OPSS WFMS. IEEE Transactions on Software Engineering, 27(9):827{850. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 51 / 62
  88. 88. References References III Di Stefano, A. and Santoro, C. (2005). Supporting agent development in Erlang through the eXAT platform. In Unland, R., Calisti, M., and Klusch, M., editors, Software Agent-Based Applications, Platforms and Development Kits, Whitestein Series in Software Agent Technologies, pages 47{71. Birkhauser Basel. Eugster, P. T., Guerraoui, R., and Damm, C. H. (2001). On objects and events. ACM SIGPLAN Notices, 36(11):254{269. 16th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA'01), Tampa Bay, FL, USA. Proceedings. Fiege, L., Gartner, F. C., Kasten, O., and Zeidler, A. (2003). Supporting mobility in content-based publish/subscribe middleware. In Middleware 2003, Lecture Notes in Computer Science, pages 103{122. Springer Berlin Heidelberg. ACM/IFIP/USENIX International Middleware Conference Rio de Janeiro, Brazil, June 16{20, 2003 Proceedings. Fiege, L., Muhl, G., and Gartner, F. C. (2002). Modular event-based systems. The Knowledge Engineering Review, 17(4):359{388. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 52 / 62
  89. 89. References References IV Fortino, G., Garro, A., Mascillaro, S., and Russo, W. (2010). Using event-driven lightweight DSC-based agents for MAS modelling. International Journal of Agent-Oriented Software Engineering, 4(2):113{140. Freeman, E., Hupfer, S., and Arnold, K. (1999). JavaSpaces Principles, Patterns, and Practice: Principles, Patterns and Practices. The Jini Technology Series. Addison-Wesley Longman. Graesser, S. F. A. (1996). Is it an agent, or just a program?: A taxonomy for autonomous agents. In Muller, J. P., Wooldridge, M. J., and Jennings, N. R., editors, Intelligent Agents III Agent Theories, Architectures, and Languages: ECAI'96 Workshop (ATAL) Budapest, Hungary, August 12{13, 1996 Proceedings, volume 1193 of Lecture Notes In Computer Science, pages 21{35. Springer. Haller, P. and Odersky, M. (2006). Event-based programming without inversion of control. In Lightfoot, D. E. and Szyperski, C., editors, Modular Programming Languages. 7th Joint Modular Languages Conference, JMLC 2006 Oxford, UK, September 13-15, 2006 Proceedings, number 1 in Lecture Notes in Computer Science, pages 4{22, Oxford, UK. Springer Berlin Heidelberg. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 53 / 62
  90. 90. References References V Haller, P. and Odersky, M. (2009). Scala actors: Unifying thread-based and event-based programming. Theoretical Computer Science, 410(2-3):202{220. Jennings, N. R. (2000). On agent-based software engineering. Arti
  91. 91. cial Intelligence, 117(2):277{296. Jennings, N. R. (2001). An agent-based approach for building complex software systems. Communications of the ACM, 44(4):35{41. Malone, T. W. and Crowston, K. (1994). The interdisciplinary study of coordination. ACM Computing Surveys, 26(1):87{119. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 54 / 62
  92. 92. References References VI Mariani, S. and Omicini, A. (2014). Coordination in situated systems: Engineering mas environment in TuCSoN. In Fortino, G., Di Fatta, G., Li, W., Ochoa, S., Cuzzocrea, A., and Pathan, M., editors, Internet and Distributed Computing Systems, volume 8729 of Lecture Notes in Computer Science, pages 99{110. Springer International Publishing. 7th International Conference on Internet and Distributed Computing Systems (IDCS 2014), Calabria, Italy, 22-24 September 2014, Proceedings. Milicevic, A., Jackson, D., Gligoric, M., and Marinov, D. (2013). Model-based, event-driven programming paradigm for interactive Web applications. In 2013 ACM International Symposium on New Ideas, New Paradigms, and Re ections on Programming Software (Onward!'13), pages 17{36, New York, NY, USA. ACM Press. Odell, J. J. (2002). Objects and agents compared. Journal of Object Technology, 1(1):41{53. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 55 / 62
  93. 93. References References VII Omicini, A. (1999). On the semantics of tuple-based coordination models. In 1999 ACM Symposium on Applied Computing (SAC'99), pages 175{182, New York, NY, USA. ACM. Special Track on Coordination Models, Languages and Applications. Omicini, A. (2002). Towards a notion of agent coordination context. In Marinescu, D. C. and Lee, C., editors, Process Coordination and Ubiquitous Computing, chapter 12, pages 187{200. CRC Press, Boca Raton, FL, USA. Omicini, A. and Mariani, S. (2013). Coordination for situated MAS: Towards an event-driven architecture. In Moldt, D. and Rolke, H., editors, International Workshop on Petri Nets and Software Engineering (PNSE'13), volume 989 of CEUR Workshop Proceedings, pages 17{22. Sun SITE Central Europe, RWTH Aachen University. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 56 / 62
  94. 94. References References VIII Omicini, A., Ricci, A., and Viroli, M. (2008). Artifacts in the AA meta-model for multi-agent systems. Autonomous Agents and Multi-Agent Systems, 17(3):432{456. Special Issue on Foundations, Advanced Topics and Industrial Perspectives of Multi-Agent Systems. Omicini, A., Ricci, A., Viroli, M., Castelfranchi, C., and Tummolini, L. (2004). Coordination artifacts: Environment-based coordination for intelligent agents. In Jennings, N. R., Sierra, C., Sonenberg, L., and Tambe, M., editors, 3rd international Joint Conference on Autonomous Agents and Multiagent Systems (AAMAS 2004), volume 1, pages 286{293, New York, USA. ACM. Omicini, A. and Zambonelli, F. (1999). Coordination for Internet application development. Autonomous Agents and Multi-Agent Systems, 2(3):251{269. Papadopoulos, G. A. and Arbab, F. (1998). Coordination models and languages. In Zelkowitz, M. V., editor, The Engineering of Large Systems, volume 46 of Advances in Computers, pages 329{400. Academic Press. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 57 / 62
  95. 95. References References IX Rao, A. S. and George, M. P. (1991). Modeling rational agents within a BDI architecture. In Allen, J. F., Fikes, R., and Sandewall, E., editors, 2nd International Conference on Principles of Knowledge Representation and Reasoning (KR'91), pages 473{484, San Mateo, CA. Morgan Kaufmann Publishers. Viroli, M., Omicini, A., and Ricci, A. (2002). On the expressiveness of event-based coordination media. In Arabnia, H. R., editor, International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA'02), volume III, pages 1414{1420, Las Vegas, NV, USA. CSREA Press. Viroli, M. and Ricci, A. (2002). Tuple-based coordination models in event-based scenarios. In 22nd International Conference on Distributed Computing Systems, pages 595{601. IEEE CS. Proceedings of the Workshops. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 58 / 62
  96. 96. References References X Wegner, P. (1996). Coordination as constrained interaction. In Ciancarini, P. and Hankin, C., editors, Coordination Languages and Models. First International Conference, COORDINATION '96 Cesena, Italy, April 15{17, 1996. Proceedings, Lecture Notes in Computer Science, pages 28{33, Cesena, Italy. Springer Berlin Heidelberg. Wegner, P. (1997). Why interaction is more powerful than algorithms. Communications of the ACM, 40(5):80{91. Weyns, D., Omicini, A., and Odell, J. J. (2007). Environment as a
  97. 97. rst-class abstraction in multi-agent systems. Autonomous Agents and Multi-Agent Systems, 14(1):5{30. Wooldridge, M. J. and Jennings, N. R. (1995). Intelligent agents: Theory and practice. Knowledge Engineering Review, 10(2):115{152. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 59 / 62
  98. 98. References References XI Zambonelli, F. and Omicini, A. (2004). Challenges and research directions in agent-oriented software engineering. Autonomous Agents and Multi-Agent Systems, 9(3):253{283. Special Issue: Challenges for Agent-Based Computing. A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 60 / 62
  99. 99. Extras URLs Slides On APICe http://apice.unibo.it/xwiki/bin/view/Talks/EbsmasWoa2014 On SlideShare http://www.slideshare.net/andreaomicini/ event-based-vs-multi-agent-systems-towards-a-unified-conceptual-framework- preliminary-notes A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 61 / 62
  100. 100. Event-Based vs. Multi-Agent Systems: Towards a Uni
  101. 101. ed Conceptual Framework Preliminary Notes Andrea Omicini Dipartimento di Informatica { Scienza e Ingegneria (DISI) Alma Mater Studiorum|Universita di Bologna, Italy Short Course @ WOA 2014 Mini-school Workshop nazionale Dagli Oggetti agli Agenti Universita di Catania, Italy 25 Settembre 2014 A. Omicini (DISI, UniBO) Event-Based vs. Multi-Agent Systems WOA 2014 { 25/9/2014 62 / 62

×