Causality Control in Dynamic Platforms Jacky Estublier, Germán Vega Université Grenoble Alpes, LIG Grenoble, France {Jacky.Estublier, German.Vega}@imag.fr Abstract— The increasing dynamicity of ubiquitous environments and the rapid penetration of many sensors in our day life are causes of concern for application designers and developers. Indeed, they have to implement reliable applications in a context in which the managed entities have a very low level of abstraction; they are autonomous, heterogeneous, and change in unpredictable ways. To simplify developers work, there is a clear need to define a higher level of abstraction in which these entities can be represented homogeneously and managed systematically, irrespective of the many technical details. To be used safely, this representation must be causally related to the represented entities. Providing a high level causal representation is very challenging, because its implementation depends on the nature of the managed entities, and because in ubiquitous systems the representation and the system are evolving simultaneously and independently, sometimes in incompatible ways. The paper describes a systematic and extensible way to define and implement causality, and presents the experience with the Apam system in the domain of service platforms. Keywords- component; model; services; platform; causality; operational; OSGi. I. INTRODUCTION Almost every piece of information managed by a program is a representation of something, either abstract concepts (integers, strings), or real entities (persons, cars). An important part of computing sciences has been devoted to representations. In the 2000s, modelling proposed to make more formal the relationship between a representation (a model) and the system being represented, the System Under Study (SUS). When a part of the SUS is not directly accessible to the machine (e.g., a part of the “real world”), building a representation is a preliminary step before writing a program that works on the SUS. A fundamental property of a model is to provide a convenient representation of the SUS: it should only represent what is needed at the right level of abstraction, making the understanding easier, and making the programs simpler. Therefore, even when the SUS is itself abstract, it is often convenient to build “on top” of it, a representation that fits better the needs. Note that the SUS itself can be a representation of a lower level system, making SUS and representation relative concepts. Indeed, computer sciences make heavy use of chains of representations, like abstraction layers in an operating system. The intuition often makes a distinction between SUS that are part of the real world (e.g., cars and houses represented in a database), and SUS that are electronic entities (files and ports in an operating system). This intuition is often misleading, machine world and real world are not two separate worlds; after all, the machine too pertains to the real world, and the SUS can include entities pertaining to the machine. However, what is relevant is that for electronic entities changing the representation can be translated automatically, and almost instantaneously, into corresponding changes on the represented entity (e.g., closing a port or changing the value of an integer Java variable). We say that the representation is operational. It is of course not the case for real world entities (changing the color of a car registered in a data base does not actually change the color of the car itself). For electronic entities, system changes can be directly observed and translated into the corresponding representation. We say that the representation is sensitive to its SUS. For real world entities, it is a program, or an administrator, that keeps the representation up to date, not the entity itself. A representation that is both operational and sensitive (as illustrated in Figure 1) is said to be causally related to its SUS, and causality is the relationship between a representation and its SUS. Operationality and sensitivity are reciprocal properties, making causality symmetric, and making relative the concepts of SUS and representation. Figure 1. Causality. With the advent of modeling as a discipline, the representation has become more formal and higher level, often based on Object-Oriented concepts, making program and representation pretty close, blurring even more the boundary between system and representation. With the recent irruption of many sensors and actioners (ubiquitous computing, home automation, games, and so on) the machine and the real world became intertwined, because electronic devices have the property to be both in the machine world and in the real world; we call it the shared world. 512 Copyright (c) IARIA, 2014. ISBN: 978-1-61208-367-4 ICSEA 2014 : The Ninth International Conference on Software Engineering Advances