65
A Comparison of Context- A Comparison of Context- Aware Application Aware Application Development Development Infrastructures and Infrastructures and Context Context Representation Representation Dev Oliver, Nikhil Yadav Dev Oliver, Nikhil Yadav CISE Department, University CISE Department, University of Florida, Gainesville, of Florida, Gainesville, Florida, USA Florida, USA

A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Embed Size (px)

Citation preview

Page 1: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

A Comparison of Context-A Comparison of Context-Aware Application Aware Application

Development Development Infrastructures and Infrastructures and

ContextContext Representation Representation

Dev Oliver, Nikhil YadavDev Oliver, Nikhil Yadav

CISE Department, University of CISE Department, University of Florida, Gainesville, Florida, USA Florida, Gainesville, Florida, USA

Page 2: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

OutlineOutline• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and Middleware based on Application Packages and

the Kernel Runnerthe Kernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 3: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and Middleware based on Application Packages and

the Kernel Runnerthe Kernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 4: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

IntroductionIntroduction

• Numerous middleware infrastructures Numerous middleware infrastructures and prototype systems for developing and prototype systems for developing context-aware applicationscontext-aware applications

• Need for Middleware and Standards Need for Middleware and Standards for decoupling programming and for decoupling programming and application development from physical application development from physical space construction and integrationspace construction and integration

• TCP/IP, client-server models, TCP/IP, client-server models, distributed OS for networked distributed OS for networked computers. Similar concepts needed computers. Similar concepts needed for Pervasive computing environmentsfor Pervasive computing environments

Page 5: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and the Middleware based on Application Packages and the

Kernel RunnerKernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 6: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Problems and Proposed Problems and Proposed solutionssolutions• Problem: Non-scalable integrationProblem: Non-scalable integration

Low level information on sensors and actuators Low level information on sensors and actuators required.required.

Time consuming to integrate and test for conflicts.Time consuming to integrate and test for conflicts.

Solution: Self IntegrationSolution: Self IntegrationAllow automatic integration within the space; Allow automatic integration within the space; preferable to view elements as software services and preferable to view elements as software services and space as runtime environment space as runtime environment

• Problem: Closed world AssumptionProblem: Closed world AssumptionNew technologies from 3New technologies from 3rdrd Party vendors cannot be Party vendors cannot be

added that easily as technology evolves over time.added that easily as technology evolves over time.

Solution: Standard AdoptionSolution: Standard Adoption

Adoption of standards like OSGi and UPnP by Adoption of standards like OSGi and UPnP by maximum number of vendors, so addition of third party maximum number of vendors, so addition of third party elements becomes easyelements becomes easy

Page 7: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Problem: Obsolete ConceptsProblem: Obsolete ConceptsConcepts become obsolete over time…e.g. context Concepts become obsolete over time…e.g. context

awareness and service gatewaysawareness and service gateways

Solution: Semantic Exploitation and Solution: Semantic Exploitation and Intelligent Middleware designIntelligent Middleware design

Allow added services to advertise their presence Allow added services to advertise their presence and register services. Service definition + and register services. Service definition + integration are added in. Middleware for appliances integration are added in. Middleware for appliances e.g. smart plugs. Combining these, functionality can e.g. smart plugs. Combining these, functionality can develop over time. develop over time.

Page 8: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware GoalsMiddleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and the Middleware based on Application Packages and the

Kernel RunnerKernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 9: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Middleware GoalsMiddleware Goals• Presenting sensors and actuators as Presenting sensors and actuators as

software services in a runtime software services in a runtime environment (Smart space)environment (Smart space)

• Faster prototyping using service views Faster prototyping using service views and dynamic librariesand dynamic libraries

• Browsing and learning support…to help Browsing and learning support…to help in full Semantic Exploitation in full Semantic Exploitation (aggregating context for instance)(aggregating context for instance)

(Middleware Infrastructures follow next)(Middleware Infrastructures follow next)

Page 10: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and the Middleware based on Application Packages and the

Kernel RunnerKernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 11: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

The GAIA Meta-operating The GAIA Meta-operating SystemSystem

• Features Include:Features Include:

– Distributed OS/ componentsDistributed OS/ components– Decoupled communication modelDecoupled communication model– Context Registry and Query Context Registry and Query

