Open Platform for Ambient Environments based on UPnP and OSGi€¦ · OSGi OVERVIEW > A...

Preview:

Citation preview

SWANNOpen Platform for Ambient Environments based on UPnP and OSGi

Olivier Liechti & Gen Suzuki

University of Applied Sciences of Western Switzerland (HEIG-VD)

7221

2

AGENDA

> Background and motivations– Ubiquitous computing & calm technologies– Ambient user interfaces

> SWANN

– Vision & design objectives– System architecture

> Implementation

– UPnP– OSGi

> Demo> Conclusions, Q&A

3

UBIQUITOUS COMPUTING

> "The Computer for the 21st Century"

– Mark Weiser, Xerox PARC

– Scientific American, 1991

> The third wave of computing

– 1 computer – many users

– 1 computer – 1 user

– 1 user – many computers

> Related concepts

– Pervasive computing, invisible computing, tangible user interfaces, ambient intelligence, Internet of Things, Web of Things

http://www.ubiq.com/weiser.html

4

THE COMPUTER OF THE 21st CENTURY

"The most profound technologies are those that disappear.

They weave themselves into the fabric of everyday life until they are indistinguishable from it.

We are therefore trying to conceive a new way of thinking about computers, one that takes into account the human world and allows the computers themselves to vanish into the background."

5

THE COMPUTER OF THE 21st CENTURY

"Indeed, the opposition between the notion of virtual reality and ubiquitous, invisible computing is so strong that some of us use the term "embodied virtuality" to refer to the process of drawing computers out of their electronic shells.

The "virtuality" of computer-readable data – all the different ways in which they can be altered, processed and analyzed – is brought into the physical world."

6

TABS, PADS & BOARDS (Xerox PARC)"Ubiquitous computers will also come in different sizes, each suited to a particular task.

My colleagues and I have built what we call tabs, pads and boards: inch-scale machines that approximate active Post-it notes, foot-scale ones that behave something like a sheet of paper (or a book or a magazine) and yard-scale displays that are the equivalent of a blackboard or bulletin board."

7

CALM TECHNOLOGY

"Calm technology engages both the center and the periphery of our attention, and in fact moves back and forth between the two.

We use "periphery" to name what we are attuned to without attending to explicitly.

Ordinarily when driving our attention is centered on the road, the radio, our passenger, but not the noise of the engine. But an unusual noise is noticed immediately, showing that we were attuned to the noise in the periphery, and could come quickly to attend to it."

addressinginfo overload!

http://sandbox.xerox.com/hypertext/weiser/calmtech/calmtech.htm

8

AMBIENT USER INTERFACES

> Provides a continuous flow of subtle cues that are interpreted without requiring full attention

> Multi-modal: visual, auditory, tangible

> Abstract representations are very effective

9

FROM THE WORKPLACE...

> Requirements for ubicomp applications

– Continuous network connection

– “Powerful” client devices

– Sensors & infrastructure (context awareness)

> In the mid 90's

– Immature and costly

– In general, not available outside the workplace (or the research lab...)

> Computer Supported Cooperative Work

– CSCW was the first application domain for ubicomp applications

– Support workers with a “smart” environment

– Create a sense of “who is around”

10

...TO THE LIVING ROOM

> What has changed since then?

– Continuous broadband access has become the norm

– Explosion of Web 2.0 and social networks

– iPhone, Androïd and other Internet-enabled devices

– Sensors are widely used (GPS, accelerometers, etc.)

> Ubicomp in domestic settings

– Home automation (efficient use of energy, etc.)

– Entertainment (media access, gaming, etc.)

– Communication & social interactions (creating a sense of who is “around”)

11

EXAMPLE: INTERACTIVE PHOTO CUBE

> Goals

– Create a sense of “being in touch” with one's family and friends.

– Offer a complement to explicit communication channels.

– Avoid the need for people to be in front of a screen.

> Physical artifact

– Photo prints are pasted on the faces of a cube.

– A different “emotion” is associated with each photo.

– Embedded sensors track the orientation of the cube.

> Usage

– The system knows when the user manipulates the cube.

– The system knows which photo is being looked at.

– The associated information is sent across the Internet and presented to another person.

12

EXAMPLE: INTERACTIVE PHOTO CUBE

13

SWANN

15

SWANN: DESIGN OBJECTIVES

> Ambient devices are already available on the market

– Nabaztag, Ambient orbs, etc.

– Initially, commercial offerings bundle one appliance with a small set of services (stock quote, weather forecast and a few)

– Publications and prototyping platforms for hobbyists, etc.

> Need for an open platform

– It should be possible to monitor different types of events with one device.

> Need for standards

– It should be possible to create ambient environments by assembling heterogeneous ambient devices and information services.

> SWANN aims to address this with an open middleware architecture

– Creates a dynamic bridge between devices and information sources

– Modular, pluggable architecture with dynamic discovery

16

SWANN: GENERAL ARCHITECTURE

> Ambient box

– At home/office

– Connected to the local network

– Supports automatic ambient device discovery

