Grounding ecologies on multiple spaces

22
Pervasive and Mobile Computing 8 (2012) 575–596 Contents lists available at SciVerse ScienceDirect Pervasive and Mobile Computing journal homepage: www.elsevier.com/locate/pmc Grounding ecologies on multiple spaces Francesco Tisato, Carla Simone, Diego Bernini, Marco P. Locatelli , Daniela Micucci Department of Informatics, Systems and Communication, University of Milano - Bicocca, Viale Sarca 336/U14, 20126 Milan, Italy article info Article history: Available online 2 November 2011 Keywords: Augmented ecologies Spatial models Space mappings Space-aware communication Component-based architecture abstract The paper introduces an architectural model, which pairs virtual and physical ecologies into augmented ecologies. The notion of space as a first class concept fosters a neat separation of the two main parts of an ecology: the environment and the organisms it contains. Virtual organisms view the common environment through multiple ecology spaces, described in terms of core space models and related by mappings between locations. This leads to a flexible space-aware paradigm supporting the indirect communication between organisms, including both message passing and data sharing. Finally, the paper presents a concrete framework reifying the model and an example application. © 2011 Elsevier B.V. All rights reserved. 1. Introduction An increasingly pervasive role of computer applications is to enrich the physical reality with functionalities that augment its capabilities and affordances: consider, for example, the case of applications that monitor critical areas, that contribute to artistic performances, that support the traffic of various kinds of entities (e.g., cars, robots but also information) through the environment. Actually, this is the realm of the so called pervasive computing [1] and augmented reality [2] applications. The resulting smart environment is profitably described in terms of an ecology to emphasize the basic role of the ‘‘patterns of relations between organisms and their environment’’ (Merriam-Webster), to clearly distinguish organisms from their environment and to highlight that ecologies consider interactions among organisms in that they are mediated through an environment. This paper proposes and approach where the above augmented reality applications can be conceived and implemented by taking the perspective that they are part of an augmented ecology, which captures the interplay between the real and artificial world by pairing a physical and a virtual ecology: the former one contains physical organisms that inhabit a physical environment, whereas the latter one contains virtual organisms that inhabit a virtual environment. The proposed approach encompasses an architectural model and a concrete framework [3]. The purpose of the architectural model is to define a few core concepts and laws that characterize augmented ecologies and to guide the design of augmented reality applications that realize virtual ecologies. The purpose of the concrete framework is to provide a platform, which reifies the core concepts and supports the implementation of augmented reality applications. Among the environment-related concepts that are general enough to be included by an architectural model the concept of space is the first candidate, together with a space-aware interaction paradigm. First, space and related keywords (e.g., location, proximity, distance) are the natural reference concepts to express the possibility for organisms to interact with and through an environment. Second, these interactions happen when organisms can access information localized in a space by the actions of other organisms, depending on their current interest in what that organisms did, are doing or are potentially doing, possibly according to previous interactions experiences or thanks to some shared agreements. In a complex ecology it is likely that different organisms look at the environment under subjective spatial views that are called ecology spaces, possibly corresponding to different spatial models. For example, a physical space (whatever it is) can Corresponding author. E-mail address: [email protected] (M.P. Locatelli). 1574-1192/$ – see front matter © 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.pmcj.2011.10.005

Transcript of Grounding ecologies on multiple spaces

Pervasive and Mobile Computing 8 (2012) 575–596

Contents lists available at SciVerse ScienceDirect

Pervasive and Mobile Computing

journal homepage: www.elsevier.com/locate/pmc

Grounding ecologies on multiple spacesFrancesco Tisato, Carla Simone, Diego Bernini, Marco P. Locatelli ∗, Daniela MicucciDepartment of Informatics, Systems and Communication, University of Milano - Bicocca, Viale Sarca 336/U14, 20126 Milan, Italy

a r t i c l e i n f o

Article history:Available online 2 November 2011

Keywords:Augmented ecologiesSpatial modelsSpace mappingsSpace-aware communicationComponent-based architecture

a b s t r a c t

Thepaper introduces an architecturalmodel,whichpairs virtual andphysical ecologies intoaugmented ecologies. The notion of space as a first class concept fosters a neat separationof the twomain parts of an ecology: the environment and the organisms it contains. Virtualorganisms view the common environment through multiple ecology spaces, describedin terms of core space models and related by mappings between locations. This leadsto a flexible space-aware paradigm supporting the indirect communication betweenorganisms, including both message passing and data sharing. Finally, the paper presentsa concrete framework reifying the model and an example application.

© 2011 Elsevier B.V. All rights reserved.

1. Introduction

An increasingly pervasive role of computer applications is to enrich the physical reality with functionalities that augmentits capabilities and affordances: consider, for example, the case of applications that monitor critical areas, that contributeto artistic performances, that support the traffic of various kinds of entities (e.g., cars, robots but also information) throughthe environment. Actually, this is the realm of the so called pervasive computing [1] and augmented reality [2] applications.The resulting smart environment is profitably described in terms of an ecology to emphasize the basic role of the ‘‘patternsof relations between organisms and their environment’’ (Merriam-Webster), to clearly distinguish organisms from theirenvironment and to highlight that ecologies consider interactions among organisms in that they are mediated through anenvironment.

This paper proposes and approach where the above augmented reality applications can be conceived and implementedby taking the perspective that they are part of an augmented ecology, which captures the interplay between the real andartificial world by pairing a physical and a virtual ecology: the former one contains physical organisms that inhabit a physicalenvironment, whereas the latter one contains virtual organisms that inhabit a virtual environment. The proposed approachencompasses an architectural model and a concrete framework [3]. The purpose of the architectural model is to define a fewcore concepts and laws that characterize augmented ecologies and to guide the design of augmented reality applicationsthat realize virtual ecologies. The purpose of the concrete framework is to provide a platform,which reifies the core conceptsand supports the implementation of augmented reality applications.

Among the environment-related concepts that are general enough to be included by an architectural model the conceptof space is the first candidate, together with a space-aware interaction paradigm. First, space and related keywords(e.g., location, proximity, distance) are the natural reference concepts to express the possibility for organisms to interactwith and through an environment. Second, these interactions happen when organisms can access information localized ina space by the actions of other organisms, depending on their current interest in what that organisms did, are doing or arepotentially doing, possibly according to previous interactions experiences or thanks to some shared agreements.

In a complex ecology it is likely that different organisms look at the environment under subjective spatial views that arecalled ecology spaces, possibly corresponding to different spatial models. For example, a physical space (whatever it is) can

∗ Corresponding author.E-mail address: [email protected] (M.P. Locatelli).

1574-1192/$ – see front matter© 2011 Elsevier B.V. All rights reserved.doi:10.1016/j.pmcj.2011.10.005

576 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

be viewed as a geo-referenced space, or as a continuous Cartesian space, or as a discrete grid space. Even in case of a discretespace, different viewsmight be characterized by amore or less fine granularity. Moreover, organisms often rely on a broaderinterpretation of the concept of space: they might need to consider not only physical spaces, but also address spaces, namespaces, graph spaces to represent route networks or semantic networks and so on.

The basic commonality among the different spaces useful for the organisms to interact in an ecology is that they alldefine locations where organisms can localize information so that other organisms can use it according to their interest. Toreconcile subjective views and make richer interactions possible the model should allow different organisms to localize thesame piece of information in the different ecology spaces they subjectively view. This means that the architectural modelsupports the concept ofmapping among different spaces to let organisms subjectively rely on the ecology spaces they viewwithout knowing how they are mapped into ecology spaces viewed by other organisms. Moreover, according to the ecologymetaphor, organisms should indirectly interact through the environment, even if they are not aware of the existence of otherorganisms nor share a common view of the environment. Then the proposed architectural model includes a space-awarecommunication paradigm allowing organisms to indirectly interact by generating and observing information localized inthe ecology spaces they subjectively view. The expected result is that the overall behavior of a complex ecological systememerges as the result of interactions between organisms and environment, even if organisms are not mutually aware andview different ecology spaces.

In this respect the proposed approach falls under the umbrella of the so called bio-inspired approaches, but with somerelevant differences. Actually, several bio-inspired metaphors have been proposed to model how organisms behave andinteract: e.g., physical, chemical, social or ecological metaphors (as thoroughly discussed in [4]). Thesemetaphorsmodel thebehavior and the interactions of the organisms in terms of the laws that characterize the adopted metaphor. The proposedmodel aims at supporting and integrating a variety of applications that would benefit from different metaphors; in otherwords, it recognizes that several bio-inspired kinds of interactions could co-exist in the same ecology, provided that theyrely on the core concepts of space and of spaces mapping. In fact, it is unlike that a single metaphor can aptly emulate theothers or that a designer can be forced to adopt one metaphor against the others. Moreover, in order to keep the degreeof generality required by a wide range of applications of interest, the model does not describe the internal behavior of thevirtual organisms; in other words, the model does not embed a specific metaphor describing how organisms reach thedecision to interact, but only the basic concepts and laws allowing them to interact.

The concepts and laws characterizing the model turn into architectural abstractions [5] supporting component-basedapplications [6] that realize virtual ecologies. The point wewant to make is that the architectural and technological solutionhas to be fully coherent with the ecology metaphor. Virtual organisms, which can be paired with physical organisms (bethey smart objects or users), turn into software components whose internal structure, though complex, is hidden fromother organisms. Actually, generic component-based architectures (for example, an architecture based on components andconnectors [7]) and the underlying frameworks have been proven effective for a wide range of systems, but they do notfully capture aspects that characterize the proposed ecology-oriented approach, where the focus is on the localization of theinformation and on the space-aware indirect interactions on organisms through the environment.

The rest of the paper is organized as follows. Section 2 introduces the main tenets of the architectural model, i.e., howphysical and virtual ecologies can be paired into augmented ecologies. Section 3 focuses on the concept of space and on thespace-aware interactionmechanisms. Section 4 compares the proposed approachwith relatedworks. Section 5 presents SIS(Space Integration Services), a concrete framework based on the architectural model, which is under experimentation in thecontext of a researchproject at theDISCodepartment. In Section 6 the framework is exemplified through a reference scenarioderived from this project, which highlights the use of ecology spaces. Section 7 draws final conclusions and discusses futuredevelopments.

2. Augmented ecologies

The aim of this section is to illustrate the main tenets of the architectural model that is grounded in the notion ofaugmented ecology: this notion pairs a physical ecology with a virtual ecology and defines their relationships.

2.1. Physical and virtual ecologies

A physical ecology describes the pattern of relations among physical organisms and the physical environment they livein. An organism is an active entity with a state and behavior, for example a human being, an ant, or a technological device.Organisms interact both with the environment and with other organisms according to ecology laws.

In a simple physical ecology where a human supervisor wearing a thermal suit acts inside a cold store and controls itstemperature, the physical environment is the cold store, whose status is modeled by a temperature. It hosts three physicalorganisms: a heater PO1, a thermometer PO2 and a human PO3.

Organisms play different roles according to the way they interact with the environment. A sensor is an organism thatsenses the environment state, whereas an actuator is an organism that modifies it. PO1 is an actuator, which emits caloricenergy and affects the temperature of the physical environment according to a physical ecology law PL1 (thermodynamics).PO2 is a sensor, which senses the temperature and displays it. In general, an organism may play multiple roles. PO3 is

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 577

