Software Engineering Pervasive Computing - University of Illinois ...

sandwichclippersMobile - Wireless

Nov 24, 2013 (3 years and 10 months ago)

52 views


Software Engineering

for

Pervasive Computing



Roy Campbell

OUTLINE


Background


Challenges


Ideas


Publications


Solutions/Projects


What does this mean?


Ubiquitous


Pervasive

Semantics


Ubiquitous:
Existing

or

being

everywhere
,
or

in

all

places
,
at

the

same

time
;
omnipresent
.


Pervasive.
per
-

through +
vadere

to go
Tending

to

pervade
,
or

having

power

to

spread

throughout
;
of

a

pervading

quality
.


Pervasive is a stepping stone to ubiquity.


Does a pervasive technology become
ubiquitous when its taken for granted?

Post Desktop


Active World


Spectrum of computation and communication
devices.


Seamless augmentation of human thought
and activity.


Enhance users behavioral context in an
automated mirror, virtual or mixed world.

Benefits


The translation of information to/from
physical properties.


The ability to transform data.


The collaborative computational environment
that results from embedding devices in a
network.

Rapid Convergence


Distributed


Networked


Multimedia


Mobile


Embedded computing


Sensing


Robotics


Multimedia


Wireless communications


The Internet

Contents

Software Engineering for Pervasive Systems


State of the Art


Problems


Difficulties


Approaches



Conferences and Workshops


IEEE Pervasive Computing


Personal and Ubiquitous
Computing journal


Embedded And Ubiquitous
Computing


Pervasive and Mobile
Computing (Elsevier)


Journal of Ubiquitous
Computing and Intelligence


International Journal of
Pervasive Computing and
Communications



LoCA


Pervasive


Percom


Ubicom


Internet of Things


Cyber
-
Physical


Ubisys


Persys


Perware


Ubisys

Roger Lea


Common abstractions, models toward interoperability and
portability, supported by systems and tools for porting or
adapting applications between ubiquitous environments.


Use of new and emerging middleware and software
engineering approaches such as service oriented,
decentralized, and peer to peer architectures in
ubicomp

systems.


Wide scale inter
-
domain
ubicomp

deployment and
experiences of deployed
ubicomp

systems infrastructure.


Techniques and benchmarks for the effective evaluation of
ubicomp

systems.


State of Art

Ubisys Examples


iRoom/iROS

Armando Fox

Terry Winograd

Event heap and Patch Panel (follow on work)


Context Toolkit

Anind Dey

Context awareness
and context widgets


Gaia Active Spaces


House
-
n


MIT Intelligent Room





Lancaster Guide



Example tour guide, actual
deployment


Plan B



Untyped systems, everything is a file
Messer context and entity directory structure


EasyLiving


Video




Equip Component Toolkit



component toolkit
on tuple space.


PlayerStage


Robotics middleware


Cooltown HP Linking entities using web links
Barton




Java Context Aware Framework (JCAF)



Multi User Publishing Environment (MUPE)

open source models the world as a MUD.


Smartits, Motes





OpenWRT




Instant Messaging (e.g.
Jabber
)


Pervasive
event notification with context (presence)


SoCAM


use of OSGi and RDF reasoning in
smart spaces




CoBRA mantic web in smart spaces


SenseTable Table top


Federated Identities


OpenID or sXIP, Yadis


Applications


Healthcare


Aging


Home Entertainment


Travel


Social Computing


Environmental Monitoring


Sports


Scientific Collaborative
Observatories


Cyber
-
Physical Computing


Internet of things


Communication


Education


Commerce


Supply chains


RF
-
ID tracking
authentication


Cars/transportations


Exertion Interfaces


Previous Work


SECUC 2006.
Workshop on Software
Engineering Challenges for Ubiquitous
Computing,

June 1
-
2, 2006, Lancaster, UK.



SEWPC 2000.
Workshop on Software
Engineering for Wearable and Pervasive
Computing,
Limerick, Ireland, 2000.


Question?


What is the biggest challenge in software
engineering pervasive systems?

Issues


Disappearing computer


Everyware


Ambient


Who is observing who


Ethics/Policies/Privacy


Seamless


Get the computer out
into the real world


Context aware


Optimizing for the Human


Scalability


The Butterfly effect


Designing for Sustainability


Avoiding Evolutionary
Deadends


Tightly
-
coupled highly
-
optimized supply chains


Improving dependability
can enable catastrophes


Unintended Interaction


Systems of systems


Question?


What is your favorite software engineering
technique for pervasive computing?

Techniques


Event Notification, Event Heap


Distributed Objects


Web Browser/Server


Sensors


Service
-
Oriented Architectures


Games


Workflows


UK Grand Challenges


Agent Technologies


Analyzing movement in a sentient environment



Automating the highway



Business Processes


Model
-
checking for ubiquity



