Space-aware Coordination in RespecT

791 views

Published on

Spatial issues are essential in new classes of complex software systems, such as pervasive, multi-agent, and self-organising ones. Understanding the basic mechanisms of spatial coordination is a fundamental issue for coordination models and languages in order to deal with such systems, governing situated interaction in the spatio-temporal fabric. Along this line, in this talk we make space-aware coordination media out of ReSpecT tuple centres, by introducing the few basic mechanisms and constructs that enable the ReSpecT language to face most of the main challenges of spatial coordination in complex software systems.
[Talk @ WOA 2013]

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
791
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Space-aware Coordination in RespecT

  1. 1. Space-aware Coordination in ReSpecT Stefano Mariani Andrea Omicini {s.mariani, andrea.omicini}@unibo.it DISI Alma Mater Studiorum—Universit` di Bologna a WOA 2013 Torino, Italy 2 December 2013 Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 1 / 42
  2. 2. Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 2 / 42
  3. 3. Motivations & Goals Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 3 / 42
  4. 4. Motivations & Goals The Need for Spatial Coordination Spatial issues are fundamental in many sorts of complex software systems, including intelligent, multi-agent, adaptive, and self-organising ones [Beal et al., 2011]. Spatial coordination Understanding the basic mechanisms of spatial coordination is a fundamental issue for coordination models and languages in order to govern situated interaction in the spatio-temporal fabric. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 4 / 42
  5. 5. Motivations & Goals Goal of the Work In this work we aim at devising out the fundamental abstractions the basic mechanisms the linguistic constructs required to generally enable and promote space-aware coordination defining their embodiment in terms of the tuple centre coordination medium the ReSpecT coordination language Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 5 / 42
  6. 6. Motivations & Goals Outline of the Work Along this line, we discuss the issues of spatial coordination devise out the general requirements for space-aware coordination media introduce the specific notion of space-aware tuple centre show how the ReSpecT coordination language can be extended so as to support space-aware coordination Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 6 / 42
  7. 7. Space-aware Coordination Media Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 7 / 42
  8. 8. Space-aware Coordination Media Spatial issues Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 8 / 42
  9. 9. Space-aware Coordination Media Spatial issues Situatedness & Awareness I Spatial coordination requires spatial situatedness spatial awareness of the coordination media This translates in a number of technical requirements Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 9 / 42
  10. 10. Space-aware Coordination Media Spatial issues Situatedness & Awareness II Situatedness A space-aware coordination abstraction should at any time be associated to an absolute positioning, both physical and virtual In fact, software abstractions may move along a virtual space – typically, the network – which is usually discrete whereas physical devices move through a physical space, which is mostly continuous However, software abstractions may also be hosted by mobile physical devices, thus share their motion. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 10 / 42
  11. 11. Space-aware Coordination Media Spatial issues Situatedness & Awareness III Awareness The position of the coordination medium should be available to the coordination laws it contains in order to make them capable of reasoning about space—so, to implement space-aware coordination laws. Also, space has to be embedded into the working cycle of the coordination medium: a spatial event should be generated within a coordination medium, conceptually corresponding to changes in space then, such events should be captured by the coordination medium, and used to activate space-aware coordination laws Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 11 / 42
  12. 12. Space-aware Coordination Media Space-aware tuple centres Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 12 / 42
  13. 13. Space-aware Coordination Media Space-aware tuple centres Tuple Centres Technically, a tuple centre is a programmable tuple space, i.e., a tuple space whose behaviour in response to (coordination) events can be programmed so as to specify and enact any coordination policy [Omicini and Denti, 2001b, Omicini, 2007]. General-purpose coordination media Tuple centres can then be thought as general-purpose coordination abstractions, which can be suitably forged to provide specific coordination services. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 13 / 42
  14. 14. Space-aware Coordination Media Space-aware tuple centres Space-aware Tuple Centres I The location of a tuple centre is obtained through the notion of current place i.e., the absolute position of the computational device where the coordination medium is running, or the domain name of node hosting the tuple centre Motion is conceptually represented by two sorts of spatial events: leaving from a starting place stopping at an arrival place in any sort of space / place Analogously to (coordination) operation and time events, it is possible to specify reactions triggered by spatial events—the so-called spatial reactions Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 14 / 42
  15. 15. Space-aware Coordination Media Space-aware tuple centres Space-aware Tuple Centres II Space-aware coordination policies As a result, a spatial tuple centre can be programmed to react to motion in either a physical or a virtual space so as to enforce space-aware coordination policies. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 15 / 42
  16. 16. Spatial ReSpecT Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 16 / 42
  17. 17. Spatial ReSpecT Basic ReSpecT Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 17 / 42
  18. 18. Spatial ReSpecT Basic ReSpecT ReSpecT I ReSpecT tuple centres ReSpecT tuple centres are based on first-order logic (FOL), which is adopted both for the communication language (logic tuples), and for the behaviour specification language (ReSpecT) [Omicini and Denti, 2001a]. Basically, reactions in ReSpecT are defined as Prolog-like facts (reaction specification tuples) of the form reaction(Activity , Guards , Reactions ) A reaction specification tuple specifies the list of the operations (Reactions ) to be executed when a given event occurs (called triggering event, caused by an Activity ) and some conditions on the event hold (Guards evaluate to true). Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 18 / 42
  19. 19. Spatial ReSpecT Basic ReSpecT ReSpecT II Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 19 / 42
  20. 20. Spatial ReSpecT Language extension Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 20 / 42
  21. 21. Spatial ReSpecT Language extension Spatial Observation Predicates current place(@S ,?P ) succeeds if P unifies with the position of the node which the tuple centre belongs to event place(@S ,?P ) succeeds if P unifies with the position of the node where the triggering event was originated start place(@S ,?P ) succeeds if P unifies with the position of the node where the event chain that led to the triggering event was originated The node position can be specified as either S =ph its absolute physical position S =ip its IP number S =dns its domain name S =map its geographical location—as typically defined by mapping services like Google Maps S =org its organisational position—that is, a location within an organisation-defined virtual topology Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 21 / 42
  22. 22. Spatial ReSpecT Language extension Spatial Guard Predicates at(@S ,@P ) succeeds when the tuple centre is currently executing at the position P , specified according to S near(@S ,@P ,@R ) succeeds when the tuple centre is currently executing at the position included in the spatial region with centre P and radius R , specified according to S Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 22 / 42
  23. 23. Spatial ReSpecT Language extension Spatial Event Descriptors from(?S ,?P ) matches a spatial event raised when the device hosting the tuple centre starts moving from position P , specified according to S . to(?S ,?P ) matches a spatial event raised when the device hosting the tuple centre stops moving and reaches position P , specified according to S . As a result, the following are admissible reaction specification tuples dealing with spatial events: reaction(from(?Space ,?Place ), Guards , Reactions ). reaction(to(?Space ,?Place ), Guards , Reactions ). Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 23 / 42
  24. 24. Spatial ReSpecT Language extension Spatial Extension Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 24 / 42
  25. 25. Spatial ReSpecT Virtual Machine extension Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 25 / 42
  26. 26. Spatial ReSpecT Virtual Machine extension Extended Event Model I The first fundamental extension to the event model is clearly depicted in Table II: a new sort of spatial Activity is introduced ! In particular, the notion of Situation activity is extended with the two spatial activities from( Space Place ), to( Space Place ) Another issue is represented by spatial qualification of events, that is, making all ReSpecT events featuring spatial properties—in the same way as for temporal properties in [Omicini et al., 2005] ! This is represented by the Space:Place property featured by Cause – and StartCause , of course –, as shown in Table III, where the extended ReSpecT event model is depicted. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 26 / 42
  27. 27. Spatial ReSpecT Virtual Machine extension Extended Event Model II Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 27 / 42
  28. 28. Spatial ReSpecT Virtual Machine extension Extended Transition System I The operational semantics of a ReSpecT tuple centre is expressed by a transition system over a state represented by the labelled triple OpE ,SitE Tu, Re, Op OutE [Casadei and Omicini, 2009]—abstracting n away from the specification tuples Σ OutE is automatically emptied by emitting the outgoing events In the same way, OpE and SitE are automatically extended whenever a new incoming (either operation or situation) event enters a tuple centre ! In particular, SitE is added new environment events by the associated transducers [Casadei and Omicini, 2009], new time events by the flow of time [Omicini et al., 2005], and also new spatial events whenever some sort of motion takes place Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 28 / 42
  29. 29. Spatial ReSpecT Virtual Machine extension Extended Transition System II The behaviour of a ReSpecT tuple centre is modelled by a transition system composed of four different transitions [Casadei and Omicini, 2009]: reaction (−→r ), situation (−→s ), operation (−→o ), log (−→l ) ! Quite intuitively, spatial events are handled – in the same way as time and environment events – by the situation transition, which triggers ReSpecT spatial reactions Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 29 / 42
  30. 30. Expressiveness via Examples Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 30 / 42
  31. 31. Expressiveness via Examples Spheric Broadcasting I Requirements: a message has to be locally spread in the environment (e.g. network of nodes), so as to be perceived only by nearby agents you want to do so through a distributed, collaborative dissemination process the distance defining “locally” can be thought of as a “straight-line” radius, identifying a three-dimensional sphere around the point where the message is firstly created Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 31 / 42
  32. 32. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Expressiveness via Examples Spheric Broadcasting II % 1) Get agent message % 1.1) Delete garbage tuple ... % 1.2) Check range then forward reaction ( out ( spheric ( Msg,Radius )) , ( operation,completion ), ( current_place ( ph,RecPos ) , % Current position start_place ( ph,SendPos ) , % Starting position in_range ( R e c P o s , S e n d P o s , R a d i u s ) , % Prolog computation start_source ( Sender ) , start_time ( Time ) , out ( msg ( Ms g, Se n de r, Ti m e )) , rd ( neighbours ( Nbrs )) , List of neighbours out ( forward ( N b rs ,M sg , Ra di us )) )). % 2) Forward to every neighbour % 2.1) Delete garbage tuple ... % 2.2) Neighbour list not empty reaction ( out ( forward ([ Nbr | Nbrs ] ,Msg,Radius )) , internal, ( Nbr ? out ( spheric ( Msg,Radius )) , % Forward out ( forward ( N b rs ,M sg , Ra di us )) )). % Iterate Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 32 / 42
  33. 33. Expressiveness via Examples Spheric Broadcasting III Given a virtual topology is reified in the tuple neighbours, we get that any message embedded in a spheric tuple is autonomously spread solely to Radius-reachable neighbouring tuple centres This is made possible by the start place/1 observation predicate, inspecting the place where the first spheric broadcast request was issued—regardless of the number of tuple centre hops taken to forward the request “Basic”, spatial-coordination mechanisms ? What if we replace current place(ph,RecPos) with current place(dns,RecPos)? ? What if we replace start place with event place? Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 33 / 42
  34. 34. Expressiveness via Examples Monitored Motion I Requirements: you have an autonomous mobile device – e.g. a simple wheel-equipped robot – that has to reach a given destination this implies that the mobile device should start moving when asked to do so monitor its own position so as to understand when given destination is reached, if obstacles are on its way, etc. finally stop when due Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 34 / 42
  35. 35. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Expressiveness via Examples Monitored Motion II % 1) Compute motion vector then start moving reaction ( out ( move ( Dest,TStep )) , ( o p e r a t i o n , c o m p l e t i o n ) , ( current_place ( ph,Here ) , current_time ( Now ) , Check is Now + TStep, direction ( Dest,Here,Vec ) , % Prolog computation out_s ( ... ) , % Schedule monitoring ( Reaction 2) curre nt_targ et ( _@Node ) , % Get node id m ot io n_ d ev @N od e <- env ( dir,Vec ) , % Set direction m ot io n_ d ev @N od e <- env ( engine, ’ on ’) )). % Move on % 2) Monitor destination arrival reaction ( time ( Check ) , internal, % Time to check ( current_place ( ph,Here ) , rd ( move ( Dest,TStep )) , ( check ( Here,Dest ) , % Prolog computation curr ent_targ et ( _@Node ) , % Get node id m ot io n_ d ev @N o de <- env ( engine, ’ off ’) ; % Prolog ’ if-then-else ’ current_time ( Now ) , Check is Now + TStep, out_s ( ... ) ))). % Schedule monitoring ( Reaction 2) % 3) Arrival clean-up reaction ( to ( Dest ) , internal, in ( move ( Dest,_ )) ). % Dest . reached Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 35 / 42
  36. 36. Conclusion, Ongoing & Future Work Outline 1 Motivations & Goals 2 Space-aware Coordination Media Spatial issues Space-aware tuple centres 3 Spatial ReSpecT Basic ReSpecT Language extension Virtual Machine extension 4 Expressiveness via Examples 5 Conclusion, Ongoing & Future Work Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 36 / 42
  37. 37. Conclusion, Ongoing & Future Work Conclusion Spatial situation is a requirement for many advanced application scenarios Coordination models should be enhanced to handle situated interaction Coordination media should be enhanced to address all the need of space-aware coordination Tuple centres can be extended to become space-aware coordination media ReSpecT can be extended to enable space-aware coordination policies Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 37 / 42
  38. 38. Conclusion, Ongoing & Future Work Ongoing & Future Work Implementation of space-aware ReSpecT tuple centres completed ReSpecT tuple centres provided as coordination media of the TuCSoN coordination middleware [TuCSoN, 2013] Android version in beta version Experiments on Android devices and mobile computers Spatial transducers for a range of diverse mobile sensors & devices Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 38 / 42
  39. 39. References References I Beal, J., Michel, O., and Schultz, U. P. (2011). Spatial computing: Distributed systems that take advantage of our geometric world. ACM Trans. Auton. Adapt. Syst., 6(2):11:1–11:3. 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. Omicini, A. (2007). Formal ReSpecT in the A&A perspective. Electronic Notes in Theoretical Computer Science, 175(2):97–117. 5th International Workshop on Foundations of Coordination Languages and Software Architectures (FOCLASA’06), CONCUR’06, Bonn, Germany, 31 August 2006. Post-proceedings. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 39 / 42
  40. 40. References References II Omicini, A. and Denti, E. (2001a). Formal ReSpecT. Electronic Notes in Theoretical Computer Science, 48:179–196. Declarative Programming – Selected Papers from AGP 2000, La Habana, Cuba, 4–6 December 2000. Omicini, A. and Denti, E. (2001b). From tuple spaces to tuple centres. Science of Computer Programming, 41(3):277–294. Omicini, A., Ricci, A., and Viroli, M. (2005). Time-aware coordination in ReSpecT. In Jacquet, J.-M. and Picco, G. P., editors, Coordination Models and Languages, volume 3454 of LNCS, pages 268–282. Springer-Verlag. 7th International Conference (COORDINATION 2005), Namur, Belgium, 20–23 April 2005. Proceedings. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 40 / 42
  41. 41. References References III TuCSoN (2013). Home page. http://tucson.unibo.it/. Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 41 / 42
  42. 42. Space-aware Coordination in ReSpecT Stefano Mariani Andrea Omicini {s.mariani, andrea.omicini}@unibo.it DISI Alma Mater Studiorum—Universit` di Bologna a WOA 2013 Torino, Italy 2 December 2013 Mariani, Omicini (DISI, Alma Mater) Space-aware ReSpecT WOA 2013, 2/12/2013 42 / 42

×