servicesservices– Component presence detectionComponent presence detection– Browsing facilitiesBrowsing facilities– Virtual Directory Hierarchy for filesVirtual Directory Hierarchy for files– Application Partitioning among Application Partitioning among

DevicesDevices

Page 12: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

The GAIA ArchitectureThe GAIA Architecture

Page 13: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Distributed OS/ Distributed OS/ ComponentsComponents

• GAIA is based onGAIA is based on distributed distributed components (sensors and components (sensors and actuators) and applicationsactuators) and applications

• CMC responsible for managing CMC responsible for managing these i.e. loading, unloading, these i.e. loading, unloading, transferring and creating all GAIA transferring and creating all GAIA componentscomponents

Page 14: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Decoupled Communication Decoupled Communication ModelModel

• Event Manager provides this. Event Manager provides this. Based on suppliers, consumers Based on suppliers, consumers and channelsand channels

• Forwarding of supplier’s events Forwarding of supplier’s events to consumers registered with the to consumers registered with the channelchannel

• Fault tolerant: Supplier replaced Fault tolerant: Supplier replaced with replica in case of failurewith replica in case of failure

Page 15: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Context Registry and Context Registry and Querying servicesQuerying services

• Applications allowed to register and Applications allowed to register and query a particular context servicequery a particular context service

• Allows application adaptionAllows application adaption

• Context registry can be looked up by Context registry can be looked up by applications to find out what service applications to find out what service they requirethey require

Page 16: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Component Presence Component Presence DetectionDetection• Presence Service responsible for this.Presence Service responsible for this.

• Maintains updated information about active Maintains updated information about active space components i.e. devices, applications space components i.e. devices, applications and servicesand services

• Digital Entity Presence subsystem: Digital Entity Presence subsystem: applications and services send heartbeats…no applications and services send heartbeats…no heartbeat received => Entity has left the heartbeat received => Entity has left the active spaceactive space

• Physical Entity presence subsystem acts as a Physical Entity presence subsystem acts as a proxy implementing a beaconing mechanism. proxy implementing a beaconing mechanism. Open Infrastructure, can employ different Open Infrastructure, can employ different device drivers and algorithmsdevice drivers and algorithms

Page 17: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Browsing FacilitiesBrowsing Facilities

• The space repository stores all HW The space repository stores all HW and SW entity information e.g. by and SW entity information e.g. by name, type, ownername, type, owner

• Applications allowed to browse and Applications allowed to browse and retrieve an entity based on specific retrieve an entity based on specific attributesattributes

• Applications can learn about entities Applications can learn about entities entering and leaving the active entering and leaving the active space thru the presence service space thru the presence service channelschannels

Page 18: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Virtual Directory Hierarchy Virtual Directory Hierarchy for Filesfor Files• Context File system responsible for this.Context File system responsible for this.

• Users given access to context whenever they need itUsers given access to context whenever they need it

• Makes personal data available to applications; Makes personal data available to applications; organizes data to facilitate locating relevant material organizes data to facilitate locating relevant material for applications and users; retrieve data based on for applications and users; retrieve data based on user preferences or device characteristicsuser preferences or device characteristics

• CFS Aware of different types of context defined and CFS Aware of different types of context defined and allows mounting of different contexts into one main allows mounting of different contexts into one main application spaceapplication space

• Virtual Directory Hierarchy:Virtual Directory Hierarchy:e.g. e.g. /location:/RM2401/situation:/meeting/location:/RM2401/situation:/meeting

Architecture composed of mount and File serversArchitecture composed of mount and File servers

Page 19: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Application Partitioning Application Partitioning among devicesamong devices• Application framework responsible Application framework responsible

for thisfor this

• Allows users to adapt how to Allows users to adapt how to input/output data to and from the input/output data to and from the application.application.

• lets users construct, run or adapt lets users construct, run or adapt existing applications to active existing applications to active spaces.spaces.

Page 20: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and the Middleware based on Application Packages and the

Kernel RunnerKernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 21: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Service Oriented Context-Service Oriented Context-Aware Middleware (SOCAM)Aware Middleware (SOCAM)

• Features Include:Features Include:

– OSGi based; uses JVM => platform OSGi based; uses JVM => platform independenceindependence