Rigorous protocol design



Sensor Networks


Ubiquitous computing and the urban
environment



Ubiquitous healthcare



Challenges for Ubiquitous Computing


How do we ensure that ubiquitous computing
systems fulfill their required and intended
purpose?


How do we ensure that we can trust these
systems to perform as intended?


How do we produce ubiquitous computing
systems efficiently and economically?


SECOAS

I.W.Marshall et al.


Goal: Sensor network to monitor sedimentation processes
at small scales in the area of Scroby Sands just off the coast
at Great Yarmouth, Norfolk


Proposition: embedded AI is a good solution to enabling
adaptation to failure and power management


Result: none of the tests allowed an exhaustive
characterization of the software performance since the rate
of failure of the nodes was significantly higher than
expected


Difficulties:


hardware /software co
-
design of extended systems


full understanding of the limitations and failure mechanisms of
the hardware and software
---

e.g. clocks





Automobile Industry

Ross Shannon et al.


Problem: Features deployed in car


Solution:


Discovery


Adaptive behavior


Approach: Aspect
-
Oriented Programming

Problems of Programming


Ambient Oriented Programming: Language Support to
Program the Disappearing Computer


Volatile Connections


Ambient Resources


Autonomous Devices


Natural Concurrency


Classless Object Models


self sufficiency


Non
-
Blocking Communication Primitives


Reified Communication Traces


Acquaintance discovery mechanism


Resource Challenged Programming





Context
-
Aware Error Recovery

Renato Cerqueira


Problems:


Contextual Errors


Implications of Contextual Changes on Error
Recovery


Asynchrony


Openness Issues


Challenges:


Context
-
Aware Exception Handling


Context
-
Awareness


Replication Techniques



Formal Models

Alexander Romanovsky


Ensuring interoperability of independently developed
components in formal construction of ubiquitous
systems


Design and formal modeling of advanced mechanisms
for tolerating faults typical for ubiquitous systems


Development of application
-
level fault tolerance
techniques, such as flexible open exception handling
mechanisms suitable for the open asynchronous and
anonymous systems


Formal modeling and development of resilient context
-
aware ubiquitous systems

Feature Interactions

Tope Omitola


Limited storage, processing, display and battery power capabilities


Open, i.e. continual entry, exit, and re
-
entry of devices and applications
from disparate sources


The resources vary in their availability, their quality, and their reliability


The devices and resources aware of their context, including their location,
and their relationships with the wider world (both real and virtual)


Applications will be built by dynamically composing disparate sub
-
systems
together


Interact to provide overall system behavior, …shared access to resources


Creation of new applications and codes in the form of rules


Very high potential of feature interactions and unexplored consequences.


Policies and rules

The Self
-
Adaptation Problem in Software Specifications

Klaus Schmid


Adaptability


Task


User


Physical/Environment


Function


Direction


Corrective


Enhancing


Contextual


Variability modeling


Goal
-
modeling


Model
-
Driven Architecture
(MDA)


Platform
-
Specific Model (PSM)



At Home with Ubiquitous Computing
W. Keith Edwards Rebecca E. Grinter


The "Accidentally"
Smart Home



Impromptu
Interoperability


No Systems
Administrator







Designing for Domestic Use



Social Implications of Aware
Home Technologies


Reliability


Inference in the Presence of
Ambiguity

Gaia Intuition

1.
Build infrastructure from off
-
the
-
shelf distributed
object system components.

2.
Create independent interacting subsystems for
location, naming, authentication, authorization,
events, context awareness, data

3.
Make system programmable at multiple levels of
abstraction

4.
Manage physical and virtual resources


OS
-
like
behavior


Gaia’s Major Contributions to Pervasive
Computing


evolution


Gaia offers autonomic rapid prototyping


on
-
line semantic model


Gaia has ontologies and
associated logics


distributed coordination protocols


Gaia has extended
MVC, publish/subscribe, sessions, authentication, access
control


context
-
sensitive data and action model


Gaia has
context sensing and context
-
based decision making


sessions and programming models


Problems Encountered
-

Programming


Reliable distributed mobile programming of
applications in uncertain contexts with error
prone devices and failing activities


Solutions


Proactive (
Anand Ranganathon
)


Reactive (
Chetan Shankar
)

Pervasive Programming Models


Proactive programming model using goal
-
oriented approach


Planning technique using tasks


User
-
oriented


Reactive programming model using imperative
approach


State
-
machine technique using policies


Administrator
-
oriented


Models complement each other

Planning
-
based Programming


A task is a set of actions or a workflow performed
collaboratively by humans and the pervasive system to
achieve a goal



Examples in a smart conference room


Displaying slideshows, collaborating with others, migrating
applications, playing music



Task programs written at a high level


Run in different environments


Written in C++ or Lua (a scripting language)


High
-
level, self
-
configuring tasks