Fig. 1. Augmented ecology.

neither a sensor nor an actuator, as it does not directly interact with the environment: in fact, it neither emits caloricenergy nor senses the temperature. Organisms interact with other organisms via physical communication flows groundedon physical ecology laws. PO3 reads, according to the physical law PL2 (optical propagation), the temperature displayed bythe thermometer PO2. PO3 also controls PO1 by turning a knob of the heather according to the physical law PL3 (mechanics).Note that PL1, PL2 and PL3 are distinct and independent laws. Organisms effectively co-operate as long as they agree, eitherexplicitly or implicitly, on the ecology laws that underlie the communication flows and on a model of the information theyexchange. PO3 and PO2 rely on the assumption that PO3 sees the screen of PO2 (law PL2), whereas PO3 and PO1 rely on theassumption that PO3 touches the knob of PO1 (lawPL3).Moreover, PO3 and PO2must agree about the graphical presentationof numbers and about their interpretation as temperatures, whereas PO3 and PO1 must agree about the mapping betweenknob angle and emitted caloric power.

Software applications can realize virtual ecologies where virtual organisms interact both with a virtual environment andwith other virtual organisms according to virtual ecology laws. Established architectural principles like Component BasedArchitecture [6] and Model Driven Architecture [8] suggest that the architectural model of such augmented applicationsshould include software components that realize virtual organisms plus a software component that realizes a shared view ofthe virtual environment. Virtual laws are realized in general by algorithms and, in particular, bymethods, rules, protocols orothermechanisms depending on the design style and on the implementation platform. A virtual ecology can be an imaginaryecologywhen its virtual environment, organisms and laws are not bound tomodel any physical ecology; it can be a simulatedecology in the opposite case.

2.2. Augmented ecologies

An augmented ecology pairs a physical ecologywith a virtual ecology via augmented organisms. An augmented organism isa 3-ple {PO, VO, CC} where PO is a physical organism and VO is a virtual organism, which mirrors PO and ensures a two-waycausal connection CC between state changes of PO and corresponding state change of VO.

Fig. 1 sketches how a physical ecology can be augmented by pairing it with a virtual ecology. Specifically, the physicalorganisms are paired with the corresponding virtual organisms VO1, VO2 and VO3, which are in charge of ensuring thecausal connection. In an augmented application VO1 is a software driver, which turns values of a local state variable (thedesired emitted power) into commands to the heather PO1. VO2 is a software driver, which turns raw data generated by thethermometer PO2 into values of a local state variable (the perceived temperature). Finally, VO3 is a user interface, possiblyhosted on a portable device, which displays the observed temperature and asks the user for the desired one.

Fig. 1 highlights a major augmentation factor. The physical organisms in the augmented ecology are no more obliged toground their communications on physical laws like PL2 and PL3. In fact, they indirectly communicate through the pairedvirtual organisms, which in turn communicate by relying on virtual laws of the virtual environment like L4 and L5, whichcan correspond to network protocols. Thus PO3 can remotely communicate with PO2 without physically seeing it and canremotely communicate with PO1 without physically touching it. A second augmentation factor relies on the intelligence ofthe virtual organisms that the augmented organisms embody. The virtual sensor VO2 can enhance perceptions by filtering

578 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

Fig. 2. Core concepts.

and converting input raw data. Symmetric remarks hold for the virtual actuator VO1. Moreover, VO3may include a decisionsupport system facilitating the decisions of the human user PO3. Finally, the virtual environment can include ‘‘intelligent’’virtual organisms that are not paired with physical organisms and contribute to the augmentation of the ecology bygoverning the behavior of other organisms. For example, VO4 in Fig. 1 might interact with the other virtual organismspaired with thermometers, humans and heathers in order to realize clever energy saving strategies.

Not all the physical organisms are directly paired with virtual organisms via augmented sensors and actuators. Thiswould require a direct causal connection, which in many cases cannot be realized: in the example, some heaters might haveno interface with the IT system. However, a virtual organism can model a physical one even in absence of direct causalconnection by inferring its state from direct observations generated by augmented sensors. In the example, this could bethe case of a non-controllable heater whose existence and status is inferred by VO4 by observing the sensed temperatures.

2.3. Characterizing features of the model

This section summarizes the features that characterize the interaction capability of the augmented organisms in orderto give a complete picture of the model. These features will be described and exemplified more in detail in Section 3.

Since the virtual laws of an augmented ecology should capture and augment basic mechanisms underlying theinteractions between physical organisms in the related physical ecology, the question is: what core concepts are valid bothin physical and in virtual ecologies, are general enough to be captured by an architectural model that encompasses a widerange of augmented ecologies and can be implemented by a concrete framework supporting the cost-effective developmentof augmented applications? A key remark is that both physical and virtual organisms often interact by relying on the conceptof space and on the spatial contextualization of the exchanged information.

Fig. 2 refines Fig. 1 by highlighting the core concepts that can ground virtual ecologies and that will be described in depthin Section 3. Additional concepts that can help developing augmented ecologies are denoted in the figure by dotted linesand italicization.

The information virtual organisms exchange is localized in one or more ecology spaces. Ecology spaces are instances ofcore spatial models including, for example, a grid model, a graph model and a name model. The figure emphasizes that corespatial models are at a high level of abstraction and correspond to established and widely agreed concepts, which are validin different application domains and have a sound formal definition. In general, the ecological spaces of the same augmentedecology can be put in some relation through the definition ofmappings among their locations. A typical example is amappingbetween the locations of two ecology spaces representing the same physical reality (e.g., a building) according to two differ-ent core spatial models. Virtual ecology spaces andmappings between themmust be dynamically instantiated to allow newdomain-specific augmented ecologies to be created and to meet the changing requirements of the existing ones. Moreover,virtual organisms must be capable of inspecting and (possibly) modifying ecology spaces. Therefore ecology spaces must beviewed as first-class objects and virtual organisms must be allowed to define, modify and inspect ecology spaces.

Additional concepts are quoted here to give a flavor of how the core concepts can be exploited to develop rich virtualecologies. As Fig. 2 highlights, these concepts are less general but enrich specific ecologies. A community of virtual organisms,which augments communities of physical organisms and, in particular, of people, can define ecology spaces tailored to

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 579

capture the partial views of the environment that are relevant for that community and enrich the core spatial models withspecific semantics; thus they interpret the ecology spaces they know as community spaces according to community spatialmodels.Moreover, community spaces andmappingsmay be subject to frequent changes, whichmust be carefully controlledin order to ensure a community-wide agreement on their definition and interpretation. The Coordinator in Fig. 2 symbolizesthat some privileged organisms, be they augmented or pure virtual, must be in charge of managing changes of communityspaces and of ensuring their coherence. It is also up to the organisms of a community to agree on an interpretation of theexchanged information, which is separated from its localization. For example, the organisms can agree that the piece ofinformation located at an edge of a road space (i.e., a street) models the intensity of the traffic flow. This agreement mightrely on the ad hoc specification (e.g., via OWL [9]) of the semantics the community associates to the elements of the corespatial model. Again, this agreement is up to the communities and is not part of the architectural model.

3. Spatial concepts

This section describes more in detail the concepts that characterize the proposed architectural model, namely thepossibility to dynamically define multiple virtual spaces and to establish mappings between their locations. This groundsboth the spatial contextualization of the information and a flexible space-aware communication paradigm, which reifies theecology laws allowing the augmented organisms to interact. The major emphasis will be on the virtual ecology since thegoal of the architectural model is to drive the design of augmented applications that realize virtual ecologies and to underliethe development of a concrete framework supporting their implementation, as it will be shown in Section 5.

3.1. Ecology spaces

In general, different organisms and ecology laws rely on different spatial representations of the environment. In theexample of Section 2.2, the organism PO3 (a human agent) can be expected to rely on some spatial representation of theenvironment to performmovements aimed at viewing PO2 and touching PO1. What kind of spatial representation a humanbeing exploits is a matter of psychology, which is out of the scope of this paper. However, the paired virtual organism VO3undoubtedly relies on a geometric spatial model of the physical environment, for example the Cartesian one, to augment thecapabilities of PO3. This is more apparent if PO3 is a robot whose movements are controlled by VO3. On the other hand, thecommunications between the virtual organisms like VO1, VO2 and VO3 rely on a spatial model of the virtual environmentand, more precisely, on the addressing space of the network, which is definitely not related to the Cartesian spatial modelof the physical environment.

Things become more complex if the elementary example is extended to deal with a store consisting of several rooms,each including one thermometer and one heather. The overall layout of the store can be modeled as a graph where nodesrepresent rooms and edges represent passages. A virtual organism like VO3 exploits both this representation to plan themovements of the paired physical organism PO3 (again, think at a robot) through the rooms and the Cartesian one for afine-tuning of its positions inside a room (again, think at a robot). Moreover, if human agents are equipped with cellularphones and play specific roles, the paired virtual organisms may augment and automate the interaction capabilities of thehuman agents by relying on a phone numbers space and on a topological space representing the organizational structure asa tree. Finally, the temperature an augmented sensor delivers should be localized according to ‘‘where’’ the sensor is (i.e., inwhat room) or, at least, ‘‘who’’ it is. A low-end virtual sensor like VO2 (for example, the software driver of a thermometer)can deliver pieces of information that represent temperatures and are localized by the network address of the driver. VO2can be hardly expected to be aware of the topological structure of the store in order to localize the temperature at a givenroom, though this kind of localization information is what virtual organisms like VO3 and VO4 would like to get.

These examples highlight that, even in an oversimplified scenario, generically speaking of ‘‘space’’ and ‘‘location’’ may bemeaningless. An augmented ecology must accommodate a collection of views over the environments, allowing informationto be localized according to the variety of the ecology laws that underlie both the communication between the organismsand their internal behavior. In the following such views will be denoted for shortness as ecology spaces.

Different augmented ecologies rely on different ecology spaces modeled according to the internal logic of the organisms,to the features of both physical and virtual environments and to the metaphors that underlie the interactions amongorganisms. Moreover, spaces are subject to dynamic changes, for example because a sensor is added (thus changing thesensor identifiers space), a new actor enters the stage (thus changing the phone numbers space) or the organizationalstructure changes (thus changing the organization space). Finally, new spaces could be added to the ecology, for exampleto integrate an external application, which relies on a space that models the shelves in the store and can be viewed as anorganism. As alluded in Section 2.3, ecology spaces must be first-class entities, so that organisms can define, observe andchange them.

3.2. Core spatial models

Core spatial models capture stable, widely accepted and cross-ecology spatial concepts that are general enough to beembodied by a technological framework where different core spatial models co-exist. A core spatial model allows ecologyspaces to be defined as finite sets of locations, where information is localized.

580 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

Fig. 3. Example: Ecology spaces and direct and indirect localizations.