– Context Registry and Query servicesContext Registry and Query services– Service Location (component detection)Service Location (component detection)– Ontology based Context reasoningOntology based Context reasoning– Support for multiple home networking Support for multiple home networking

technologiestechnologies – Hosting of Multiple services from Hosting of Multiple services from

different providers on a single gateway different providers on a single gateway platformplatform

– Various levels of system security, digital Various levels of system security, digital signing of downloaded services and signing of downloaded services and object access control.object access control.

Page 22: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

SOCAM ArchitectureSOCAM Architecture

Page 23: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

OSGi basedOSGi based

• SOCAM is proposed on top of service SOCAM is proposed on top of service oriented OSGi open standard. oriented OSGi open standard.

• OSGi defines a lightweight framework for OSGi defines a lightweight framework for delivering and executing service-oriented delivering and executing service-oriented applications. Management functionalities applications. Management functionalities include: installing, activating, include: installing, activating, deactivating, updating and removing deactivating, updating and removing services.services.

• Can provide a robust and potentially Can provide a robust and potentially interoperable infrastructure for building, interoperable infrastructure for building, provisioning and managing context-aware provisioning and managing context-aware services in smart homes and beyond.services in smart homes and beyond.

Page 24: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Context Registry and Query Context Registry and Query servicesservices

• SLS, allows advertisement of services by CP and CI for SLS, allows advertisement of services by CP and CI for easy location easy location

• Context Providers registers with SLS to be discovered by Context Providers registers with SLS to be discovered by others. They can be either external or internal based on others. They can be either external or internal based on where context is obtained from where context is obtained from

• Context Interpreters are composed of a context reasoner Context Interpreters are composed of a context reasoner and a context knowledge base. and a context knowledge base. – Reasoner uses preloaded inference rules etc. to make Reasoner uses preloaded inference rules etc. to make

decisions.decisions.

– Context Knowledge base uses Tbox, Abox, predefined Context Knowledge base uses Tbox, Abox, predefined instances loaded during system initiation and sensed instances loaded during system initiation and sensed context instances loaded during runtime. Event triggering context instances loaded during runtime. Event triggering mechanism used to update particular context instances.mechanism used to update particular context instances.

Page 25: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Context-aware services: Applications Context-aware services: Applications using different levels of context using different levels of context information, adapting their behavior information, adapting their behavior according to the current context. according to the current context.

• Queries SLS to find context it requires. Queries SLS to find context it requires. A common way of developing context-A common way of developing context-aware applications is to specify actions aware applications is to specify actions in response to context changes. in response to context changes. Application developers can specify Application developers can specify rules and specify method to invoke rules and specify method to invoke when the condition becomes true.when the condition becomes true.

Page 26: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Service Location Service Location (component detection)(component detection)

• SLS...wide area discovery of context providers is SLS...wide area discovery of context providers is allowed for. Tracks and adapts to changes induced allowed for. Tracks and adapts to changes induced when adding/removing sensors or reconfiguring when adding/removing sensors or reconfiguring contexts. contexts.

• Multi. matching mechanism allowing advertisement Multi. matching mechanism allowing advertisement of context in various forms. (locatedIn John ?x) is a of context in various forms. (locatedIn John ?x) is a query example. query example.

• The service will first load the context ontologies The service will first load the context ontologies stored in the database and the context instances stored in the database and the context instances advertised by different context providers, and then advertised by different context providers, and then apply semantic matching to find out which context apply semantic matching to find out which context provider provides this information. If a match is provider provides this information. If a match is found, it sends the application the reference to the found, it sends the application the reference to the CP.CP.

Page 27: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Ontology based Context Ontology based Context reasoningreasoning

• Supports ontology and rule based Supports ontology and rule based reasoning. The OWL reasoning system reasoning. The OWL reasoning system supports constructs for describing supports constructs for describing properties and classes, including properties and classes, including relationships between classes. RDF relationships between classes. RDF schema rules required to perform RDF schema rules required to perform RDF schema reasoning- for example. User schema reasoning- for example. User defined rule-based reasoning. Forward defined rule-based reasoning. Forward + backward chaining + hybrid execution + backward chaining + hybrid execution mode to perform reasoning is used.mode to perform reasoning is used.

Page 28: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Support for multiple home Support for multiple home networking technologiesnetworking technologies