– Accessible through a Web interface

> Ambient devices

– Physical artifacts distributed through the house

– Connected to the local network.

> Information sources & service proxies

– On-line services reachable through the Internet

– Examples: e-mail agent, blog monitoring agent, social network monitoring agent, photo sharing service, etc.

17

SWANN: GENERAL ARCHITECTURE

18

SOFTWARE ARCHITECTURE (INITIAL)

19

UPnP: UNIVERSAL PLUG & PLAY

> Plug and Play for network devices.

– Discovery

– Description

– Control

– Event notification

> Used by:

– media centers

– video game consoles

– NAT routers

– etc.

> Also appropriate for simpler devices.

> Not a Java technology.

> Benefits for SWANN

– Ambient devices can be dynamically discovered

– Existing devices can be used off-the-shelf

20

UPnP TOOLS> Intel UPnP tools (no longer

supported)

– A simple device

– Generic control point

– Device validator

– Etc.

> Many libraries, but few in Java.

> CyberLink for Java

– Open source

– Inactive...http://cgupnpjava.sourceforge.net/

21

Apache Felix UPnP base driver> OSGi / UPnP bridge.

> Implements the OSGi specifications (UPnP™ Device Service Specification).

> Based on CyberLink for Java.

> The driver automatically imports and exports the devices:

– Discovery: local network → OSGi container

– Broadcasting: OSGi container → network local

> Well integrated with OSGi.

22

OSGi OVERVIEW> A container for Java applications / components.

> Application life cycle management

– Install, start, stop, update, uninstall, etc.

– Programmatically and remotely

> Service platform

– Service registry

– Dynamic dependency resolution

23

BENEFITS OF OSGi for SWANN> Extensibility

– Makes it easy to install new “service proxies” that provide information represented by ambient devices.

– Example: install a “Flickr activity monitor” in the home gateway.

– Device communication drivers (UPnP, Jini, etc.)

> Ability to update the whole application.

> Applications built from decoupled components.

24

SERVICES: DECLARATIVE REGISTRATION<?xml version="1.0" encoding="UTF-8"?>

<component name="upnp-discoverer">

<implementation class="ch.iict.swann.core.impl.UPnPDiscoverer" />

<service>

<provide interface="ch.iict.swann.core.DeviceDiscoverer" />

</service>

<!-- Some references... -->

<reference

name="upnp-device"

interface="org.osgi.service.upnp.UPnPDevice"

bind="addDevice"

unbind="removeDevice"

cardinality="0..n"

policy="dynamic"

/>

</component>

25

OSGI & UPnPpublic class UPnPDiscoverer extends DeviceDiscoverer {

/* … */

protected void addDevice(UPnPDevice dev) throws Exception {

AmbientDevice newUPnPDev = new UPnPDeviceAdapter(dev);

super.addDevice(newUPnPDev);

}

protected void removeDevice(UPnPDevice dev) throws Exception {

AmbientDevice temp = new UPnPDeviceAdapter(dev);

super.removeDevice(temp);

}

}

26

MANIFEST.MFBundle-ManifestVersion: 2

Bundle-Version: 0.1.3

Bundle-SymbolicName: ch.iict.swann.UPnPDeviceCom

Bundle-Name: UPnP Device Communication (Swann)

Bundle-Description: This bundle uses UPnP to discover ambient devices on the network.

Import-Package: ch.iict.swann.core;version="[0.1.0,1.0.0)", ch.iict.swann.util.log;version="[0.1.0,1.0.0)", ch.iict.swann.persistence;version="[0.1.0,1.0.0)", org.osgi.service.upnp

Service-Component: OSGI-INF/upnp-discoverer.xml

27

SOFTWARE ARCHITECTURE (INITIAL)

28

SOFTWARE ARCHITECTURE (REFACTORED)

29

WEB CONTAINER IN OSGi CONTAINER> Not a special case anymore.

> Could be updated, like any other component.

– While the rest of the application continues to run.

> Direct access to the OSGi services (no bridge).

30

OUR EXPERIENCE WITH OSGi> Really modular applications: it just feels right.

> Small bundles, well defined interfaces.

– More manageable.

– But how many?

> Seems more complicated than it really is.

– Just a JAR with some required entries in the MANIFEST.MF file.

– Use the Declarative Services, or any alternative (Spring?).

> Lack of tools and support

– About to become a thing of the past.

– More and more libraries are made “OSGi compliant”.

31

CONCLUSIONS> Ubiquitous computing

– is becoming a reality, both in the workplace and in the home

– mobile computing is only dimension of ubiquitous computing

> SWANN

– provides an infrastructure for building ambient environments

– uses OSGi as a core foundation

– uses UPnP as one device discovery & control technology

> Future work

– Improve the Web interface

– Alternatives to UPnP

– Deal with multiple users (sharing ambient devices?)

– Develop and evaluate audio-visual languages

Olivier Liechti & Gen Suzuki

IICT / HEIG-VD olivier.liechti@heig-vd.ch

Recommended