The grid spatial model supports the definition of spaces whose locations are arranged in a n-dimensional grid and arecharacterized by a tuple of indexes. The name spatial model allows name spaces to be defined as collections of uniquenames i.e., strings. The graph spatial model supports the definition of graph spaces i.e., non-oriented, weighted graphswhere both nodes and edges can act as locations for pieces of information describing, for example, crossings and streetsrespectively. Unique identifiers characterize nodes and edges. Note that the definition of core spatial model does not includecontinuous spaces, which are not finite and can be approximated by finite spaces: for example, Cartesian and geo-referencedspaces can be approximated by grid spaces. The formal definition of these concepts is a prerequisite for the design andimplementation of a framework supporting augmented ecologies. Many core spatial models rely on established and widelyagreedmathematical definitions (for example, the algebraic definition of a graph), which are not reported here for shortness.

Any core spatial model has associated one or more prametrics defining the distance between two locations. Aprametric [10] on a not-empty set X is a function d : X × X → R which, for all x, y in X , satisfies the conditions d(x, y) ≥ 0and d(x, x) = 0. Suitable prametrics are the Chebyshev metric [11] for a grid spatial model, the Levenshtein distance [12]for a name spatial model and, for a graph spatial model, a function that computes the minimum weight of a path betweentwo nodes [13].

The basic operations to define, inspect and manage spaces are informally sketched in the following to give their flavor. Amore precise definitionwill be presented in Section 5 according to a specific type system. The defSpace(spatialModel,space, spaceParameters) operation instantiates an ecology space according to the core spatialmodelspatialModel.Each core spatialmodel defines a proper subtype forspaceParameters, which specify the initial structure of the space. Forexample, for a graph space they define the nodes and the edges. For a grid space they define the lower and upper bound of theindexes for each dimension. For a name space they define an initial set of names. Other operations allow an ecology space tobe dynamicallymodified. For example, theaddLocation(space, location+) operation dynamically adds one ormorelocations to an existing space. Symmetric operations remove locations from spaces. Notice that for some core spatial modelsmodifications can be hardly apply: for example, it does not make sense to add individual cells to a grid space. Finally, someoperations allow an organism to inspect the structure of an ecology space. The getSpace(space): spaceDescriptionoperation returns a symbolic description of the overall structure of the space. For example, an augmented organism thatmanages a graphic user interfacemay exploit this operation. The getDistance(space, prametric, fromLocation,toLocation): distance returns the distance between two locations of a space according to one of the prametricsdefined by the underlying core spatial model.

The operations that modify the structure of a space allow highly dynamic ecosystems to be realized: they must becarefully used by organisms like the Coordinatormentioned in Section 2.3 to ensure that different organisms get a consistentview over the ecology spaces.

3.3. Spatial contextualization

As pointed out above, the pieces of information exchanged between organisms are localized in some ecology space.Fig. 3(a) exemplifies a situationwhere a floor of a building ismodeled both as a graph space, which represents its topologicalstructure in terms of rooms and passages among them, and by a grid space, which represents the floor as a collection ofcells. The piece of information representing a person is localized in both spaces: for example, the localization at room45in the graph space can be exploited by a supervising organism VO1 to plan the movement of robots through rooms. Thelocalization at (7, 12) in the grid space is generated by a virtual organism VO2 paired with a sensing device, which canlocalize a physical organism in this space.

In general, the pieces of localized information flowing between organisms are structured as a pair {thematicInformationlocalization}, where localization denotes the localization aspects that rely on the ecology spaces,whereas thematicInformationdepends on domain-specific issues. This separation of concerns corresponds both to established concepts in the area ofGeographic Information Systems [14] and of spatial ontologies [15] and, in view of the model implementation, to the fact

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 581

that communication protocols separate the header of a message, which is exploited for routing, from the payload, whichis not interpreted by the communication infrastructure and is exploited by the application components. A localization isdefined as a set {spatialContext+}where spatialContext denotes a subset of an ecology space. A spatial context can be definedeither in an enumerative or in a declarative style. An enumerative context can be expressed as {location+

}. For example, in asituation extending the one of Fig. 3(a), a context SC1 ⊂ aFloor can be defined as {(7,12) (7,11) (7,13) (6,12) (8,12)}, whereasa context SC2 ⊂ aBuilding can be defined as {room30 room37 room45}. A declarative context can be expressed as {prametriclocation distance} and denotes the locations of an ecology space that fall within the given distance from the provided location.For example, the context SC1 above can be defined as {Chebyshev (7,12) 1}.

3.4. Space mappings

The problem in the example of Fig. 3(a) is that somebody should have stated that the thematic information aPerson islocalized both in aBuilding at room45 and in aFloor at (7,12). For example, both localizations could be specified byVO2 provided that it knows that the grid element (7,12) of aFloor corresponds to the node room45 of aBuilding. Ingeneral, some organisms should be aware of many ecology spaces and of the relationships among their locations in orderto coherently manage multiple localizations. In many real cases we cannot expect that organisms embed such a complexknowledge: in the example, organism VO2 can hardly be aware of the overall structure of the building. In case of manyenvironment spaces, the complexity of the organisms would explode.

This difficulty can be overcome if the definition of the ecology spaces is enriched with the explicit definition ofmappingsamong their locations, so that organisms can rely on the ecology spaces they subjectively view. This does not exclude thatdifferent organisms may view the same ecology spaces, possibly according to a previous agreement or to a shared culturalcontext. The key issue is that, in general, the subjective view of an organism over the environment includes a few ecologyspaces only, no matter which other ecology spaces are viewed by other organisms.

In the example (Fig. 3(b)), VO2 is just in charge of localizing aPerson at (7,12) of aFloor, whereas V01 is able toreason on people localizations inaBuilding only. If there is amapping from the location(7,12) to the locationroom45 ofaBuilding,aPerson is also indirectly localized atroom45. Therefore VO1 andVO2need only view the spacesaBuildingand aFloor respectively. Neither VO1 nor VO2 should be aware of the other space nor of the mappings.

More formally, an explicit mapping is an ordered pair of locations (l1, l2), l1 ∈ ES1, l2 ∈ ES2 and ES1 = ES2, where ES1and ES2 are ecology spaces (possibly defined according to different spatial models).

The explicit mapping relation EMR is the relation defined as the set of all the explicit mappings. It is a binary relationEMR ⊆ US × US, where US = ES1 ∪ · · · ∪ ESn and ES i is an ecology space ∀i ∈ {1, 2, . . . , n}. EMR is anti-reflexive:∀l ∈ US(l, l) ∈ EMR, because direct mappings are only defined among locations of different environment spaces. EMRis a many-to-many relation.

The semantics of the mappings is limited to an operational aspect allowing a thematic information item to be localizedat a location even if it has not been explicitly localized there. In fact, if a thematic information item is localized at locationl1 and there is a mapping from l1 to l2, then the information item is localized at l2 too. The criteria leading to the definitionof a mapping between two locations belong to the organism(s) in charge of defining the spatial properties of the virtualenvironment. As for the case of the definition of the ecological spaces they are not part of the model.

The restricted transitive closure MR of the explicit mapping relation EMR is the binary relation containing all the explicitmappings (li, lj) ∈ EMR and all the implicit mappings, i.e., the pairs (li, lk)where li ∈ ESp, lk ∈ ESq, ESp = ESq, (li, lm) ∈ EMRand (lm, lk) ∈ MR for some lm.

The map(ES1, SC1, ES2, SC2) operation defines explicit mappings from any location li ∈ SC1 to all the locations lj ∈ SC2,where SC1 ⊂ ES1 and SC2 ⊂ ES2 and ES1 = ES2. Here and in the following the ecology spaces containing the contextsexplicitly appear in the signature of the operations in order to improve their readability, though this may be redundant.

Other operations allow an organism to inspect the mappings. In particular, getForwardMapping(ES1, SC1, ES2):SC2returns a (possibly empty) context SC2 including all, and only all, the locations belonging to ES2 that are either explicitly orimplicitly mapped from the locations belonging to SC1. In other terms, ∀lj ∈ SC2 ∃ li ∈ SC1 | (li, lj) ∈ EMR. On the opposite,getReverseMapping(ES1, ES2, SC2):SC1 returns a (possibly empty) context SC1 including all, and only all, the locationsbelonging to ES1 that are either explicitly or implicitly mapped into locations belonging to SC2. Other operations, whichallow explicit and implicit mappings to be separately inspected or allow mappings to be deleted, are not listed here forshortness.

Finally, the operation getMappedContexts(ES1, SC1): { ESi, MCi}+ returns a (possibly empty) set of localizations

such that MCi = getForwardMapping(ES1, SC1, ESi)∀ES i | ES i = ES1.

3.5. Context matching

The previous concepts can be exploited to define the notion of matching between spatial contexts. Let SC1 and SC2 bespatial contexts defined in the ecology space ES, i.e., SC1 ⊂ ES and SC2 ⊂ ES. A direct match between SC1 and SC2 occurswhen SC1 ∩ SC2 = ∅. Accordingly, the operation directMatching(ES, SC1, SC2): MC, returns the (possibly empty)matching contextMC = SC1 ∩ SC2.

582 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

Fig. 4. Space-aware publish/subscribe.

Let SC1 and SC2 be spatial contexts defined in different ecology spaces ES1 and ES2, i.e., SC1 ⊂ ES1 and SC2 ⊂ ES2 andES1 = ES2. An indirect match between SC1 and SC2 occurs when l1 ∈ SC1, r1 ∈ SC2 and (l1, r1) ∈ MR. Accordingly, theoperation indirectMatching(ES1, SC1, ES2, SC2): MC2 returns a (possibly empty) matching context MC2 ⊆ SC2 con-taining the locations of SC2 that indirectly match locations of SC1, i.e., MC2 = getForwardMapping(ES1, SC1, ES2) ∩ SC2.For example, assume that SC1 ⊂ aFloor is defined as {(7,12) (7,11) (7,13) (6,12) (8,12)}, SC2 ⊂ aBuilding as {room30room37 room45}, SC3 ⊂ aBuilding as {room45} and SC4 ⊂ aFloor as {(7, 12)}. Assume also that a mapping has been es-tablished via map(aFloor, SC1, aBuilding, SC3), meaning that several contiguous cells of the grid space aFloor aremapped to a unique node of the graph space aBuilding (i.e., a room containing those cells). Then the invocation ofindirectMatching(aFloor, SC4, aBuilding, SC2) returns SC5 ⊂ aBuilding , i.e., room45, because SC4 contains thecell (7, 12) that has been mapped to room45.

Finally, the operation matching(ES1, SC1, ES2, SC2): MC2 returns directMatching(ES1, SC1, SC2) if ES1 = ES2. Itreturns indirectMatching(ES1, SC1, ES2, SC2) if ES1 = ES2.

3.6. Space-aware communication

Like physical organisms, the virtual organisms effectively co-operate as long as they agree on the ecology laws thatunderlie the communication flows and on a model of the information they exchange. The spatial concepts presentedabove support not only the spatial contextualization of the exchanged information, but also a space-based communicationparadigm. Two basic and widespread interaction styles are publish/subscribe and data sharing that are enhanced in themodel with the concept of space-awareness. Both styles are useful to fulfill the needs of different organisms, communities,application domains and information types: typically (but not necessarily) the message based style can be exploited if thethematic information models pure events, whereas the data sharing style is suitable if the thematic information modelsthe state of persistent domain entities. Therefore it is reasonable to include both styles into the architectural model (and,consequently, into the concrete framework). The key issue is that the basic spatial concepts, namely core spatial models,ecology spaces, spatial contextualization and space mappings are orthogonally exploited by the two basic interaction stylesand by other styles that can be built on top of them.