• OSGi compliant residential OSGi compliant residential gatewaygateway, enabling and managing , enabling and managing communications to and from communications to and from various local networks.various local networks.

• Java embedded server connects Java embedded server connects both wide-area and local both wide-area and local networks. networks.

Page 29: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Hosting of Multiple services Hosting of Multiple services from different providers on from different providers on a single gateway platforma single gateway platform

• Various types of networked Various types of networked devices, electronic appliances and devices, electronic appliances and sensors can be attached to the sensors can be attached to the residential gateway via different residential gateway via different home networking technologies. home networking technologies. Hosts’ context aware services are Hosts’ context aware services are downloaded from various context-downloaded from various context-aware service providers.aware service providers.

Page 30: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Various levels of system security, Various levels of system security, digital signing of downloaded digital signing of downloaded services and object access control.services and object access control.• The gateway operator manages and The gateway operator manages and

maintains residential gateways and their maintains residential gateways and their services.services.

• Its functionalities include monitoring the Its functionalities include monitoring the gateway to detect malfunctions and gateway to detect malfunctions and security attacks and installing services to security attacks and installing services to and from gateway. Service aggregator and from gateway. Service aggregator and protection against conflicts. and protection against conflicts.

• Developers design a context aware Developers design a context aware application as a set of services and application as a set of services and combine them into bundles that can be combine them into bundles that can be downloaded to the gateway downloaded to the gateway

Page 31: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• SW stack embedded in the OSGi compliant SW stack embedded in the OSGi compliant residential gateway. residential gateway.

• Contains Service-hosting environ + common Contains Service-hosting environ + common APIs to develop application bundles. SOCAM APIs to develop application bundles. SOCAM Middleware built on top of this. Middleware built on top of this.

• Each SOCAM component can be constructed Each SOCAM component can be constructed as an independent bundle i.e. SLS bundle. as an independent bundle i.e. SLS bundle. OSGi adopts Java 2 security modelOSGi adopts Java 2 security model

Page 32: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Context-Aware Middleware Utilizing

Asynchronous CommunicationAsynchronous Communication – Middleware based on Application Packages and the Middleware based on Application Packages and the

Kernel RunnerKernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 33: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Context-Aware Middleware Context-Aware Middleware Utilizing Asynchronous Utilizing Asynchronous CommunicationCommunication• Features include:Features include:

– OSGI basedOSGI based– Uses asynchronous communicationUses asynchronous communication– Proactive and reactive context Proactive and reactive context

introspectionintrospection– Tracking and selection of resourcesTracking and selection of resources– Introspection of the local systemIntrospection of the local system– Introspection of the network neighborhoodIntrospection of the network neighborhood

Page 34: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Asynchronous Asynchronous CommunicationCommunication

• Messages stored temporarily on certain Messages stored temporarily on certain hosts while being routed hosts while being routed – Forwarded later when circumstances permitForwarded later when circumstances permit

• Any message sent in the network should be Any message sent in the network should be maintained as long as possible in a local maintained as long as possible in a local cache by as many devices as possible cache by as many devices as possible – So it can remain available for those devices that So it can remain available for those devices that

could not receive it at the time it was originally could not receive it at the time it was originally sentsent

• Implemented in Java as an OSGI service Implemented in Java as an OSGI service

Page 35: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Asynchronous Asynchronous CommunicationCommunication

• Messages are sent over the network Messages are sent over the network either as serialized Java objects or as either as serialized Java objects or as formatted XML formatted XML

• Message dissemination is performed Message dissemination is performed by broadcasting UDP data grams by broadcasting UDP data grams

Page 36: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Proactive and reactive context Proactive and reactive context introspectionintrospection

• Achieved by abstracting resources in Achieved by abstracting resources in network via object oriented modelnetwork via object oriented model

• Three abstractions made:Three abstractions made:– ResourcesResources– Resource descriptorsResource descriptors– Resource observation reports Resource observation reports

Page 37: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Proactive and reactive context Proactive and reactive context introspectionintrospection

• Resource object implements Resource object implements functionalities to use and control the functionalities to use and control the resource it defines resource it defines

• Resource descriptor provides static Resource descriptor provides static information about the resource information about the resource

• Resource observation report gives Resource observation report gives information about the current state information about the current state of the resource of the resource

