Jiri HARAZIM harazim@mail.muni.cz Mediation Chain GenerationMediation Chain Generation in Pervasive Environmentsin Pervasive Environments Supervisors: RNDr. Radek Ošlejšek, Ph. D. Prof. Philippe Lalanda 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 2 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 3 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 4 Pervasive (ubiquitous) ComputingPervasive (ubiquitous) Computing „Ubiquitous computing names the third wave in computing, just now beginning. First were mainframes, each shared by lots of people. Now we are in the personal computing era, person and machine staring uneasily at each other across the desktop. Next comes ubiquitous computing, or the age of calm technology, when technology recedes into the background of our lives.“ Mark Weiser (1952-1999) 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 5 Pervasive (ubiquitous) ComputingPervasive (ubiquitous) Computing Thre are three main categories of devices: small, hand-size and large 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 6 Pervasive EnvironmentPervasive Environment Freely shared, multi-purpose devices integrated into everyday objects used by users in different contexts. Pervasive Environment consists of computing devices integrated into everyday objects 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 7 Mediation & Mediation ChainMediation & Mediation Chain Mediation consists of Data Collecting Synchronization Mediation Logic Execution (i.e. data transformations) Routing and Delivery via Mediation Chain 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 8 MotivationMotivation When building pervasive applications, it is necessary to exploit sensing devices in pervasive environment, but: Sensing devices have heterogeneous interfaces Devices often produce different data (different unit, time interval, format, ...) Pervasive Environment ?Pervasive Application As a result, an integration solution is needed How to exploit sensing devices? 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 9 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 10 State of the ArtState of the Art New challenges... Complexity Dynamism Heterogenity … bring new solutions: Component-Based Software Engineering Service-Oriented Computing Mediation 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 11 Service-Oriented ComputingService-Oriented Computing Schema Advantages Loose-coupling: only service contract is shared Late-binding: on-demand binding Evolution: a provider can be replaced 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 12 Service-Oriented ComponentsService-Oriented Components Provider Component Provider Component Consumer Component Consumer Component Provided service (specification) Consumed service (dependency) Binding (performed at runtime by framework) 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 13 IntegrationIntegration Proxy based integration Advantages Separation of concerns Disadvantages Lack of modularity Lack of composition AA ProxyProxy BB AA BB Platform-based integration Advantages Composition of transformations Modular Disadvantages Complex, hard to introspect Integration platform 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 14 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 15 Integration issues of devices in pervasive environment: Data Representation (i.e. different units) Dynamism (devices may appear or disappear anytime) Configuration (amount of manual configuration) Timing aspects (data aggregation, sync vs async) Problematic ChallengesProblematic Challenges 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 16 PervML Generation of code from several models Doesn't address heterogeneity SStream Considers data from sensors as tuples Interpretation of data is delegated on the client EEML Extensible Environment Markup Language Flexible scheme for representation of data from sensing devices Used in Cosm project DynaMo Dynamic Multimodal Interface Integration based on proxies, semantic and type of data Related WorkRelated Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 17 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 18 Rondo FrameworkRondo Framework Global scheme: Model-Driven approach of Rondo Framework for defining and dynamically assembling service-oriented components 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 19 Background: Creating PervasiveBackground: Creating Pervasive ApplicationsApplications Aspects of pervasive applications addressed by Rondo: Discoverability Context (i.e. User's location) Dynamic Adaptability Composability Rondo is essentially functional today Components need to express high-level dependencies to the data produced by devices. 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 20 Goal of this workGoal of this work Propose smarter integration of sensing devices in the Rondo approach by generating mediation flow from high-level description that: Hides the complexity of heterogeneous devices Provides unified access to underlying devices Provides unified data Provides additional capabilities (transformations) 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 21 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 22 ProposalProposal Incorporate concept of Semantic Tag Human-understandable semantic expression associated with various devices: humidity, presence, temperature, illuminance etc. Extend the Rondo language by mediation concept Uses expressive filter (RFC#1960) applicable on data Contract of Mediator: tries to translate data before filtering (i.e. (location=livingroom) but device may produce location=living-room or room-04 although they denote the same location) Use Cilia as underlying component model in the generation phase Enables dynamism, modularity, follows EAI patterns 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 23 Environment Interaction FrameworkEnvironment Interaction Framework Rondo 1. Data described by description language 2. Generation of mediation chain 5. Data delivery Available devices 4. Mediation Mediation Chain Environment Interaction Framework 3. Data retrieval 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 24 Description LanguageDescription Language Consists of tag & filter Tag denotes the semantic meaning of data that is collected in environment. Emphasis on semantic aspect instead of form of data For example: ”temperature”, ”humidity”, ”illuminance”, ”sensed-presence-of-human” etc. Filter influences generation of mediation chain Incorporates mediators to enable transformation By chaining mediators it is possible to obtain quite complex behaviour 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 25 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 26 ImplementationImplementation EIF Available as a service with simple and intuitive API 3 OSGi bundles (API, Controller and Cilia-Components) 20 Cilia components for additional transformations Independent from underlying technologies Used technologies Cilia Mediation Framework Apache iPOJO Apache Maven JScience library 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 27 AgendaAgenda Introduction State of the Art Problematic Challenges and Related Work Background: Creating Pervasive Applications Proposition Implementation Validation Conclusion and Future Work 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 28 ValidationValidation Validation Scenario based on real use-case brought by ADELE tested on iCASA: Digital House Simulator Scenario Human's presence in the house triggers actions (switches on/off light, air-condition etc.) based on certain conditions that are retrieved from sensing devices via EIF (such as time, illuminance and temperature) Out-adapterTrigger Starts mediation as soon as data from all adapters are available In-adapter Unit converter Average Aggreg. Delta filter Converts Fahrenheit and Kelvin to Celsius Calculates arithmetic mean (average) Filters out data if difference comparing to last propagated value is lower than 0.2 In-adapter ºF ºK ºC 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 29 iCASA House SimulatoriCASA House Simulator Results  Passed succesfully 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 30 ValidationValidation Validation in practice Verified against validation scenario Tested with various combinations of mediators Exploited advanced features such as unit conversions Full integration with all sensing devices in iCASA such as thermometers, presence sensors, noise sensors, illuminance sensors and power-consumption sensors iCASA: Digital House Simulator 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 31 Conclusion and Future WorkConclusion and Future Work Conclusion Generates mediation chain and provides additional transformations of sensed data Simplifies the development of pervasive applications (the simplest mediation chain can be created and started in only 2 lines of code) EIF will be integrated in Rondo Framework Future Work Integration into Domain-Specific Language in Rondo Extend description language and enable hierarchical data Two-way interaction with environment More components (triggers & mediators) 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 32 Hansmann, Uwe. Pervasive Computing: The Mobile World. Ebling R. Maria, Baker Mary. Pervasive Tabs, Pads, and Boards: Are We There Yet? Krakowiak Sacha. Middleware Architecture with Patterns and Frameworks. Crnkovic Ivica, Vulgarakis Aneta, Chaudron R. V. Michel. A Classification Framework for Software Component Models. Gugen Levent, Labbe Cyril, Roncancio Claudia, Olive Vincent. Sstream: A Model for Representing Sensor Data and Sensor Queries. Haque Design + Research Ltd.. Extensible Environments Markup Language: EEML. Avouac Pierre-Alain, Lalanda Philippe, Nigay Laurence. Service-Oriented Autonomic Multimodal Interaction in a Pervasive Environment. Hall S. Richard, Pauls Karl, McCulloch Stuart, Savage David. OSGi in action. Creating modular applications in Java. Isbell Douglas, Hardin Mary, Underwood Joan. MARS CLIMATE ORBITER TEAM FINDS LIKELY CAUSE OF LOSS. Cervantes Humberto, Donsez Didier, Touseau Lionel. An Architecture Description Language for Dynamic Sensor-Based Applications. Solis Ignacio, Obraczka Katia. The Impact of Timing in Data Aggregation for Sensor Networks. ReferencesReferences 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 33 Questions?Questions? 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 34 The EndThe End Thank you for your attention! 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 35 Implemented TransformationsImplemented Transformations Implemented Cilia components for mediation can be combined and chained to obtain desired behaviour. 3 triggers 10 processors (aggregators, statistical ops., converter ..): Average Aggregator, Delta filter, Forward processor, Max Aggregator, Min Aggregator, Min filter, Max filter, OlderThanFilter, Sum Aggregator filter, Unit converter 6 + 1 adapters 22. 11. 2012 Jiri HARAZIM: Mediation Chain Generation in Pervasive Environments 36 SourcesSources Pics: http://www.google.cz/search?um=1&hl=cs&client=opera&rls=cs http://www.google.cz/search? um=1&hl=cs&client=opera&rls=cs&channel=suggest&biw= 1440&bih=729&tbm=isch&sa=1&q=smartphone&oq=smart phone&gs_l=img.3..0l10.23774.25655.0.26360.10.6.0.4.4. 0.130.479.5j1.6.0...0.0...1c.1.AeK0LEiyUoU http://en.wikipedia.org/wiki/Mark_Weiser