In case of publish/subscribe, organisms emit thematic information localized by a publish localization. This information isnotified to the organisms that previously subscribed to an interest localization such that at least one of its contexts matches,either directly or indirectly, a context of the published localization (Fig. 4).

More precisely, an organism emit localized thematic information via the emit(thematicInformation,publishLocalization) operation. The primitive accepts as parameters a piece of thematic information and a publishlocalization expressed as a set of pairs {ecologySpacespatialContext}+. An organism can subscribe to one or more interestcontexts defined in different ecology spaces via the subscribe(interestLocalization) operation. Also the inter-est localization is expressed as a set of pairs {ecologySpacespatialContext}+. Assume that a virtual organism VO1 publishesvia emit(TI,L1) a thematic information item TI localized at the publish localization L1. Let L1 include {ES1SC1}, whereSC1 ⊂ ES1 denotes a publication context. Assume that a virtual organism VO2 previously subscribed to a localization L2 viasubscribe(L2). Let L2 include {ES2SC2}, where SC2 ⊂ ES2 denotes an interest context. If publishLocalization and interest-Localization match, i.e., MC = matching(ES1, SC1, ES2, SC2) and MC = ∅, the virtual organism VO2 is notified about thelocalized information {TI L3}. In the essential form, L3 = {ES2,MC}.

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 583

Back to example, assume that the mappings have been established as in Section 3.4 by an organism playing the roleof Coordinator (see Fig. 2). VO1 performed subscribe(aBuilding, room45). VO2, as soon as it localizes a person,performs emit(aPerson, {aFloor {(7,12)}}). Then VO1 is notified about {aPerson {aBuilding {room45}}}.A subscriber like VO1 above is just interested in knowing that some thematic information item is localized in the interestcontext it specified, no matter where the information itemwas initially localized. More ‘‘intelligent’’ organismsmight knowother spaces and might be interested in additional localization aspects. For example, an extended form of the notificationmight include also the original localization, i.e., {aFloor {(7,12)}}. Ultimately, a complete notification might includegetMappedContexts(aFloor, {(7,12)}) to enrich the information item with all its localizations. The key issue isthat more sophisticated and selective mechanisms can be easily devised by relying on the basic concepts and operationsthat have been defined in the previous sections.

In case of data sharing, organisms post thematic information, which is localized and persistently stored in one or morepublication contexts. At a later stage other organisms can inspect some interest contexts to look for thematic informationlocalized by a publication context that matches, either directly or indirectly, a publication context. On the other hand,the data sharing space-aware paradigm relies on the same basic concepts as the publish/subscribe one. An organismposts localized thematic information via the post(thematicInformation, publishLocalization) operation. Theparameters of post() have the samemeaning as those of emit(), but the behavior of the operation is different because thethematic information item is persistently stored togetherwith its localization. At a later time an organism can synchronouslylook for interesting thematic information by invoking inspect(interestLocalization), which returns localizedinformation {TI L3}, as in the notification case, if publishLocalization and interestLocalization match.

Additional primitives allow an organism to retract a subscription or to remove a posted information item. Finally, thepublishLocalization of an information item can be augmented with a time stamp. This feature is the basis for extending to atemporal dimension the concepts of localization and matching.

4. Related work

Several metaphors have been proposed for modeling augmented environments. The ambient ecologies metaphorrepresents an emerging vision where the provided behavior is obtained by the cooperation of several organisms, eitherdevices, services or the so-called smart objects. In particular, an ambient ecology can include smart objects [16,17] and residein a smart environment [18,17,19]. Our approach is based on the same notion of ecology but it makes clearer the distinctionbetween the physical and the virtual environments. Other conceptual metaphors have been proposed for augmentedenvironments. Multi-agent models [20] are proposed by several authors. For example, Da Silva and Vasconselos [21]present a multi-agent model and architecture for managing ‘‘intelligent shops’’. Loke [22] proposes an approach wherethe overall environment behavior emerges from the single behavior of a collection of ‘‘smart artifacts’’. Each artifact usesa proper extension of the Prolog language (PeerProlog) in order to support a form of collective reasoning (e.g., subgoalevaluations can be passed to other smart artifacts). Each artifact is seen as an independent physical unit: it has an embeddedprocessor, networking and sensing capabilities. As alluded in the introduction, a parallel stream of research proposesbio-inspired metaphors: we refer to [4] for a rich overview and comparison. Here we recall that our approach does notimpose any specific standpoint to model the behavior of the organism populating the ecology and is open to the adoptionof any of them since it offers general mechanisms and operations on which specific communication paradigms can beimplemented.

Space representation is a key issue when dealing with physical environments. The concept of space has beenwidely studied in computer science, as several domains (e.g., GIS, emergency management systems, video-surveillance,smart spaces, collaborative and pervasive computing) take advantage from it. A set of spatial categories have beencharacterized [23]: how space is modeled (explicitly or implicitly), the way physical objects are modeled, the spatialrelationships which hold for entities located in spaces, and the concept of frames of reference. The first category is relevantto this paper. Space modeling can take one of two basic views: the Newtonian, in which the space exists independently ofthe objects that may be located in it (this view is also called substantival view [24] or general space [25]), and the Leibnizianview, in which the space exists as a matter of inter-relationships between objects (this view is also called relational [24] orlocal space [25]). An exhaustive overview of spatial concepts may be found in [26].

Recent researches [27,28] go in our direction stating that both real and logical space representations [29] must beconsidered, and, among them, the NameSpace spatial model we propose [30]. Differently from other works like [31], ourmodel allows information to be located in multiple spaces with different semantics, either physical or logical. We claim thatthis is a key conceptual aspect in realizing ambient ecologies since it supports fully and rich context-based interactions [32].In addition, our concrete framework can be used as a generic service to support context awareness [33] as organisms couldutilize its features to acquire and disseminate context information. Finally, models and frameworks have been recentlyproposed with the aim of obtaining spatially localized information (see for instance [34,35]). In contrast with our approach,they emphasize physical spaces only and they do not propose space-aware interaction mechanisms.

Virtual organismsmust be capable of inspecting and (possibly) modifying ecology spaces. Therefore ecology spacesmustbe viewed as first-class concepts. An explicit representation of the space is claimed [36,37] to be useful also to design softwareapplications that operate in a (real or virtual) environment. In fact, systems that do not rely on spaces as first class objects

584 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

require the design and implementation of substantial additional structures and interaction mechanisms or the realizationof an agent specifically devoted to the management of environment related abstractions and mechanisms [38]. SeveralAmbient Intelligence/Mobile/Ubiquitous/Mixed-Reality systems (e.g., [39–41,30]) adopt space models as first class objects,especially to manage awareness information and its perception [42,37].

Most of the proposedwork on space representation carefully separate entities from their location in the space, as claimedin [43,44,23], to obtain what in software engineering is termed as separation of concerns [45]. In this line is for example therepresentation proposed in [15], as a generalization of [46]. It is an interesting step towards the separation between entity,space and time. It looks at relationships as first class objects. Specifically, through relationships, information should berelated to its thematic aspect, to its spatial location and its occurrence in time.

In the GIS domain big efforts have been done to describe geographic entities and their relationships [14]. In this domaina challenging issue concerns the problem of integrating heterogeneous information [47]. The heterogeneity problem is wellexplained in [48] where authors refer to heterogeneity in the spatial model, among other categories. All techniques dealingwith the integration of heterogeneous data include some form of mapping [49,50]: for example, in [50] ontology mappingaims at relating similar concepts and relationships from the sources exploiting an equivalence relation. Exhaustive surveysof these approaches may be found in [51,47,50]. In relation to this rich amount of issues, in our approach to space modelingheterogeneity concerns more organisms’ perspectives than integration. In fact, the mappings we propose are related to asimple notion of equivalence between locations: they make available the same piece of information, irrespective of anysemantics associated to each space containing it. Although mappings between spaces are not explicitly taken into accountby all space-model based approaches, they sometimes introduce them in a different way. For example, Steed et al. [30]define four spatial services that put in relation a predefined set of different spatial models. Our explicit definition ofmappings encompasses the possibility to associate sets of locations to single locations. Dix et al. [36] also provide supportfor mapping (as a relation between spaces together with topological and boundary relations), for example tomake locationsin real space linked to locations in an information space so that the user can walk around the real space and navigate thevirtual. Our definition of space mappings is more general as it supports these kinds of relationships without differentiatingamong them. Instead, we are at one with Dix et al. when they claim that ‘‘boundary mapping means there does nothave to be a single super model’’: in fact, our approach ‘‘builds’’ the environment as a collection of spaces together withtheir mappings.

Communication approaches differ in how the interactions between organisms are achieved. Following [52] we canidentify three main kinds of interaction styles. First, in direct interaction organisms interact directly through differentkinds of protocols, like message passing and (remote) procedure calls. CORBA [53] and the Open Service Gateway initiative(OSGi) [54] are popular examples of general purpose frameworks supporting direct interactions. Obje [55] is an exampleof specific framework for realizing smart spaces. Direct communication can be very efficient, however the main lack ofthis approach is that organisms (all or a subset of them) should know each other or at least the provided interfaces. Thiscan obstacle the subsequent integration of organisms that differs in the supported interaction technologies and/or in theirinterfaces. Second, event-based, publish/subscribe [56,57] is a form of indirect communication. It allows organisms topublish events and receive events of interest indicated through subscriptions. Subscription patterns and matching rulesdefine the relation among published events and organisms to be notified. Proposed variations like location-based [58]and context-based publish/subscribe [31] allow to cover spatial aspects, however in a very limited way respect to ourapproach. The location-based form is strongly oriented to physical spatial coordinates while the context-based form refersto a generic notion of context. Third, in tuple-mediated communication organisms communicate through shared datastructures (tuples) hosted in a data space (e.g., a LINDA-like tuple space [59]), which can be physically distributed overdifferent computational nodes. Tuple spaces can substitute or complement the publish/subscribe style [60]: tuple spaces arean example of data-sharing, stateful coordinationmodel,where publish/subscribe is an example ofmessage passing statelessmodel. Publish/subscribe is the reference style of many recent approaches proposed for realizing ambient ecologies andsmart environments like [61–63]. Tuple-mediated communication is exploited by several works like [64,52]. In particularthese two works propose fully decentralized tuple spaces, where tuple are partitioned in local tuple spaces allocated todifferent computing nodes. Our approach is at an intermediate stage between approaches that rely on physical spaces andapproaches that rely on generic tuple-based mechanisms.