Page 38: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Object-oriented modeling Object-oriented modeling of resourcesof resources

Page 39: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Tracking and selection of Tracking and selection of resourcesresources• Resources can appear and disappear frequently in Resources can appear and disappear frequently in

the environment the environment – necessary to have a means by which to keep track of necessary to have a means by which to keep track of

currently available resources currently available resources

• Accomplished through resource objects and a Accomplished through resource objects and a resource registerresource register

• All resources are designed to register a description All resources are designed to register a description of themselves with the register at creation timeof themselves with the register at creation time

• Possible for an adaptive service deployed on a Possible for an adaptive service deployed on a mobile device to obtain information about its local mobile device to obtain information about its local execution context by polling the register execution context by polling the register periodically periodically

Page 40: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Tracking and selection of Tracking and selection of resourcesresources• Occasionally necessary to focus only on Occasionally necessary to focus only on

specific resources in the system at certain specific resources in the system at certain timestimes– E.g. when a given service is awaiting the E.g. when a given service is awaiting the

appearance of another service on the networkappearance of another service on the network– Requires the middleware to select resources Requires the middleware to select resources

based on pre-defined criteria based on pre-defined criteria • Achieved by resource patternAchieved by resource pattern

– Implements a function Implements a function isMatchedBy()isMatchedBy() that takes that takes a resource descriptor object as a parameter a resource descriptor object as a parameter and returns a boolean indicating whether this and returns a boolean indicating whether this object satisfies the predefined criteria or not object satisfies the predefined criteria or not

Page 41: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Introspection of the local Introspection of the local systemsystem

• Services should have information Services should have information about the local devices on which about the local devices on which they are running they are running

• Achieved by obtaining a description Achieved by obtaining a description of the local resources from the of the local resources from the resource register and by monitoring resource register and by monitoring the local resourcesthe local resources

• Resources are monitored both Resources are monitored both synchronously and asynchronously synchronously and asynchronously

Page 42: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Introspection of the local Introspection of the local systemsystem

• Synchronous monitoring refers to the Synchronous monitoring refers to the implementation of a callback mechanism in implementation of a callback mechanism in resource objects resource objects – Each resource can admit several listenersEach resource can admit several listeners– When a variation occurs the resource can detect When a variation occurs the resource can detect

it based on the registered listenersit based on the registered listeners

• Unfortunately, all resources cannot be Unfortunately, all resources cannot be monitored using this synchronous approachmonitored using this synchronous approach– E.g. access to the CPU is not achieved by calling E.g. access to the CPU is not achieved by calling

methods directly methods directly

Page 43: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Introspection of the local Introspection of the local systemsystem

• Asynchronous approach Asynchronous approach deals with CPU deals with CPU resources such as system memory and resources such as system memory and network interfaces network interfaces

• Achieved by checking the state of a Achieved by checking the state of a given resource explicitly every now and given resource explicitly every now and then in such a way that the time of the then in such a way that the time of the observation does not coincide with the observation does not coincide with the time of an attempt in resource time of an attempt in resource utilization utilization

Page 44: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Introspection of the network Introspection of the network neighborhoodneighborhood

• Discover what resources are available in Discover what resources are available in the physical environment the physical environment

• More complicated mechanism by which to More complicated mechanism by which to automatically discover available resourcesautomatically discover available resources

• E.g. discovering close wireless networks, E.g. discovering close wireless networks, configuring the wireless communication configuring the wireless communication interface of mobile devices automatically interface of mobile devices automatically and identifying what hosts can be reached and identifying what hosts can be reached on these networks on these networks

Page 45: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Introspection of the network Introspection of the network neighborhoodneighborhood

• In current implementation of this middleware, In current implementation of this middleware, this service relies on the system commands of this service relies on the system commands of the Linux operating system (wireless tools)the Linux operating system (wireless tools)

• Asynchronous communication is used to Asynchronous communication is used to discover neighboring hosts and remote discover neighboring hosts and remote services services

• Discovery of resources can be made:Discovery of resources can be made:– Proactively by sending requests in the networkProactively by sending requests in the network– Reactively by analyzing unsolicited advertisements Reactively by analyzing unsolicited advertisements

sent by other devices in the network sent by other devices in the network

Page 46: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Introspection of the network Introspection of the network neighborhoodneighborhood

