25
1 23.08.2006 [email protected] Component-based, Context- Component-based, Context- aware Software Systems aware Software Systems Workshop on Advances in Methods of Information and Communication Technology Petrosavodsk State University Michael Przybilski

Component-based, Context-aware Software Systems

Embed Size (px)

DESCRIPTION

Component-based, Context-aware Software Systems. Workshop on Advances in Methods of Information and Communication Technology Petrosavodsk State University Michael Przybilski. Motivation. Increase of available context information Wireless information devices - PowerPoint PPT Presentation

Citation preview

Page 1: Component-based, Context-aware Software Systems

1 23.08.2006 [email protected]

Component-based, Context-aware Component-based, Context-aware Software SystemsSoftware Systems

Workshop on Advances in Methods of Information and Communication Technology

Petrosavodsk State University

Michael Przybilski

Page 2: Component-based, Context-aware Software Systems

2 23.08.2006 [email protected]

MotivationMotivation

• Increase of available context information• Wireless information devices• Integrating increasing number of input and output devices

• Use for applications• Explicit, potential

• Use of communication possibilities• Remote devices• Number of devices

Page 3: Component-based, Context-aware Software Systems

3 23.08.2006 [email protected]

OutlineOutline

•Challenges

•Approaches

•Component-based Systems

•Examples

•Ongoing Work

Page 4: Component-based, Context-aware Software Systems

4 23.08.2006 [email protected]

ChallengesChallenges

• Acquisition, processing and provision of context data• Rapidly changing and uncertain sources

• Adapt behaviour (of system / application) depending on the situation ((physical) environment, location, …)

• Reactive / pro-active systems (real-time)

• Seamless vs. seam-full

• Reuse• Common steps• Context information

• Scalability, flexibility, privacy and trust, re-configurability, …

• Development vs. Runtime support

Page 5: Component-based, Context-aware Software Systems

5 23.08.2006 [email protected]

Typical Mobile ConstraintsTypical Mobile Constraints

• Energy consumption• Data processing

• Data storage

• (Wireless) Communication• Bandwidth, Reliability (range, signal detection)• Infrastructure (dynamic network topology; ad-hoc and P2P networks)• Networking technologies (IrDA, BT, WLAN, HomeRF, PicoNet, …)• Routing protocols for PAN and MANET (AODV, DSDV, …)

• IO capabilities (form factor)

Page 6: Component-based, Context-aware Software Systems

6 23.08.2006 [email protected]

Context and Context ReasoningContext and Context Reasoning

• A. Dey and G. Abowd, 1999: “Context is any information that can be used to characterize the situation of an entity. An entity is a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and application themselves.”

• Other definitions by Chen and Kotz, Yau and Karim, …

• Categorization of context: Mayrhofer, Lieberman and Selker, Schilit, Adams and Want, Gross and Specht, …

• Context-reasoning can be defined as deducing new and relevant information from the various sources of context-data

Page 7: Component-based, Context-aware Software Systems

7 23.08.2006 [email protected]

ApproachesApproaches• Monolithic systems

• Blackboard• Information exchange through shared (structured) spaces• Indirect communication• Data stored in tuple spaces

• Widget• Direct information exchange between objects• Message or RPC-based

• Level of re-use• Frameworks

• Design structure for a specific class of components or systems• Middleware systems

• software system that operates (logically) between operating system and application and provides commonly used services

• Infrastructures• Set of technologies (well-established, pervasive, reliable, and publicly

accessible) that act as a foundation for other systems

Page 8: Component-based, Context-aware Software Systems

8 23.08.2006 [email protected]

The Context Toolkit (CTK)The Context Toolkit (CTK)

• Structure approach to context-aware systems• encapsulation of sensors• access to context data through a network API• abstraction of context data through interpreters• sharing of context data through a distributed infrastructure• storage of context data, including history• basic access control for privacy protection

• Standardized API for applications

• Enables monitoring• Active context input, application logic behavior, notification of context

output

• and control of context• Modification of application logic behavior, triggering of context output

• Java-based component framework• Also Python and C++ widgets

• Common subscription mechanism (call-backs)• HTTP + XML

Page 9: Component-based, Context-aware Software Systems

9 23.08.2006 [email protected]