From a software engineering perspective and a more implementation oriented point of view, component-based softwareengineering and architecture [3,6,7] is one of the most widespread engineering paradigms to reify the adopted models forambient ecologies. For example models proposed by [63,21] rely on this engineering approach. Like the works mentionedabove, our engineering approach also supposes that organisms are reified by software components. Components caninteract according to the three communication styles mentioned above. Our model focuses on space-aware extensionsof publish/subscribe and tuple-mediated communication. Actually, the SIS framework (see Section 5) directly supportsspace-aware publish/subscribe. Publish/subscribe is at the center of several concrete frameworks specifically proposed forambient ecologies and smart environments. For example, Gamez and Fuentes [61] present FamiWare, a highly configurablepublish/subscribe framework which can be instantiated to embed devices fulfilling specific application requirements.Kusznir and Cook [62] propose a lightweight publish/subscribe framework based on a specific XML-based protocol (XMPP).Aiello and Dustdar [65] exploit publish/subscribe extensions of Web Services like WS-Notifications to realize homeautomation applications. Compared to SIS, the main difference in respect to these frameworks relies on the providedform of publish/subscribe. The frameworks above rely on content-based publish/subscribe [56], i.e., subscriptions are based

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 585

on conditions about the published information. On the contrary, SIS exploits the introduced space concepts to diffuseinformation respect to spatial contexts, leading to a specialized form of context-based publish/subscribe [31]. Finally,several concrete frameworks based on tuple-mediated communication have been proposed. Equip [66] is an example ofgeneric shared data space conceived for building pervasive applications. The ‘‘Tuples On The Air’’-TOTA approach [52]is a significant example of extension which has been applied for developing several pervasive computing environments.TOTA focuses on decentralized tuple space organization and implementation. Other approaches consider the tuple space asconceptually centralized; decentralization and full distribution is considered a matter of implementation. TOTA makes thedecentralization explicit to software components. Each component is considered to be in execution on different computingnodes. Each node hosts a local tuple space, hence a network of tuple spaces is available. Tuples are propagated across thenodes of the network on the basis of component-specific rules. Viroli et al. [64] present another decentralized extensionaccording to a chemical-inspired model. Here tuples are managed through reaction and diffusion rules mimicking chemicalsystems. Tuples are equipped with a concentration value that evolves over time by some chemical-like coordination lawsembedded in each tuple space at design time,which apply to tuples according a semanticmatch. The current implementationof SIS does not support tuple-mediated interaction. However, as depicted in Section 3, the space concepts may be used toprovide a form of space-aware, tuple-mediated communication.

5. A concrete framework: Space Integration Services

This section presents Space Integration Service (SIS), a prototypal concrete framework which reifies the architecturalmodel presented in Sections 2 and 3. SIS has been developed in the context of the GAS (‘‘Grandi Attrezzature Scientifiche’’)project, carried on at the Department of Informatics, Systems and Communication (DISCo) of the University of Milano-Bicocca. The aim of the GAS project is to augment the building of the Department with a technological platform, so thatthe building becomes a workbench for experimental activities including Ambient Intelligence, Reactive Environments,Interactive Performance, Robotics, Video Surveillance and Co-operative Work.

5.1. Implementation choices

The SIS framework supports the development of augmented ecologies according to the architectural model presented inSection 2. Virtual organisms are software components, which wrap applications and, in the case of augmented organisms,wrap the interactions with physical devices. Virtual organisms communicate via operations exposed by SIS according to thespace-aware communication style presented in Section 3.

The major requirement of the GAS project was the capability of integrating in a seamless way a wide range ofindependently developed and heterogeneous devices and applications. Therefore the design of SIS focused on the carefulidentification of the architecturalmodel (i.e., the ecologicalmetaphor) and, in particular, of the communication style (i.e., thespace-aware one) between software components. Another key requirement was to get in a timely and cost-effective waythe integration framework. The contribution of SIS stems from the fact that it facilitates the development of augmentedecologies by integrating heterogeneous components via multiple spaces, not from the technicalities of its implementation.Therefore SIS relies on off-the-shelf technologies: Web Services, Java and Jess.

The interactions between physical organisms and the paired virtual organisms, which involve manifold and varyingtechnological issues (devices interfacing, conversion of raw data into domain-level measurement units, timing constraintsand so on) are encapsulated by the software components that implement virtual sensors and actuators. On the other hand,the semantic interpretation of the information flowing among virtual organisms strongly depends on specific domain-related aspects that are encapsulated by the applications wrapped as virtual organisms.

As emphasized in Section 2.3, core spatial models are at a high level of abstraction and correspond to established andwidely agreed concepts, which are valid in different application domains, have a sound formal definition and seldomchange. Therefore, in order to ensure a timely and efficient implementation, core spatial models are embedded intothe framework together with the related space-aware communication operations that support virtual information flows.Instead, as anticipated in Section 2.3, ecology spaces and space mappings can be dynamically defined and inspected by(possibly privileged) organisms via the proper operations exposed by SIS.

5.2. Overall view

SIS is organized according to three distinct software layers as shown in Fig. 5.Virtual organisms are software components, possibly hosted by distributed computing nodes. TheDistributed Access layer

exposes the operations defined in Section 3 for space-aware communication in a distributed settling. The Core layer reifiesthe SIS operations for local communication inside a single computing node. It is composed by three internal packages:Manager, Spatial Models and Configuration. The Engine layer realizes context matching and transitive closure of explicitmappings as defined in Section 3.

The next subsections provide insights about the current implementation of each layer.

586 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

Fig. 5. SIS concrete architecture.

5.3. Distributed access

SIS exposes as Web Services1 the operations defined in Section 3, based either on the Web Service Definition Language(WSDL) or on the Representational State Transfer (REST) approaches. Notifications can be obtained either in a pullway (usinga local buffer on SIS for each subscription) or in asynchronous pushway throughWebSocket2 channels. The fragments belowgive the flavor of some operation invocations, whose detailed WSDL definition is not reported for brevity.

<defSpaceRequest><spaceName>aBuilding</spaceName><spatialModelName>GraphSpace</spatialModelName><parameters xsi:type="GraphSpaceParameters">

<nodeName>room45</nodeName><nodeName>room46</nodeName>...<arcList>

<arcLocationName>Passage3</arcLocationName><fromNodeLocationName>room45</fromNodeLocationName><toNodeLocationName>room46</toNodeLocationName>...

</arcList></parameters>

</defSpaceRequest>

<defSpaceRequest><spaceName>aFloor</spaceName><spatialModelName>GridSpace</spatialModelName><parameters xsi:type="GridSpaceParameters">

<minRowIndex>0</minRowIndex><maxRowIndex>49</maxRowIndex><minColumnIndex>0</minColumnIndex><maxColumnIndex>99</maxColumnIndex>

</parameters></defSpaceRequest>

Fragment 1: defSpace invocations example

Fragment 1 shows the spaces definition for the example in Section 3.3. To define an ecology space, the name ofits spatial model must be provided; generic spatial models are pre-defined in SIS and globally identified by a uniquename (spatialModelName element). For example, ‘‘GraphSpace’’ and ‘‘GridSpace’’ identify the graph and the gridspatial model respectively. Spaces have a unique name inside an ecology (spaceName element). The parameterselement contains actual parameters to instantiate the spatial model. For each supported spatial model there is a specificSpaceParameters subtype. The graph spatial model requires a list of nodes and a list of edges. The grid spatial modelrequires lower and upper bounds for row and column indexes. Finally, the names spatial model simply requires a list ofnames.

A location of a space is globally identified in the core ecology by a pair (spaceName, locationName). For example,(‘‘aBuilding’’, ‘‘room45’’) identifies the node ‘‘room45’’ of the aBuilding space and (‘‘aFloor’’, ‘‘12, 7’’) identifiesthe element (12,7) of the aFloor space. The map operation creates explicit mappings. It maps locations identified by asource spatial context to the location identified by a target context. An enumerative spatial context is defined in WSDLas a spaceName element and one or more locationName elements. The wildcard ‘‘*’’ can be used to denote all thelocations of a space. A declarative spatial context is defined inWSDL as a spaceName element, a prametricName element,

1 http://www.w3.org/2002/ws/.2 http://websocket.org/.

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 587

a locationName element and a distance element. For example, an explicit mapping definition from the aFloor spaceto the aBuilding space is sketched in Fragment 2.

<mapRequest><sourceContext xsi:type="EnumerativeContext">

<spaceName>aFloor</spaceName><locationName>12,7</locationName></sourceContext><targetContext xsi:type="EnumerativeContext">

<spaceName>aBuilding</spaceName><locatioName>room45</locationName></targetContext>

</mapRequest>

Fragment 2: Map invocation example

The emit operation emits thematic information localized at all the locations specified by one or more spatial contexts(publicationContext element). Each contextmust refer to valid locations, i.e., locations belonging to the specified spaceaccording to its definition. The content of a thematic information (info element) can be submitted as textual informationwhich is directly expressible in XML types or in a binary form3 by means of standard technologies like SOAP-MTOM.4 Forexample, a thematic information can be emitted on the cell (12, 7) of the aFloor space as shown in Fragment 3.

<emitRequest><info>...</info><publicationContext xsi:type="EnumerativeContext">

<spaceName>aFloor</spaceName><locationName>12,7</locationName></publicationContext>

</emitRequest>

Fragment 3: Emit invocation example

The subscribe primitive creates a subscription on one or more spatial contexts. A notification is received by thesubscribers as a Matching structure. It includes an information itemwith the contexts where it was originally localized andthose which are either explicitly or implicitly mapped from them (see getMappedContexts operation in Section 3). Thetimestamp element represents in Coordinated Universal Time when the emission has been perceived by SIS. For example,the emission in Fragment 3 will be notified to a component that performed the proper subscription as shown in Fragment 4.

<matching><info>...</info><timestamp>11:11:11-2011-11-11</timestamp><context xsi:type="EnumerativeContext">

<spaceName>aFloor</spaceName><locationName>12,7</locationName></context><context xsi:type="EnumerativeContext">

<spaceName>aBuilding</spaceName><locationName>room35</locationName></context></matching>

Fragment 4:Matching notification example

Other operations, not shown here for shortness, allow virtual organisms to inspect the spatial structures and to deletespaces, mappings and subscriptions.

The operations are accessible through a graphical Web interface. The component implementing such interface can beviewed as a virtual organism,which realizes the causal connectionwith a physical organism, i.e., a human being. Fig. 6 showsthe interface for the emit operation, allowing the user to define a textual piece of thematic information and to localize it byselecting an ecology space and one or more locations.

5.4. SIS Core

The Web Services operations described above are implemented on the top of the core layer. Actually they delegate theirimplementation to SISManager, which is the endpoint module of the SISCore layer. It realizes the operations defined inSection 3; the Web Services operations simply locally call SISManager operations. SISManager, like the other modules ofSISCore, is implemented in Java. All the WSDL data types presented in Section 5.3 turn into proper Java classes, using theJava Architecture for XML binding.5 SISManager exploits the Engine layer to reify the matching rules and the restrictedtransitive closure of explicit mappings. SISManager delegates the implementation of all the SIS operations to the Engine. Itonly manages subscription stubs for synchronous and asynchronous delivery of notifications.

3 http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/#base64Binary.4 http://www.w3.org/TR/soap12-mtom.5 http://java.sun.com/xml/downloads/jaxb.html.

588 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

Fig. 6. SIS Web interface.