• Discovery of remote services:Discovery of remote services:– Proactively Proactively

• Middleware sends XML document containing service Middleware sends XML document containing service request described by a resource patternrequest described by a resource pattern

• Service providers who have matching services whose Service providers who have matching services whose descriptor fits the pattern that the request specifies descriptor fits the pattern that the request specifies respond with an XML document containing a respond with an XML document containing a description of the services they can offerdescription of the services they can offer

– ReactivelyReactively• Service providers send unsolicited advertisements or Service providers send unsolicited advertisements or

service descriptors. service descriptors.

Page 47: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and Middleware based on Application Packages and

the Kernel Runnerthe Kernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 48: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

A Middleware based on A Middleware based on Application Packages and Application Packages and the Kernel Runnerthe Kernel Runner • Features include:Features include:

– Kernel RunnerKernel Runner– Application PackagesApplication Packages– Several useful components for providing Several useful components for providing

common functionalitiescommon functionalities

Page 49: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Kernel RunnerKernel Runner

• Handles the mobility and adaptation Handles the mobility and adaptation of applications in the system of applications in the system

• Enables loading, execution, updating Enables loading, execution, updating and stopping of applications or and stopping of applications or componentscomponents

• Platform-dependantPlatform-dependant– Components executed in the kernel Components executed in the kernel

runner are also platform-dependant runner are also platform-dependant

Page 50: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Kernel Runner ArchitectureKernel Runner Architecture

Page 51: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Kernel RunnerKernel Runner

• Comprised of 3 elements: Comprised of 3 elements: – InterfaceInterface

•Used to link with other kernel runners or pre-Used to link with other kernel runners or pre-existing applications in the network existing applications in the network

– Applications cacheApplications cache•Used to store the applications to be Used to store the applications to be

executed executed

– Execution engineExecution engine•Responsible for running previously cached Responsible for running previously cached

programs programs

Page 52: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Application PackagesApplication Packages

• Analogous to OSGI bundlesAnalogous to OSGI bundles• Facilitates distribution of the applications through Facilitates distribution of the applications through

different nodes different nodes • XML file containingXML file containing

– Configuration information Configuration information – Application executablesApplication executables

• Stores required files in a serialized format as part Stores required files in a serialized format as part of the XML file parametersof the XML file parameters

• Benefit is that all running files needed can be Benefit is that all running files needed can be sent in this XML formatted file so that they can be sent in this XML formatted file so that they can be extracted and run in different kernel runners extracted and run in different kernel runners

Page 53: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Several useful components for Several useful components for providing common providing common functionalitiesfunctionalities• Can be thought of as glue components that Can be thought of as glue components that

allow the whole system to come togetherallow the whole system to come together

• Application repositoryApplication repository– Stores application information and classifies it Stores application information and classifies it

based on the platform it has been developed for based on the platform it has been developed for

• Configuration repository Configuration repository – Similar to the application repository in that it holds Similar to the application repository in that it holds

configuration information in XML file format configuration information in XML file format

Page 54: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Several useful components for Several useful components for providing common providing common functionalitiesfunctionalities• Resource repositoryResource repository

– Holds information about music, videos, etc Holds information about music, videos, etc – This information can be asked to be served This information can be asked to be served

online from an external componentonline from an external component

• Context sensorContext sensor– Used by the system to inform of the state of Used by the system to inform of the state of

the environment and any changes that occurthe environment and any changes that occur– Information such as location, temperature, Information such as location, temperature,

alarm, etc is notified to the subscribed alarm, etc is notified to the subscribed components components

Page 55: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Several useful components for Several useful components for providing common providing common functionalitiesfunctionalities• Mobility and configuration managerMobility and configuration manager

– Responsible for the different kernel runners on Responsible for the different kernel runners on the network the network

– Has the ability to move, stop or launch Has the ability to move, stop or launch applications in the kernel runnerapplications in the kernel runner

• Context managerContext manager– When any context sensor notifies a change, the When any context sensor notifies a change, the

context manager uses its inference system to context manager uses its inference system to decide what action it must performdecide what action it must perform

– Inference ranges from simple if then statements Inference ranges from simple if then statements to more deductive mechanisms based on to more deductive mechanisms based on probabilities or on artificial intelligence probabilities or on artificial intelligence techniques techniques