Parameters of task influence behavior and enable self
-
configuration


May be devices, services, applications, algorithms or strategies


Allow task execution to be flexible and adaptive



In our autonomic framework


Task programs explicitly specify the parameters that can be configured
in an XML file


Semantic Discovery process for finding the space of possible values of
a parameter


Multi
-
dimensional utility function for choosing the optimal value of
the parameter

Start

Obtain Parameters:

file
-
name, #inputs, #outputs


Obtain Parameters:

Devices and Components to

use for inputs & outputs

Is there

already a

slideshow app

running?

Obtain Parameter :

Reconfigure

existing app?

Start different

components of app

Reconfigure app

Stop

Obtain Parameter :
lights

Dim lights

Yes

No

Reconfigure

Start new
app

Slideshow Task in a Smart Conference
Room

Task Structure


Consists of a number of sub
-
tasks or activities that
have been composed together in a certain control
flow.

Task

Parameter



Obtaining Activities

State


Gathering

Activities

World


Altering

Activities

User Interface

Discovery

Service

Context and

State Services

Devices,

Services,

Applications

Query End
-
User

Infer
Automatically

Query

Invoke methods to
change state

End
-
User Performing Tasks


Each environment has a set of parameterized tasks
developed for it


End
-
User accesses a GUI where he can choose the task
he wants to perform and configure it


GUI also provides feedback regarding task execution


The GUI can run on his laptop or on a tablet PC or on a
fixed public display in the Active Space

Policy
-
based Programming


Provides a programming model for system
administration and management using
obligation policies


Obligation policies specify actions entities
must
or
must not
do


Differs from authorization policies that specify
actions entities
can
or
cannot
do


Chetan

Shankar

and Roy Campbell, "A Policy
-
based Management Framework for
Pervasive Systems using Axiomatized Rule Actions",
Fourth IEEE International
Symposium on Network Computing and Applications (IEEE NCA05)
, Cambridge, MA,
July 2005.

Imperative
Rules

Management approach using imperative specification of situation
-
action
pairs as rules


Event
-
Condition
-
Action (ECA) rule framework


“When person enters a pervasive system (
event
), if person is a guest user
(
condition
), request authentication (
action
)”


“When a device leaves active space, unmount device file system”



A typical policy :

R
1
: on (r1, ObjectEnter (Person p))


if (p.role == “guest”)


do (startApp(“Authentication”));


R
2
: on (r2, ObjectExit (Device d))


if (true)


do (unmountFileSystem(d));


Specification
-
enhanced Policies



ECPAP rule framework extends ECA rule
framework with pre
-

and post
-
conditions of
actions


Enables complex reasoning for conflicts, cycles
and concurrent rule enforcement


Provides an exception model for policies based on
exception events


Facilitates policy design for hierarchical systems
(Super Spaces)


Specification
-
enhanced Policies



Semantics of ECPAP rules


occ(e)


c


p

→ exec(a)


exec(a) →

p’


occ(e): is occurrence of event e


C: condition


P: precondition


Exec(a): initiation of execution of action a

p’
eventually p’ is satisfied

Example Policy


Policies use ECPAP rules


R
2

: on (r2, ObjectEnter (Person p))


if (p.role == “guest”)


{statusApp(“Authentication”, not_running}


do (startApp(“Authentication”));


{statusApp(“Authentication”, running}


Event

Condition

Pre
-
Cond

Action

Post
-
Cond

Hoare Specification provided by action developer
stored in library

Obligation specification written by policy developer


Code written by action developer

Exception Model for Policies


When actions fail, the policy abstraction requires an exception
model


Post
-
conditions in ECPAP rules detect action failure


On failure, exception events containing policy enforcement
context are generated:


Rule identifier


Event


Event parameters


Example.

statusApp(App, running)

is false


AppStartFailed(App a, RuleContext rc)

where rc.id = “r2”, rc.event = “ObjectEnter”, rc.arg1 = p

Management System Architecture












Policy is compiled and loaded into management system


Management system subscribes to all rule events


Policy rules are triggered on event reception

Policy Enforcement System

Prolog Engine

Policy

Store

Enforcement

Coordinator

Action

Library

Policy Loader

Dynamic

Reasoning

Enforcement

Verifier

Event

Composer

Events

Policy

Exception

events

Policy Compiler

Policy

Invoke Action

Programming model comparison

Planning
-
based Model

Policy
-
based Model

User
-
oriented

Administrator
-
oriented

Proactive declarative
programming

Reactive imperative
programming

Maximizes resource
utilization based on user
needs

Constrains resource
utilization based on system
policies

Supports single task
execution and reasoning

Supports concurrent action
execution and reasoning

Active Spaces

Thank you

The Gaia Project


http://gaia.cs.uiuc.edu
/

Ubisys Notes

http://ubisys.org