Core spatial models are implemented in Java as subclasses of the abstract Space class that defines abstract methods thateach spatial model implementation must support. The SISCore layer can accommodate other core spatial models by addingsubclasses of the Space class. From this point of view the SIS framework is extensible, provided that extensions oblige SISto be re-installed. The name spatial model is reified with a straight implementation where names are realized as strings.Theweighted directed graph spatial model realizes theminimumweight prametric using the Dijkstra algorithm [13], whichassumes non-negative weights. Implementations for not-weighted directed graph and not-weighted unoriented graphs areavailable: they are a simple form of delegations to the weighted directed graph space implementation where all edges areset to the same weight (1). Four implementations of grid spatial models are available, to manage up to four cell dimensions.

The Configuration module realizes the operations provided by SIS to dynamically manage ecology spaces and mappings.Moreover SIS also offers support for a one-shot, initial configuration provided by external components. The currentimplementation includes a Configurator module which calls defSpace and map operations starting from an XMLdescription file using the XML-WSDL data types presented in Section 5.3.

5.5. Engine

The Engine layer exploits the Jess rule engine to compute the matches and the transitive closure of explicitmappings. Ecology spaces, mappings and matching rules turn into Jess statements of the inferential engine. Explicitmappings correspond to Jess facts. Explicit mappings are defined through the map(sourceContext, targetContext)primitive. The source and target contexts may indicate several locations, especially when declarative contexts areprovided. JessReasoner translates map invocations to Jess facts representing explicit mappings among pairs of locations(EnumMapping fact). A mapping handle identifies univocally the set of EnumMapping generated by a map invocation. Forexample, the map invocation in Fragment 2 corresponds to the EnumMapping fact in Fragment 5.

(EnumMapping (sourceSpaceName "aFloor") (sourceLocationName "12,7")(targetSpaceName "aBuilding") (targetLocationName "room45") (mh "dm1"))

Fragment 5: EnumMapping Fact example

Eachmap invocation involves the computation of the restricted transitive closure of the explicitmappingsMR (Section 3).The EMR relation (the set of explicit mappings) is given by the EnumMapping facts which are generated directly by themap invocations. The indirect mappings, which are inferred by the recursive part of the definition exploiting the transitiveproperty, are calculated by the Jess rule in Fragment 6.