Page 56: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and the Middleware based on Application Packages and the

Kernel RunnerKernel Runner

• ComparisonsComparisons

• ConclusionsConclusions

Page 57: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Middleware Infrastructures Middleware Infrastructures Comparison Comparison

Page 58: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Middleware Infrastructures Middleware Infrastructures ComparisonComparison• One disadvantage of the application package One disadvantage of the application package

approach is that it is not machine independent approach is that it is not machine independent – It is anchored on a machine specific kernel runner It is anchored on a machine specific kernel runner

responsible for supporting mobility and adaptation of responsible for supporting mobility and adaptation of applications in the systemapplications in the system

• One advantage that the application package One advantage that the application package approach has over the OSGI based frameworks is approach has over the OSGI based frameworks is that the OSGI mechanism does not ensure the that the OSGI mechanism does not ensure the correct running of difference bundles while this correct running of difference bundles while this approach doesapproach does

• If dependencies between bundles fail, the OSGI If dependencies between bundles fail, the OSGI bundles cannot run but application packages will bundles cannot run but application packages will runrun

Page 59: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Middleware Infrastructures Middleware Infrastructures ComparisonComparison• Bundles in the OSGI framework must be Bundles in the OSGI framework must be

launched in a specific order if there are launched in a specific order if there are dependencies dependencies – Application package can always be started and Application package can always be started and

will begin to work correctly as soon as a service will begin to work correctly as soon as a service on which it relies appears in the network on which it relies appears in the network

• GAIA and application packages approach GAIA and application packages approach are distributed, OSGI approaches are are distributed, OSGI approaches are generally notgenerally not– There can exists a limitation in a distributed There can exists a limitation in a distributed

environment in the sense that not all devices environment in the sense that not all devices are capable of supporting the JVM are capable of supporting the JVM

Page 60: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Middleware Infrastructures Middleware Infrastructures ComparisonComparison• OSGI approaches have advantage with platform OSGI approaches have advantage with platform

independence based on the fact that they are independence based on the fact that they are based on Javabased on Java

• Less overhead for developers in developing Less overhead for developers in developing bundles in OSGI approachesbundles in OSGI approaches

• Many standard component interfaces for common Many standard component interfaces for common functions like HTTP servers, configuration, functions like HTTP servers, configuration, logging, security, user administration, XML are logging, security, user administration, XML are available and well-tested in OSGI approachesavailable and well-tested in OSGI approaches

• OSGI approaches provide the standardized OSGI approaches provide the standardized primitives that allow applications to be primitives that allow applications to be constructed from small, reusable and constructed from small, reusable and collaborative components collaborative components

Page 61: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

Middleware Infrastructures Middleware Infrastructures ComparisonComparison• GAIA is machine specific unlike OSGI approachesGAIA is machine specific unlike OSGI approaches• GAIA uses a config file to load devices at boot GAIA uses a config file to load devices at boot

time, so devices cannot be discovered time, so devices cannot be discovered automaticallyautomatically

• OSGI based approaches present richer ways of OSGI based approaches present richer ways of reasoning context, GAIA is more limited reasoning context, GAIA is more limited

• GAIA is based on distributed OS principles, OSGI GAIA is based on distributed OS principles, OSGI components usually reside on a single platform components usually reside on a single platform

• Context information is represented as directories Context information is represented as directories in GAIA, while it is represented as software in GAIA, while it is represented as software bundles in OSGI based approachesbundles in OSGI based approaches

Page 62: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

• Introduction Introduction

• Problems and proposed solutions in Pervasive Problems and proposed solutions in Pervasive Computing InfrastructuresComputing Infrastructures

• Middleware Goals Middleware Goals

• Middleware ArchitecturesMiddleware Architectures– GAIA Meta-operating SystemGAIA Meta-operating System– Service-oriented Context Aware Middleware Service-oriented Context Aware Middleware

(SOCAM) (SOCAM) – Context-Aware Middleware Utilizing Asynchronous Context-Aware Middleware Utilizing Asynchronous

CommunicationCommunication – Middleware based on Application Packages and Middleware based on Application Packages and

the Kernel Runnerthe Kernel Runner

• Comparisons Comparisons

• ConclusionsConclusions