The Context Toolkit (CTK)The Context Toolkit (CTK)

• Context Widgets• Abstract context

information

• Interpreters• Raising the level of

abstraction

• Aggregators• Collection of multiple

pieces of context information

• Services• Execute (common) actions on behalf of applications

• Discoverers• Registry of capabilities available in the framework

Page 10: Component-based, Context-aware Software Systems

10 23.08.2006 [email protected]

The Context Toolkit (CTK)The Context Toolkit (CTK)

•Widget Class: IdentityPresence

•Attributes• Location: Location the widget is

monitoring• Identity: ID of the last user

sensed• Timestamp:Time of the last arrival

•Callbacks• PersonArrives (location, identity, timestamp)

• Triggered when a user arrives• PersonLeaves (location, identity, timestamp)

• Triggered when a user leaves

Page 11: Component-based, Context-aware Software Systems

11 23.08.2006 [email protected]

The Reconfigurable Context-Sensitive The Reconfigurable Context-Sensitive Middleware (RCSM)Middleware (RCSM)

• Context and resource sensitive

• Instant establishment and termination of communication channels (changing context, node mobility)

• High density of nodes and scalability for exponential interaction

• Categorization in terms of sources

• Network (routing, transport protocols)

• Device (power, ambient light, location, time, other devices in range)• User-Interaction (application specific and originating)

• Context-sensitive interface definition• Tuples of n values + time• Several operators for specification of temporal relationships

Page 12: Component-based, Context-aware Software Systems

12 23.08.2006 [email protected]

ConFabConFab

•Infrastructure system• Platform (HW, OS) and language

independent• In-place upgrade of new sensors

and services• Easier development

•Standard Data Formats and Protocols (Data Model)

•Privacy issues• Decentralized architecture• control and feedback

mechanisms• Plausible deniability• Special exceptions for

emergencies

Page 13: Component-based, Context-aware Software Systems

13 23.08.2006 [email protected]

ConFabConFab

•Entities (people, places, things and services) have InfoSpaces

• Contain context information (tuples)

• Held on infospace servers• Populated by Contextsources• Applications retrieve and

manipulate infospace data

•Operators defined on InfoSpaces• In – access policies, privacy tags,

notification

• Based on standard web technologies• Webservers (infospaces)• XML documents (context tuples; only tags and attributes)

• Out – access policies, privacy tags, notification, invisible mode, add privacy tag, interaction

• On – garbage collection, periodic reports, delete duplicated tuples

Page 14: Component-based, Context-aware Software Systems

14 23.08.2006 [email protected]

ConFabConFab

<ContextTuple dataformat=“edu.school.building”datatype=“location”description=“location of an entity”entity-link=“http://myhost.com/~jdoe”entity-name=“John Doe”timestamp-created=“2003.Feb.13 16:06 PST”><Values>

<Value value=“523” /></Values><Sources>

<Source datatype=“location”link=“http://localhost/map.jsp”source=“Location Simulator”timestamp=“2003.Feb.13 16:06 PST”value=“523” />

</Sources><PrivacyTags>

<Notify value=“mailto:[email protected]” /><TimeToLive value=“1 day” /><MaxNumSightings value=“5” /><GarbageCollect>

<Where requestor-location=“not edu.school.building” />

</GarbageCollect></PrivacyTags>

</ContextTuple>

•Context tuples• Intrinsic attributes (e.g.

persons age)• Extrinsic (relationship)

attirbutes (person is in room)• Static attributes (email

address)• Dynamic attributes (location)

• Common parts• Dataformat, datatype, [entity link,]

values, • [Privacy Tags]

• Hints to the use of the information when it leaves the users infospace

Page 15: Component-based, Context-aware Software Systems

15 23.08.2006 [email protected]

• Mobiware (Columbia University)• ALICE (Architecture for Location Independent CORBA Environments; Trinity College)• LIME (Washington University)• XMIDDLE (University College, London)• QoS-Aware Middleware and iMAQ (University of Illinois)• TSPACES (IBM Research)• GAIA – for smart spaces middleware (Univ. of Illinois)• CORTEX (Lancaster University)• ContextPhone• Project Aura• Solar• JCAF• Sentient Model• TEA framework

• CARISMA

• …

OtherOther