(defrule enumMappings-transitive-closure(EnumMapping (sourceSpaceName ?spaceName1) (sourceLocationName ?locationName1)

(targetSpaceName ?spaceName2) (targetLocationName ?locationName2) (mh ?value~nil))(EnumMapping (sourceSpaceName ?spaceName2) (sourceLocationName ?locationName2)

(targetSpaceName ?spaceName3&~?spaceName1) (targetLocationName ?locationName3) )(not (EnumMapping (sourceSpaceName ?spaceName1) (sourceLocationName ?locationName1)

(targetSpaceName ?spaceName3) (targetLocationName ?locationName3)))=>(assert (EnumMapping (sourceSpaceName ?spaceName1) (sourceLocationName ?locationName1)

(targetSpaceName ?spaceName2) (targetLocationName ?locationName2) (mh nil)))

Fragment 6: EnumMapping facts restricted transitive closure in Jess

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 589

The first two conditions directly reify the recursive part of the restricted transitive closure definition, ensuring that theexternal locations belong to different spaces. The mh field of EnumMapping facts reports a handle that identifies a mapping.Direct mappings have a non-empty handle, whereas indirect mappings have an empty handle (nil).

A emit invocation generally involves a list of spatial contexts. Like the translation of map invocations, an emission istranslated into a set of ‘‘micro’’ Publication facts, referred to the single location names which are indicated by the spatialcontexts. For example, the emission in Fragment 3 corresponds to the fact in Fragment 7. A publication handle identifiesall the publication facts generated by a emit invocation. A subscribe invocation is translated in a similar way. In case ofdeclarative contexts, the location names are obtained through a proper getSubSpace operation.

(Publication (spaceName "aFloor") (locationName "12,7") (publicationHandle "p1") (info ?info))

Fragment 7: Publication fact example

Proper Jess rules reify the matching rules among publications and subscriptions. Whenever a match among publicationand subscriptions facts occurs, Jess sends a proper notification to the SISManager module.

(defrule direct-match-originals(SISManager (subscriber ?manager))

(Publication (spaceName ?space) (locationName ?locationName) (publicationHandle ?ph) (info ?info))(Subscription (spaceName ?space) (locationName ?locationName|"*") (subscriptionHandle ?sh))(Publication (spaceName ?space2) (locationName ?locationName2) (publicationHandle ?ph) )=>(?manager matchNotify ?info ?sh ?ph ?space2 ?locationName2))

Fragment 8: Direct matching with original contexts Jess rule

The direct-match-original rule (Fragment 8) checks for direct matching and notifies the original publicationlocations. Extended notifications (see Section 3.6) require to send to the subscriber all the contexts that are related to amatching, including both the original and derived ones according to the transitive closure of directmappings. This is realizedby proper Jess rules, which are not shown for brevity.

Finally, SISManager collects the received matching notifications in proper internal stubs and sends them to thesubscribers.

5.6. Performance measurements

Several performance and scalability tests have been performed on the current SIS implementation. The experimentaltests have been performed on a SIS instance running on an Intel Core i5 2.8 GHz pc with 4 GB of RAM, running Linux 2.6and version 1.6.0 64 bit of the Java Runtime Environment. Publications were generated at the fixed frequency of 50 Hz ona separate machine and sent to the SIS server. The measurements focused on the SIS reasoning time i.e., the delay betweenthe moment SIS receives a publication and the moment it generates the correspondent notification. At the end of eachsimulation, raw data were analyzed to compute and plot the average reasoning time.

The first experimental setup aimed to analyze the dependence of the mean reasoning time on the number of mappings.The spaces configuration consisted of n name spaces each containing a single location. Every location is directly mappedonto the location of the next space, thus realizing a chain of n − 1 direct mappings. After the transitive closure of themappings, the total number of mappings is therefore equal to n(n− 1)/2. Publications were localized on the first space andsubscriptions on the last space. Fig. 7(a) shows the mean reasoning time for n varying from 1 to 20. The reasoning time hasbeen evaluated equals to O(n), even if the total number of mappings is O(n2). This may be explained by the fact that theJess rule engine exploits the efficient Rete algorithm [67], which stores in a specific data structure the facts that currentlymatch each rule. This increases the speed of significant magnitude orders in the average case [67], obviously at the price ofmemory occupation.

A second experimental setup aimed to analyze the impact of increasing dimension of the publication contexts. The spaceconfiguration consisted of a single name space with 100 locations. The mean reasoning time was measured for differentvalues of the number of locations included in the publication context, ranging from1 to 10. Fig. 7(b) shows the correspondingresults. Here the reasoning time behaves like O(n2).

Considering the limits of the prototypal implementation, these tests provided useful hints for the estimations of theperformance of the proposed approach. In particular, they confirm that the choice of identifying a few core spatial conceptsand to embed the implementation of the related algorithms into an efficient reasoning engine paves the way to theachievement of a good cost/performance trade-off.

6. An example ecology

Thepurpose of this section is to describe themain characterizing features of the SIS concrete framework through a portionof an applicative scenario that has been developed within the GAS Project mentioned in the previous section to implementan augmented classroom.

590 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

0.24

0.22

0.20

0.18

0.16

0.14

0.12

0.10

Mea

n re

ason

ing

time

(ms)

Mea

n re

ason

ing

time

(ms)

0 5 10

Number of mapped spaces

15 20

Number of locations in the publication context

6

5

4

3

2

1

00 2 4 6 108

a b

Fig. 7. (a) Mean reasoning time respect to the number of mapped spaces; (b) Mean reasoning time respect to the number of locations in publicationcontext.

6.1. Reference scenario

In the realized augmented classroom the interactions between a teacher, a tutor and some students are mediated byan environment containing an interactive desk, an interactive white-board (IWB) and a public wall (PW). The interactivedesk is partitioned in two areas: a teacher desk (TD), whose contents are visible to the teacher only, and a public desk (PD),whose contents can be viewed by all the participants through the public wall. RFID sensors recognize tags carried by usersapproaching specific locations in the classroom, in particular the interactive white-board. A remote content repository (CR)stores the teaching materials.

Suppose that, in this classroom, Francesco (the teacher) is managing a workshop on a specific issue with a group ofstudents with the help of Marco (the tutor). Francesco is sitting at the interactive desk that shows him the workshop topics.By interacting with the private desk area (TD), he selects one problem from the current topic of the workshop so that the listof the related documents is retrieved from the content repository (CR), which hosts teaching materials previously preparedand organized by Francesco by means of the learning management system provided by the University. Francesco selectsone teaching material (the presentation about a problem to be solved) from the list, and the corresponding presentation isvisualized in the private desk area (TD) of the interactive desk: as it perfectly fits the current topic of theworkshop Francescotransfers the presentation to the public desk area (PD) so that it is also displayed on the IWB. During the following discussion,Maria (a student) approaches the IWB to draw a solution that is discussedwith the class. Once the solution is agreed upon bythe class, Marco (the tutor) approaches the IWB and saves its content; since the content is saved by a tutor, it is displayed onthe teacher desk (TD). The teacher can approve the new content that, as a consequence, is stored in the content repository(CR) and associated to the current problem since it will be an input of the next meeting with the students attending thisworkshop.

The next sections illustrates how this ecology is represented and supported by the SIS concrete framework.

6.2. Ecology spaces

This section shows (in terms of object diagrams) the fragments of the ecology spaces that will be used throughout theexample. A simplified graph spatial model (denoted SimpleGraphSpace and not shown for shortness) will be used, as inthe example graph edges are not exploited as locations.

Fig. 8 shows how teaching materials (thematic information) can be located in ecology spaces that are instances of thegeneric simplified graph spatial model and that arrange the materials in a tree structure. The aWorkshop space includestopics, each including several problems to be solved. Each topic is bound to a video, whereas each problem is bound to apresentation (about the problem) and to several solutions (in the scenario, developed by the students and approved by theteacher). Each teaching material has an associated DOI, i.e., a unique identifier inside the content repository CR.

In general, the separation of concerns between spatial and thematic aspects allows the same contents to be contextualizedin different spaces as possibly required by different situations, e.g., in other workshops or other steps of the course.

Several ecology names spaces are useful in the scenario (see Fig. 9 and recall that names space is just a collection oflocations without relations among them). The users space defines user names. The devices space allows physical devicesto be named. The tags space defines RFID tags. The roles space contains three roles, namely teacher, tutor and student.

Finally, the classroom space is defined as a grid spatial model where each cell is identified by i,j indexes (not shownfor brevity).

A Coordinator virtual organism (introduced in Section 2) is in charge of initially defining (i.e., instantiating via thedefSpace primitive, see Section 5.3) the users, roles and aWorkshop ecology spaces and to consequently maintainthem updated and coherent. The Coordinator virtual organism relies on the existing services provided by the University,from which it retrieves the required information and translates it in terms of the defined ecology spaces. In particular,the users and roles spaces are managed according to the information retrieved from the information system of the

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 591

Fig. 8. aWorkshop ecology space.

Fig. 9. Names ecology spaces.

University, whereas the aWorkshop space according to the information retrieved from the learning management system,where courses and workshops are managed by the teachers. More specifically, the Coordinator defines the structure of theaWorkshop space in terms of locations and then it performs a set of post operations so that the learning material may bebound as thematic information to the properly aWorkshop locations.

In general, this approach based on the Coordinator virtual organism allows the integration of existing services inthe ecology by keeping aligned the contents of the information sources with their spatial representation in the specificapplication (in this case the augmented classroom) and vice-versa.

For completeness, the classroom, devices and tags ecology spaces are defined by a human operator who knows thephysical structure of the class, the name of the devices and the identifiers of the tags.

6.3. Space mappings

Once spaces have bee defined, then the mappings between their locations allow the definition of the logic governinga (direct and indirect) communication flow among the organisms. Fig. 10 shows the mappings that are relevant to thereference scenario. The right side of the figure shows that a location in the tags space is mapped to one location in theusers space (because each user has a tag assigned), which in turn is mapped to a location in the roles space (because eachuser has a role assigned). The left side shows that RFID sensor names (from the devices space) are mapped to locations inthe classroom space, modeling ‘‘where’’ sensors are in the classroom. classroom locations, in turn, are mapped to theIWB name (from the devices space), modeling that the IWB is ‘‘close to’’ those locations.

Mappings between theusers and theroles locations are defined by the sameCoordinator virtual organism that definesthe required ecology spaces relying on the existing information system of the University. The human operator who definedthe classroom, devices and tags ecology spaces also defines the mappings between the cells of the classroom andthe names of the devices and between the names of the tags space and the names of the users space.

592 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

Fig. 10. Mappings.

Fig. 11. Components.

6.4. Organisms as components

Fig. 11 sketches the software components that participate in the ecology. The components stereotyped as≪organism≫ reify augmented organisms whose virtual organisms are causally connected to physical devices: in this way,they allow the users interact through the environment by exploiting the space-aware interaction styles supported by SIS.

Each organism is aware of a subset of ecology spaceswhere it is interested to post, emit or subscribe thematic information.This is represented by the dependencies shown in the bottom of Fig. 11. For example, TeacherDesk, the more complexcomponent, still exploits three spaces only. The other components exploit just one or two spaces.

Organisms perform some subscriptions to be informed about contextualized information of their interest.TeacherDesksubscribes to the tutor location of the roles space to be informed about new materials saved by the tutor (wherever hesaved them); PublicDesk and PublicWall subscribe to the PD location of devices to be informed about materials thatshould be shown publicly, in fact PD is the location where public content will be localized; InteractiveWhiteBoardsubscribes to the IWB location of devices to be informed about the users that work at the IWB itself; finally,ContentRepository subscribes to the teacher location of the roles space to be informed when the teacher approvesa new material.

6.5. Using the space structure

Organisms use the structure of the spaces they are aware of since they know their associated semantics. In this scenario,TD exploits the space structure to present organized content to the teacher.

At a certain point of the workshop, the interactive desk must show the teacher the workshop topics. To this aim theTeacherDesk (TD) gets the structure of the aWorkshop space (Fig. 8) from SIS, to build the user interface showing topicsand problems related to the current workshop. TD analyzes the aWorkshop structure and retrieves the list of topics by

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 593

Fig. 12. Interactive class activities.

looking for nodes with a nodeId that matches the topicN pattern (where N is the topic ID). In fact, the organism TD knowsthe semantics of the nodes and applies it to the structure of the graph space aWorkshop.

When the teacher chooses topic2, then TD retrieves and shows the related problems by looking for the children of thetopic2 node: in this case, only problem3. Again, the TD knows (according to the space semantics) that the children of atopic node are problems nodes.

6.6. Interaction examples

At the beginning of the workshop the teacher selects and displays a teaching material among those that have beenpreviously created for the workshop. The teacher indicates to TeacherDesk (by means of the user interface) thatproblem3 ofaWorkshopwill be the subject of the class activity. Consequently,TeacherDesk inspects the<aWorkshop,problem3> location and gets the previously emitted information at that location; each retrieved information includes asthematic information the DOI of the teaching materials associated to problem3. Then TeacherDesk shows the availablematerials to the teacher. The teacher selects the presentation of the problem (corresponding to the thematic informationaProblem:Presentation), gets it by directly interacting with the content repository and decides to make it public.To inform the ecology that the material is publicly available, the TeacherDesk emits the aProblem:Presentationthematic information at the <devices, PD> location.

Then SIS notifies the organisms that subscribed to that location, i.e., PublicDesk and PublicWall, which display theteaching material associated to aProblem:Presentation.

It is of interest to note that, thanks to the space mediated interaction, the TeacherDesk is aware only of the fact thatthe presentation is displayed on the public desk PD, although the PW also shows it.

After that, the interactive class activity begins (see Fig. 12). When Maria (a student) approaches the interactive white-board, Maria’s tag ‘‘365’’ is recognized by the RFIDSensor RFID1. The sensor emits at its own location <devices,RFID1> and at the location of the detected tag <tags, 365> a thematic information stating that something has been‘‘detected’’.

Consequently, SIS notifies the InteractiveWhiteBoard, because InteractiveWhiteBoard subscribed to<devices, IWB> and there are the following mappings: from <devices, RFID1> to <classroom, <1,4>> andfrom <classroom, <1,4>> to <devices, IWB> (see Fig. 10).

594 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

The information notified to InteractiveWhiteBoard includes the complete matching context derived from bothdirect and indirect matching (see Section 3.6). In particular, the matching context includes <users, Maria> becausethere is a mapping from <tags, 365> to <users, Maria>. InteractiveWhiteBoard is interested in the usersspace and locally stores that the current user is Maria.

Maria edits the white-board and saves the content she produced (saved as a screenshot by the interactive white-board).When the screenshot is saved, InteractiveWhiteBoard emits the IWBContent thematic information related to thescreenshot at the<users, Maria> location. In this case, this emission has no effect since nobody subscribed that locationeither directly or indirectly. However, an organism may still inspect the <users, Maria> location in the future (or anyother with a mapping related to this one) and this thematic information could become useful.

After a while Marco (the tutor) decides that the discussion terminates and approaches the white-board; in the samemanner as whenMaria approached the interactive white-board, SIS notifies the InteractiveWhiteBoard, and the latterlocally stores that the current user is Marco. OnceMarco saves the content at the white-board, InteractiveWhiteBoardemits at the <users, Marco> location the IWBContent thematic information about the new saved screenshot. Thistime SIS notifies the TeacherDesk, because TeacherDesk subscribed to <roles, tutor> and there is a mappingfrom <users, Marco> to <roles, tutor>. Then TeacherDesk retrieves and shows the white-board screenshot.

Francesco approves the content produced at the interactive white-board. Consequently, TeacherDesk emitsthe IWBContent at the <roles, teacher> and <aWorkshop, problem3> locations. Then SIS no-tifies the ContextRepository, because ContextRepository subscribed to <roles, teacher>. Finally,ContextRepository stores the newly created content (the interactive white-board screenshot) for future use.

7. Conclusions and future developments

The paper deals with Ambient Ecologies by introducing an architectural model where virtual and physical ecologiesare paired into augmented ecologies. The notion of space as a first class concept fosters a neat separation of the two mainparts of an ecology: the environment and the organisms it contains. The resulting approach goes a step further by allowingvirtual organisms to define and maintain individual views of the common environment through the notion of ecologyspaces, which can be described in terms of environment space models and can be put in mutual relation by means ofmappings between locations. This leads to a flexible space-aware paradigm supporting the indirect communication betweenorganisms, including both message passing and data sharing.

The architectural model is reified in a concrete framework called SIS, where software components correspond toorganisms and whose operations offer to the components the capability to implement their collaborative behavior. SIS isunder experimentation in several application scenarios, including the one presented in the paper. The experience gained inthese scenarios and the performance tests confirm that the architecturalmodel is a sound basis for the effective developmentof augmented reality applications including heterogeneous components.

Future work will concern the extension of the current version toward the following improvements:

• The extension of the laws that regulate the communication paradigm toward a richer usage of the ecology spaces: forexample, the possibility to ‘‘propagate’’ information along the space structure according to some parametric specificationof the propagation law. This feature could be used to implement more expressive notification/awareness promotionmechanisms.

• The possibility to enrich the core spatial models with additional semantics (for example, via OWL) in order to allowspecific (communities of) organisms to define their own interpretation of the core spatial models and to ensure theconsistence of dynamically changing spaces and mappings.

• To conceive alternative implementations of the framework that overcome the current service-oriented architecture, toexploit the architectural model in the area of highly distributed systems and to better suit application domains withstrong real-time requirements: for example, robotics and automation.

Acknowledgments

This work has been partially funded by the GAS (Grandi Attrezzature Scientifiche)—Intelligent Building project of theUniversity of Milano-Bicocca, the FIRB-InSyEme (Integrated Systems for Emergency) project of MIUR and the IMPULSOproject of MSE.

The authors would like to thank Francesco Fiamberti and Alessio Vertemati for their contributions to the experimentsand to the implementation.

References

[1] M. Satyanarayanan, Pervasive computing: vision and challenges, IEEE Personal Communications 8 (2001) 10–17.[2] W.E. Mackay, Augmented reality: linking real and virtual worlds: a new paradigm for interacting with computers, in: Proceedings of the Working

Conference on Advanced Visual Interfaces, AVI’98, ACM, New York, NY, USA, 1998, pp. 13–21.[3] R.N. Taylor, N. Medvidovic, E. Dashofy, Software Architecture: Foundations, Theory, and Practice, Wiley, 2009.

F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596 595

[4] C. Villalba, F. Zambonelli, Towards nature-inspired pervasive service ecosystems: concepts and simulation experiences, Journal of Network andComputer Applications 34 (2) (2011) 589–602.

[5] M. Shaw, R. DeLine, D.V. Klein, T.L. Ross, D.M. Young, G. Zelesnik, Abstractions for software architecture and tools to support them, IEEE Transactionson Software Engineering 21 (1995) 314–335.

[6] G.T. Heineman, W.T. Councill, Component-Based Software Engineering: Putting the Pieces Together, ACM Press, Addison-Wesley Professional, 2001.[7] M. Shaw, D. Garlan, Software Architecture: Perspectives on an Emerging Discipline, Prentice Hall, 1996.[8] A.G. Kleppe, J. Warmer,W. Bast, MDA Explained: TheModel Driven Architecture: Practice and Promise, Addison-Wesley Longman Publishing Co., Inc.,

Boston, MA, USA, 2003.[9] B. Motik, P.F. Patel-Schneider, B. Parsia, OWL 2 web ontology language: structural specification and functional-style syntax, 2009.

http://www.w3.org/TR/owl2-syntax/.[10] R. Aldrovandi, J.G. Pereira, An Introduction to Geometrical Physics, World Scientific, 1996.[11] J. Abello, P.M. Pardalos, M.G. Resende, Handbook of Massive Data Sets, 1st ed., Springer, 2002.[12] V.I. Levenshtein, Binary codes capable of correcting deletions, insertions, and reversals, Soviet Physics-Doklady 10 (8) (1966) 707–710.[13] T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein, Introduction to Algorithms, Second Edition, 2nd ed., The MIT Press, 2001.[14] P. Agarwal, Ontological considerations in GIScience, International Journal of Geographical Information Science 19 (5) (2005) 501–536.[15] M. Perry, F. Hakimpour, A. Sheth, Analyzing theme, space, and time: an ontology-based approach, in: Proceedings of the 14thAnnual ACM International

Symposium on Advances in Geographic Information Systems, ACM, Arlington, Virginia, USA, 2006, pp. 147–154.[16] G. Kortuem, F. Kawsar, V. Sundramoorthy, D. Fitton, Smart objects as building blocks for the Internet of things, IEEE Internet Computing 14 (2009)

44–51.[17] D.J. Cook, S.K. Das, How smart are our environments? an updated look at the state of the art, Pervasive and Mobile Computing 3 (2) (2007) 53–73.[18] R. Singh, P. Bhargava, S. Kain, State of the art smart spaces: application models and software infrastructure, Ubiquity (2006) 2–9.[19] L. Bullivant, Responsive Environments: Architecture, Art and Design, in: V&A Contemporaries, Victoria and Albert Museum, 2006.[20] J. Ferber, Multi-Agent Systems: An Introduction to Distributed Artificial Intelligence, Addison-Wesley Professional, 1999.[21] F.S.C. da Silva, W.W. Vasconcelos, Managing responsive environments with software agents, Applications of Artificial Intelligence 21 (2007) 469–488.[22] S. Loke, Building intelligent environments by adding smart artifacts to spaces: a peer-to-peer architecture, in: Intelligent Environments, IE, 2010 Sixth

International Conference on, 2010, pp. 25–28.[23] J. Bateman, S. Farrar, Spatial ontology baseline, Tech. Rep., Collaborative Research Center for Spatial Cognition, University of Bremen, Germany, 2004.[24] P. Grenon, Tucking RCC in Cyc’s ontological bed, in: Proceedings of the 18th International Joint Conference on Artificial Intelligence,Morgan Kaufmann

Publishers Inc., Acapulco, Mexico, 2003, pp. 894–899.[25] L. Vieu, Spatial representation and reasoning in artificial intelligence, in: Spatial and Temporal Reasoning, 1997, pp. 5–41.[26] C. Habel, C. Eschenbach, Abstract structures in spatial cognition, in: Foundations of Computer Science: Potential-Theory-Cognition, Springer-Verlag,

1997, pp. 369–378.[27] in: P. Turner, E. Davenport (Eds.), Vol. Spaces, Spatiality and Technology of the Kluwer International Series on Computer Supported CooperativeWork,

2005.[28] D. Micucci, F. Tisato, M. Adorni, Engineering spatial concepts, The Knowledge Engineering Review 24 (1) (2009) 77–93.[29] B. Cronin, Spaces, Spatiality and Technology, Springer, Netherlands, 2005 (Chapter) High-fidelity mapping of intellectual space, pp. 117–128.[30] A. Steed, I. MacColl, C. Randell, B. Brown, M. Chalmers, C. Greenhalgh, Models of space in a mixed-reality system, in: IV’04: Proceedings of the

Information Visualisation, Eighth International Conference, IEEE Computer Society, Washington, DC, USA, 2004, pp. 768–777.[31] G. Cugola, A.Margara,M.Migliavacca, Context-aware publish-subscribe:model, implementation, and evaluation, in: Computers and Communications,

ISCC 2009. IEEE Symposium on, 2009, pp.875–881.[32] A.K. Dey, Understanding and using context, Personal and Ubiquitous Computing 5 (1) (2001) 4–7.[33] S.W. Loke, Context-aware artifacts: two development approaches, IEEE Pervasive Computing 5 (2) (2006) 48–53.[34] C. Holzmann, A. Ferscha, A framework for utilizing qualitative spatial relations between networked embedded systems, Pervasive and Mobile

Computing (ISSN: 1574-1192) 6 (3) (2010) 362–381, doi:10.1016/j.pmcj.2010.03.001.[35] G. Stevenson, J. Ye, S. Dobson, P. Nixon, LOC8: a location model and extensible framework for programming with location, IEEE Pervasive Computing

9 (1) (2010) 28–37.[36] A. Dix, A. Friday, B. Koleva, T. Rodden, H. Muller, C. Randell, A. Steed, Spaces, Spatiality and Technology, Springer, Netherlands, 2005 (Chapter)Multiple

spaces, pp. 151–172.[37] C. Simone, S. Bandini, Integrating awareness in cooperative applications through the reaction–diffusion metaphor, Computer Supported Cooperative

Work 11 (3) (2002) 495–530.[38] M.P. Locatelli, G. Vizzari, Awareness in collaborative ubiquitous environments: the multilayered multi-agent situated system approach, ACM

Transactions on Autonomous and Adaptive Systems 2 (4) (2007) 13.[39] A. Dix, T. Rodden, N. Davies, J. Trevor, A. Friday, K. Palfreyman, Exploiting space and location as a design framework for interactive mobile systems,

ACM Transactions on Computer–Human Interaction 7 (3) (2000) 285–321.[40] L. Ciolfi, L. Bannon, Spaces, Spatiality and Technology, Springer, Netherlands, 2005 (Chapter) Space, place and the design of technologically-enhanced

physical environments, pp. 217–232.[41] M.P. Locatelli, M. Loregian, G. Vizzari, Artificial societies in a community-based approach to ambient intelligence, The Computer Journal (2009).[42] S. Benford, L. Fahlén, A spatial model of interaction in large virtual environments, in: ECSCW’93: Proceedings of the Third Conference on European

Conference on Computer-Supported Cooperative Work, Kluwer Academic Publishers, Norwell, MA, USA, 1993, pp. 109–124.[43] C. Parent, S. Spaccapietra, E. Zimányi, Spatio-temporal conceptualmodels: data structures+ space+ time, in: Proceedings of the 7thACM International

Symposium on Advances in Geographic Information Systems, ACM, Kansas City, Missouri, United States, 1999, pp. 26–33.[44] D.M.Mark, A. Skupin, B. Smith, Features, objects, and other things: ontological distinctions in the geographic domain, in: In Spatial Information Theory:

Foundations of Geographic Information Science, in: Lecture Notes in Computer Science, Springer-Verlag, 2001, pp. 488–502.[45] D.L. Parnas, On the criteria to be used in decomposing systems into modules, Communications of the ACM 15 (12) (1972) 1053–1058.[46] M. Yuan, Geographic Information Research: Bridging the Atlantic, Taylor and Francis, 1996 (Chapter) Modeling semantical, temporal and spatial

information in geographic information systems, pp. 334–347.[47] A. Buccella, A. Cechich, P. Fillottrani, Ontology-driven geographic information integration: a survey of current approaches, Computers & Geosciences

35 (4) (2009) 710–723.[48] F. Hakimpour, Using ontologies to resolve semantic heterogeneity for integrating spatial data base schemata, Ph.D. Thesis, Zurich University, 2003.[49] A. Sotnykova, C. Vangenot, N. Cullot, N. Bennacer, M.a. Aufaure, Semantic mappings in description logics for spatio-temporal database schema

integration, Journal on Data Semantics (JoDS) III (2005) (Special Issue on Semantic-based Geographical Information Systems).[50] J. Euzenat, P. Shvaiko, Ontology Matching, Springer-Verlag, Heidelberg, DE, 2007.[51] Y. Kalfoglou, M. Schorlemmer, Ontology mapping: the state of the art, Knowledge Engineering Review 18 (1) (2003) 1–31.[52] M. Mamei, F. Zambonelli, Programming pervasive and mobile computing applications: the tota approach, ACM Transactions on Software Engineering

and Methodology 18 (4) (2009) 1–56.[53] W. Emmerich, N. Kaveh, Component technologies: Java beans, COM, CORBA, RMI, EJB and the CORBA component model, 2002, in: Proceedings of the

8th European Software Engineering ConferenceHeld JointlyWith 9thACMSIGSOFT International Symposiumon Foundations of Software Engineering,Vienna, Austria, pp. 691–692.

[54] C. Lee, D. Nordstedt, S. Helal, Enabling smart spaces with OSGi, IEEE Pervasive Computing 2 (3) (2003) 89–94.[55] W.K. Edwards, M.W. Newman, J.Z. Sedivy, T.F. Smith, Bringing network effects to pervasive spaces, IEEE Pervasive Computing 4 (3) (2005) 15–17.

596 F. Tisato et al. / Pervasive and Mobile Computing 8 (2012) 575–596

[56] G. Mühl, L. Fiege, P. Pietzuch, Distributed Event-Based Systems, Springer, 2006.[57] P.T. Eugster, P.A. Felber, R. Guerraoui, A.-M. Kermarrec, The many faces of publish/subscribe, ACM Computing Surveys 35 (2003) 114–131.[58] P.T. Eugster, B. Garbinato, A. Holzer, Location-based publish/subscribe, in: Proceedings of the Fourth IEEE International Symposium on Network

Computing and Applications, IEEE Computer Society, Washington, DC, USA, 2005, pp. 279–282.[59] N. Carriero, D. Gelernter, Linda in context, Communications of the ACM 32 (4) (1989) 444–458.[60] M. Ceriotti, A.L. Murphy, G.P. Picco, Data sharing vs. message passing: synergy or incompatibility?: an implementation-driven case study,

in: Proceedings of the 2008 ACM Symposium on Applied Computing, SAC’08, ACM, New York, NY, USA, 2008, pp. 100–107.[61] N. Gámez, L. Fuentes, FamiWare: a family of event-based middleware for ambient intelligence, Personal and Ubiquitous Computing 15 (4) (2011)

329–339.[62] J. Kusznir, D.J. Cook, Designing lightweight software architectures for smart environments, in: 2010 Sixth International Conference on Intelligent

Environments, IEEE, 2010, pp. 220–224.[63] C. Goumopoulos, A. Kameas, Ambient ecologies in smart homes, Computer Journal 52 (8) (2009) 922–937.[64] M. Viroli, M. Casadei, S. Montagna, F. Zambonelli, Spatial coordination of pervasive services through chemical-inspired tuple spaces, ACM Transactions

on Autonomous and Adaptive Systems 6 (2011) 14:1–14:24.[65] M. Aiello, S. Dustdar, Are our homes ready for services? a domotic infrastructure based on the web service stack, Pervasive and Mobile Computing 4

(4) (2008) 506–525.[66] I. MacColl, D. Millard, C. Randell, A. Steed, B. Brown, S. Benford, M. Chalmers, R. Conroy, N. Dalton, A. Galani, C. Greenhalgh, D. Michaelides, T. Rodden,

I. Taylor, M. Weal, Shared visiting in equator city, in: CVE’02: Proceedings of the 4th International Conference on Collaborative Virtual Environments,ACM, New York, NY, USA, 2002, pp. 88–94.

[67] C. Forgy, Rete: a fast algorithm for the many pattern/many object pattern match problem, Artificial Intelligence 19 (1) (1982) 17–37.