Page 63: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

ConclusionsConclusions

• We presented four context aware middleware We presented four context aware middleware applications that assist in the development of applications that assist in the development of pervasive applications and servicespervasive applications and services

• We found that the best middleware is dependent We found that the best middleware is dependent on the application it is being used for on the application it is being used for

• OSGI-based middleware boasts less overhead for OSGI-based middleware boasts less overhead for developers in implementing bundles and platform developers in implementing bundles and platform independence based on the fact that OSGI is independence based on the fact that OSGI is based on Javabased on Java– Good option for pervasive spaces where all actuators Good option for pervasive spaces where all actuators

and sensors can be connected to a single platform and sensors can be connected to a single platform running the OSGI framework running the OSGI framework

Page 64: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

ConclusionsConclusions

• The two OSGI based frameworks that we analyzed The two OSGI based frameworks that we analyzed were not distributed and this turned out to be a were not distributed and this turned out to be a limiting factorlimiting factor

• GAIA and the middleware based on application GAIA and the middleware based on application packages and the kernel runner turned out to be packages and the kernel runner turned out to be better in terms of portability and their ability to better in terms of portability and their ability to exist in distributed environments exist in distributed environments

– Good options if sensors and actuators existing in different Good options if sensors and actuators existing in different networks need to communicate with each other networks need to communicate with each other

– The drawback here is the development overhead that has The drawback here is the development overhead that has to take place to get systems like these off the ground to take place to get systems like these off the ground

Page 65: A Comparison of Context- Aware Application Development Infrastructures and Context Representation Dev Oliver, Nikhil Yadav CISE Department, University

References:References:• 1. Sumi Helal: Standards and Emerging Technologies – Programming 1. Sumi Helal: Standards and Emerging Technologies – Programming

Pervasive Spaces, IEEE Pervasive Computing Magazine, 2005Pervasive Spaces, IEEE Pervasive Computing Magazine, 2005

• 2. Gu, T. Pung, H.K. Zhang, D.Q: Towards an OSGi-based 2. Gu, T. Pung, H.K. Zhang, D.Q: Towards an OSGi-based infrastructure for context-aware applications, Pervasive Computing infrastructure for context-aware applications, Pervasive Computing IEEE Volume 2, Issue 3, July-Sept. 2003 Page(s):72 - 79.IEEE Volume 2, Issue 3, July-Sept. 2003 Page(s):72 - 79.

• 3. Roman, M. Hess, C. Cerqueira, R. Ranganathan, A. Campbell, R.H.; 3. Roman, M. Hess, C. Cerqueira, R. Ranganathan, A. Campbell, R.H.; Nahrstedt, K.: A Middleware Infrastructure for Active Spaces, Nahrstedt, K.: A Middleware Infrastructure for Active Spaces, Pervasive Computing, IEEE Volume 1, Issue 4, Oct.-Dec. 2002 Pervasive Computing, IEEE Volume 1, Issue 4, Oct.-Dec. 2002 Page(s):74 – 83Page(s):74 – 83

• 4. Nicolas Le Sommer, Frédéric Guidec, Hervé Roussain. A context-4. Nicolas Le Sommer, Frédéric Guidec, Hervé Roussain. A context-aware middleware platform for autonomous application services in aware middleware platform for autonomous application services in dynamic wireless networks.dynamic wireless networks. ACM International Conference Proceeding ACM International Conference Proceeding Series; Vol. 138. Proceedings of the first international conference on Series; Vol. 138. Proceedings of the first international conference on Integrated internet ad hoc and sensor networks (InterSense). 2006.Integrated internet ad hoc and sensor networks (InterSense). 2006.

• 5. Aitor Uribarren, Jorge Parra, J. P. Uribe, Maider Zamalloa,  Kepa 5. Aitor Uribarren, Jorge Parra, J. P. Uribe, Maider Zamalloa,  Kepa Makibar. Middleware for distributed services and mobile applications.Makibar. Middleware for distributed services and mobile applications. ACM International Conference Proceeding Series; Vol. 138. ACM International Conference Proceeding Series; Vol. 138. Proceedings of the first international conference on Integrated Proceedings of the first international conference on Integrated internet ad hoc and sensor networks (InterSense). 2006.internet ad hoc and sensor networks (InterSense). 2006.