• ReMMoC• MobiPADs• Active Campus• Carmen• Smart-its• DiSUS• AGAPE

Page 16: Component-based, Context-aware Software Systems

16 23.08.2006 [email protected]

Software ComponentsSoftware Components

•A component is a coherent package of software artifacts that

• can be independently developed and delivered as a unit, and• can be composed, unchanged, with other general components to

build something larger

•An interface is a description of a set of operations related to the external specification of a component. An interface consists of:

• a set of operations that a component needs to access in its surrounding environment (required interface),

• a set of operations that the surrounding environment can access on the given component (provided interface).

•An operation is unit of functionality implemented by a component which may map to:

• a method, • a function,• a procedure.

Page 17: Component-based, Context-aware Software Systems

17 23.08.2006 [email protected]

DistributionDistribution

• Distributed processing / information sharing• Nearby, resulting in a context-aware system• Remote

• Simple sensors

• Wireless information devices• Online processing• Groups of devices• Limited resources (processing, storage, networking, power,

etc.)

• …

• Servers• High level of resources• Specialized

Page 18: Component-based, Context-aware Software Systems

18 23.08.2006 [email protected]

Simple ApplicationSimple Application

•The stolen / forgotten mobile phone•Sensor

• Simple BT beacon• Attached to user• Transmit Freq. <= 1 Hz

•Reasoning• Beacon is with user• Mobile phone is owned by user• Should never be out of reach

=> stolen / forgotten•Application logic

• Sound / display alarm if stolen / forgotten

Reasoning

Beacon

Application

subscribe(select NULL where user = Michael, epoch = 1000)

Page 19: Component-based, Context-aware Software Systems

19 23.08.2006 [email protected]

Advanced “Application”Advanced “Application”

•Inferring User Activity from 3D Acceleratometer•Steps

Data gathering

Pre Processing

Feature Extraction

Feature Selection

Classification

Page 20: Component-based, Context-aware Software Systems

20 23.08.2006 [email protected]

Inferring User Activity from 3D Inferring User Activity from 3D AcceleratometerAcceleratometer

Sensor

Preproc. FeatureExtr. FeatureSel.

Classifier

•Components

subscribe(select x, y, z from acceleratometer where user = Michael, epoch = 10)

subscribe(select variance, absoluteMagnitude from Feature-Selection where source = acceleratometer and user

= Michael, epoch = 10)

get(select activity from activity where user = Michael)

Page 21: Component-based, Context-aware Software Systems

21 23.08.2006 [email protected]

Inferring User Activity from 3D Inferring User Activity from 3D AcceleratometerAcceleratometer

SensorPreproc. FeatureExtr.

FeatureSel.Classifier

Node 1

Node 2

•Sensor•220 000 samples (100 Hz)

•Preprocessor•Feature Extraction•Feature Selection

•Variance, absolute Magnitude of Acceleration

•Classifier•Simple linear classifier•300 samples for learning•300 samples for calibration

Nokia 6600BT Link L2CAPSensorbox

Page 22: Component-based, Context-aware Software Systems

22 23.08.2006 [email protected]

Inferring User Activity from 3D Inferring User Activity from 3D AcceleratometerAcceleratometer

Variance

Absolute Magnitude

*International Conference on Artificial Intelligence 2005

Page 23: Component-based, Context-aware Software Systems

23 23.08.2006 [email protected]

Other workOther work

•Agent-paradigm• Distributed preprocessing• Integration of policy-based privacy and security• Autonomous Intelligent Systems: Agents and Data Mining, 2005

•Evaluation of reasoning mechanisms• Software framework for remote data gathering• WS / EJB components / WEKA• Pervasive Systems and Computing, 2005

Page 24: Component-based, Context-aware Software Systems

24 23.08.2006 [email protected]

Ongoing WorkOngoing Work

•Further integration• iMotes (NesC)• Series 60 / 80 Mobilephones (Symbian C++)• JBoss Application Server

•Communication• Ad-hoc (BT) and P2P (IP; 3G/GPRS / LAN)

•Energy saving by remote processing

•Reasoning mechanisms• Simple Bayesian networks, SVM

•Other Applications• Training management and heart-rate monitoring

Page 25: Component-based, Context-aware Software Systems

25 23.08.2006 [email protected]

Questions?Questions?