UNIVERSIDADE DE SAO PAULO Instituto de Ciéncias Mateméticas e de Computagfio
ISSN 0103-2569
A
Web Service Integrating Ubiquitous Computing Applications
Carlos Roberto E.deArruda
Jr
Renato deFreitasBulcfio Neto Maria daGracaCampos Pimentel
N2
208
RELATORIOS TECNICOS
8210
Carlos
—SP
Ago/2003
SYSNO
Liiqéfifi
‘
DAM
lCMC-SBQB
“nun——
A Web Service integrating ubiquitous computing applications
Carlos Roberto
E.de Arruda Jr
Renato
deFreitas Bulcio
NetoMaria
(inGraca Campos Pimentel
Instituto de Ciéncias Mateméticas ede Computacfio Universidade de Sz'io Paulo
Av. do Trabalhador
Sio-Carlense,
400 —Centro Caixa Postal 668CEP
13560370
850 Carlos, SP{credajuxn rbulcao, mgp}@icmc.usp.br
Resume.
Ubiquitous computingapplications
exploit context information toadapt their
services inaccordance
withusers
needsbased
on informationsensed
bothfi-om thephysical and computational
environment. Weadvocate that
context—aware
applications can
takeadvantage of
the benefitsprovided
by Web Services inparticular, alleviating dmerences
in heterogeneous ubiquitous en—vironments
and apportioning responsibilities
betweenapplications and
infras- tructures. Wepresent
the ContextKernel
Web Servicethat illustrates
how sucha service
could be builtat
thesame
timethat
leverages dimensionsfor
contextinformation
proposed
in the literature. The ContextKernel as
a Web Serviceallows applicationsnot
only tostore and
retrieve, butalso
to exchange context information through the Web.Keywords:
Ubiquitous Computing, Context-awareness, Web Services, Context Kernel.Contents
1.
Introduction
12.
Related Work
23.
Context-aware infrastructures as
WebServices
34.
Context Kernel 4
4.1, Context Kernel workflow
...
54.2. Context Kernel API
...
64.3. Context Kernel architecture
...
85.
Scenario of
use 95.1. Context—aware applications
...
95.2. Integration with Context Kernel
...
106.
Limitations of Context Kernel
127.
Conclusions and future work
13List of Figures
1 Context Kernel workflow [Arruda Jr et 31.,2003]
...
52 Context Kernel architecture.
...
81.
Introduction
Ubiquitous
computing
isan emergent human—computerinteractionparadigm
where users interactwith
everyday devices which seamlessly embed applications [Weiser,1991]. Themain
goal is tosupport
users in their everydaytasks
usually carried out away from the desktop platform. Pervasive and mobile computing are technologies which have pro—foundly contributed to the evolution
of ubiquitous
computing [Lyytinen and Y00, 2002].Context-aware computing is a research theme on ubiquitous computing with focus on the ability
of
a computational entity to adapt itsbehaviorbased
on context information sensedboth
from the physical and computational environment. Context is any relevant information aboutthe
user-application interaction, including theuser
and the applicationthemselves
[Dey, 2001]. The relevanceof
the service provided depends on the currenttask Thus,
context—aware applicationshandle
context information inorder to
provideapplicationswith
context—aware services.Many context—aware applications, such as PARCTab [Schilit et al., 1993], Active Badge [Want et al., 1992] and CampusAware [Burrell et al., 2002], implement their own
mechanisms
for capturing, storing andprocessing
context information. Recent efforts havebeen
geared towards providing support for thecommotion of
services dedicated to capture, store and process context information. Examples include the Context Fab—ric
[Hong and Landay, 2001] service infi'astructure, the Aura [Garlan et al., 2002] archi—tectural
frameworkand
theGaiaOS
[Hess eta1., 2002] meta—operating system.Developers have to face two challenges for building context—aware applications:
first,
the support for
several levelsof
heterogeneity; second, the distributionof
respon-sibilities
between
applications and infrastructures. An alternativeto
dealwith
these two issues is to take advantageof
the benefitsprovidedby
Web Services.Recently, Web Services have become a key success factor as infrastructure for sev- eral
development
and integration projects, including gatewaysewers,
APIs and middle-wares
[Arsanjani et al., 2003]. The essenceof
Web Services [W3C, 2002] is the useof
the
Internet
infrastructure to bridge a myriadof Internet
systems transparently and in—dependently of
differences in network technologies, devices, operating systems and pro-gramming
languages. Web Services are largelybased
on HTTP as the application-levelprotocol
and open XML-based specifications, such as XSD(XMLSchema DefinitionLan—guage)
[W3C, 2001], WSDL (Web ServiceDescription Language)
[W3C, 2003b] and SOAP (SimpleObject
AccessProtocol)
[W3C, 2003a].In
thispaper we
discuss how the Web Services technology could be usedto
al—low the storage and retrieval
of
context informationby
meansof
the Context Ker- nel[Arruda
Jr et al., 2003], aWeb Service that allows applicationsto
handle context infor-mation based
on the who, where, when, what, why and how context dimensions discussed in theliterature
[Abowd et31.,2002] [Truong eta1., 2001]. As a Web Service, the Con—text Kernel
allows applications not only to store and retrieve,but
alsoto
exchange contextinformation
via the Web.Section
2presents
current research in context—aware computing. Section 3 advo- catesthe use of
Web Services as an approach forbuilding
context—aware infrastructures.This
isillustrated through
the Context Kernel servicepresented
in Section 4. Section 5describes
a scenario in which context-awareapplications
make useof
the Context KerAl
nel. Section 6discusses some limitations
of
the Context Kernel implementation. Finally, Section 7presentsour
concluding remarks and future work.2. Related Work
Making applications context-aware is one
of
the challengespointed
out by [Abowd et al., 2002] inubiquitous computing. Recent research oncontext—awarereports
results on mobile and context-aware systems, sensor—based context information, con-text
modeling, development methods for toolkits, frameworks and service infrastructures.This
section presents someof
those endeavors on context-awareness focusing on howthey
deal with context information.The Xerox PARCTab [Schilit et al., 1993] and Olivetti Research Lab’s Active Badge [Want et al., 1992] are pioneering demonstrations
of
context—awaresystems. Basedon
indoor location mechanisms,both
systems provide users with valuable services, such aslocating
individuals within a building or remembering whom they met and any phone calls they made or received. In both cases, the systems themselves are responsible forstoring
context information.The
CampusAware [Burrell et al., 2002] is a location-aware campustour
systemthat
allows usersto
make textual notes ontheir
handhelds about locations they arevisiting or
find locations they are interestedin. The CampusAware system uses a centralrepository with
three databases for context and social information, such as users’ notes and locations visited. This system relies on the facilities provided by the Global Positioning System(GPS)
for outdoor location information.The
Portable
Help Desk (PHD) [Salber et al., 2001] isa location-aware systemthat
allows amobile
student to locatehercolleagues
andfind
useful resources, such as printers,restaurants
and vending machines. The PHD system relieson
a highly accurate location service enabling students to instantaneously locate one another in order to managetheir
teammeeting
schedules and projects.This
systemstores
all context information on a re-lational
database shared among multiple services and accessed through user-configurable webpages
and customizable real-time maps.The ContextToolkit [Deyet al., 1999] offers a framework with generic services and
abstractions ~
context widgets, interpreters and aggregators—
inorder to overcome thelack of
support for a standard developmentof
sensor-based context—awareapplications.The history of
each typeof
context information is stored on a relational databaseby
itscorresponding
context widget for providing any application interested withthat
valuable information. For instance, a particular contextwidget
has been used to sense thepres-
enceof
a user and be able to identifyhim/her
in awhiteboard
capture application for informal meetings [Brotherton eta1., 1999]by
meansof
a sensor that capturesthat kind of
context information. Thus, Context Toolkitprovides applications with capture, storage, conversion, aggregation, access and distributionof
context information.The
ContextFabric
[Hong and Landay, 2001] is a service infrastructure forcontext—aware applications focusing on a storage
model
for flexible and distributed context infor- mation. Similarlyto
the Context Toolkit, its infrastructure is responsible for the storageof
context information. However, the ContextFabric
differs from Context Toolkit intwo
significant
ways[Hung
2002]. First, ContextFabric
takes the architectural model in theContext Toolkit and generalizes it to
two
services, an event service and a query service,handling
events and queries as main abstractions. Second, the ContextFabric
separates the specificationof
context needs from its processing. This allows applications to take changes in the environment into account whenprocessing
context needs, such as whensomeone
moves from one place to another.The
GaiaOS
[Hess et al., 2002] is a component-based middleware designedto
pro- vide supportfor
aUser
Virtual Space, an abstractionthat
comprises context information,tasks
and devices associated to each user. A user virtual space is characterized as aproac—tive entity in a
system
software, becauseit
mustreconfigure itself
while its components—— the current
location or
the device being used —— change. The GaiaOS aims at ad-dressing
someinherent
challenges in ubiquitous computing environments, such as con-text
management,binding,
mobility and adaptability.The
storage service is providedby
a context—aware datamanagement
system that organizes user virtual spaces indistributed filesewers,
eachfile
server managing its own data. Given its architecture, other services can be implementedon
topof
theGaiaOS
middleware.The
Auraproject
[Garlan eta1., 2002] provides an architectural frameworkfor
usermobility
inubiquitous
computing environmentsthat
allows the adaptationto
users context and needs. Itsmain
component includes a representationof
users tasks as a collectionof service
descriptions which can be mapped on Service Suppliers currently available from the environment. The TaskManager
is responsible for allocating tasks to availableresources;
the EnvironmentManager
is awareof
which service suppliers are currentlyavailable
fi'om the environment; finally, the ContextObservers
provide information on thephysical
contextto
the environment manager. These components are placed at thethree
layers definedby
Aura’s architecture [Cheng et al., 2002].These related
worksregisterthat
the challenges for building context—awareapplica—tions include the
support
for several levelsof heterogeneity
and the distributionof
respon-sibilities
betweenapplications
and infrastructures. An alternative to deal with such issues is to take advantageof
the benefits provided by Web Services, as discussed next.3. Context-aware infrastructures as Web Services
The
essence of
Web Services [Stal, 2002] is the useof
the Intemet infrastructure to allowapplications
to communicate seamlessly and independentlyof
heterogeneous hardware andsofiware.
Web Services are accessed using standard Internet protocols as HTTP op—erating on
topof TCP
and canbe
definedby
self-describing messages referencing infor-mation
to understandthe
message. Open XML-based specifications —-XSD, WSDL and SOAP -—are thebuilding
blocksof
the basic Web Services architecture [Burner, 2003].The
XMLlanguage
is used for representing thedata
inside messages using elementand attribute
names.The
XML Schema (or XSD)specification
provides a common col-lection of
datatypes
for describing XML attributes and elements in orderto
achieve asyntactic
levelof interoperability
across thelntemet.
For
theexchange of
messages, Web Servicesmay
use the SOAP protocol, whichhas two main
characteristics: simplicity and extensibility. The SOAP protocol defines theXML-based
syntax, the semantics and the orderof messages
exchanged between peers3
(applications
or
services). SOAP messages include an optional Header element and amandatory
Body element, all wrapped by an Envelop element.Web Services may take advantage
of
the WSDL specification to define the service contract, i.e., the collectionof
messages which a service accepts and produces. Moreover, WSDL describes themapping
between abstractmessages
toparticular
objects or methods to beused
byapplications
requesting the services [Fremantle et al., 2002]. The WSDL language defines:a
Wes
as optional elements usedto
build messages;0 the request and response messages;
- portTypes
to map messages to abstract operations;0 bindings
to
mapportTWes
to concrete protocols;0
ports
to define the real communication addressesof
services;a and
services
as collectionsof
ports.We advocate
that
infrastructures aimed at supporting context—aware applications should take advantageof
the benefits leveragedby
Web Services. In particular, infras-tructures
would allow applications to exchange data withcommunication
eificiency, loosecoupling
and asynchrony [McKusick, 2003]. This means that applications built uponWeb Services—based infrastructures wouldnot
only store and retrieve,but
also exchange infor—mation through
theWeb.In the next section we discuss how the Web Services approach could be used
to
allowthe
storage, retrieving and exchangeof
context information.4. Context Kernel
The Context Kernel is a Web Service that allows applications
to
handle context infor-mation
basedon
the dimensions who, where, when, what, why and how discussed intheliterature
[Abowd et al., 2002] [Truong et al., 2001] by formalizing a setof
XML-basedoperations
associated to those dimensions. The Context Kernel Web Service classifiesthose
dimensions as follows {ArrudaJr
et al., 2003]:0 who, where, when and how are
primitive
dimensions; they arehandled
indepen—dently of
other dimensions;0 what and why are derivative dimensions; they are obtained by
relating
other di- mensions ——primitive or derivative.The
Context Kernel stores primitive dimensions as a triplecontaining
type. value and anoptional
qualifier. The following examplerepresents
an instanceof
the dimension when:(type=date,
value=2003-06—04TI6:19:29,qualifier=datefime)
A derivative dimension is defined
by means of
arule that
contains at least onepremise
and one inference. Premise is a dimension-t;pe-value-optiona1_qualifier quadru«ple as in
(dimension=where, type=latitude,
value=33)
(dimension =where, type=longilude, value= 70).Inference isa dimension-value
pair
as in(dimension=what,
value=Santiago).
Moreover,
rules
are grouped in schemas and a context contains definitionsof
schemas. The following XML excerpt (Example 1) illustrates the vocabulary defined
by
Context Kernel.<1 —- Example 1 -—>
<Context>
<5chema>
<rule>
<premises>
<premiee dimension:"where" type=“
latitude"
value:”33“/><premiae dimension:"where" type:"longitude" value:"70"/>
</premises>
<inferenceS>
<inference dimension:"what:" value:"Sam:iago“
/
></inferences>
</rule>
</schema>
</Context>
4.1. Context Kernel workflow
V
‘ 3um a has:
'l‘\ m \
‘ I® WM m
6“’3
Figure1: ContextKernel workflow [Anuda
Jr
etal., 2003].Figure 1
depicts
the Context Kernel workflow and the necessary steps sothat
a context-aware application makes useof
the Context Kernel service as follows.0 In Step 1,the Context Kernel
publishes
the WSDLdocument
definitionthat
con- tains the descriptionof
the service;a In Step 2, a context-aware application retrieves the WSDL document. Bypars~
ing it, the application obtains the service contract and the network endpoints
that
honor this contract. In the Context Kernel environment, endpoints are Java servlets usedto
extend the capabilitiesof sewers
in a request—response program- ming model;0 Based on the service contract, applications can send HTTP messages (POST or GET) using the SOAP packaging protocol requesting (Step 3) the available meth- ods provided
by
Context Kernel;o In Step 4, the Context Kernel stores/retrieves context information provided by applications on/from a database;
I The
resultof
processing context information is also returned to the requesting application(Step
5) via SOAP messages.4.2.
Context Kernel API
The sofiwane platform used in the implementation
of
the Context Kernel includes: the Linux operating system, the Apache web server extendedwith
the Tomcat servlet con- tainer, the Java programming language, open W3C specifications—
XML, XSD, WSDL and SOAP—
and the MySQL database where the context information isstored.The Context Kernel API offers four categories
of
methods: registry,status, storage
and retrieval. They are invoked by applications using the SOAP protocol encapsulating XML-based messages similarly to the message illustrated inExample 1.An application invokes the
method
InfoApp() toregister
its metadata, such as name, description and developers, and receivesback
one public and one private identifier. The former is used to store context information while the latter is used by third-party appli—cations
to
access the context information ina read-only basis. Once an application holds thepublic
identifierof
a third-party application,it
is ableto
query the Context Kernel API to obtain information storedby that third-party
application.The
following XML excerpt (Example 2) describes the metadataof
theiCIass
systeml registeredwith
the server bymeans of
a method InfoApp().<l-— Example 2 7 ~ >
<info>
<name>iClasa</name>
<description>Capture & access applica:ion</deseription>
<url>http://catuaba.icmc.uap.br/eclaas/</url>
<135tRelease>2002~ 08—07</laacRelease>
<version>1.0</version>
<5tatua>academic</status>
«developers»
<author emai
l
="renanflicmc.usp.br">Renan</author><author email='[email protected]'>Billy</au:hor>
<author email= "aandradewicmc .nap.br">Andrea<lauthor>
</developers>
</in£o>
An
application can retrievestatus
information stored by any other application. This can be achieved by invoking themethod StatusAppsO
which returns the public identi- fiers(<pub1icID>)
and metadataof all applications
registered with the server as shown inExample 3. The iCIass application invokes the methodStatusAppsO
and, in this case, receivesback
the metadataof
the CoTeia2 andiClass
applications. Theelement <toCK>
stores the particular date and time in
which
an application has registeredwith
Context Kernel.<tv~ Example 3 -—>
<applications>
<app1ication>
<name>CoTeia</name>
<deseription>Tool
for
web page authoring</description><url>http=//coweb.icmc.usp.br/</url>
<1astReleaee>2001~01»06</lastReleaae>
<veraion>1.O</veraion>
<scaeus >academic</atatus>
<publicID>OLdHc7sw4 OszSSKmEOEiYsuczAcSa</publicID>
<CoCK>2003~01 - 03T14:36:20<ICOCK>
liCIassis a capture and access application that allows theaccesstomultimedia material capturedfrom living lecturesin theformofweb hyperdocuments [Cattelanet31.,2003].
2CoTizi‘a is a collaborative application for asynchronous remote authoring of web pages [ArrudaJr and Pimentel, 2001].
<developers>
<author Email= "credajunaiicnx:.usp.br">Carlos</author>
</developers>
</application>
<application>
<name>iClaas</name>
<description>Capture & access application</description>
<url>http://catuaba.icmc.usp.br/eclaaa/<lur1>
<lastRelease>2002—08>07</lastR.elease>
<version>1.0</version>
(status>academic<lstatus>
<pub1ic1D>CSagengO7me4Nngd6mUPOhyGl5e</publicID>
<tOCK>2003—C|1~04Tl4:36z2O</tOCK>
<developers>
<author email="renaxfiicmc.
up
ibr“>Renan</aut:hor><author emai1='[email protected]">Billy</author>
<author amail="aandradealcmc.usp.br“>Andrea<lauthor>
</developers>
<
lapplicat
ion></applications>
The Context Kernel offers methods which allow applications
to store
and retrieve context information relative to contexts containing schemes, rules,premises
and infer—ences,
as
already shown in Example 1. It is worth notingthat
Context Kernel relies on context—aware applications regarding the validityof
the data and rules being stored.Therefore,
context-aware applications themselves areresponsible
for the specificationof
which kinds
of
data andrules
are particularly relevant to them, i.e., relevance ispreroga-
tiveof
applications.The
methodPutDataO
allows applications tostore context
information relativeto primitive
dimensions; in this case, the element<context>
includes primitives. In the Example 4, an application requests the methodPutDataO
to store that “aperson
calledCamachowas
at1ab3 room onJune
4that10:32:04
AM”.<z— — Example 4 — —>
<context>
<primitive>
<whoS>
<who type="peraon“ value="camachD“/>
</whos>
<whexes>
«where type:”room" value=" lab}"/>
</wheres>
<whenS>
<when type:"date" value:”2003- 06- 04T10:32:04"
qualifier:
"datetime"/></whenS>
</primitive>
</com:ext:>
The
methodPutRulesO
allows the storageof
contextinformation
relative both toprimitive
andderivative
dimensions. The Example 5shows anapplication
requesting themethod PutRulesO to
store the rule “aperson
calledRenata
is atlab4
room allFriday because
she attends a softwareengineering
class”.Applications
may associate an expira- tiondate
fortheir
rules; in this case, themileisvalid
only forthe first semester year
2003.When
the validation
dateof
a rule expires, it will continuestored on
the server,but
with solely historical purpose,not being
used for querying any more.<1—— Example 5 ——>
<context>
(privateID>BTbhtrGhPBanQSMChVe7nVQPizHJSf</privatEID>
<schema>
<ru1e begin="01/01/2003" end="01/07/2003">
<premise$>
<premise dimension:"who" type="person" Value="Renata"/>
<premise dimensio 7"where" type="room" value="1ab4'/>
<premise dimension='when" cype:“date“ value:“Frid3yAM"/>
</premiaeS>
<inferenceS>
<inferencedimension:"why" value:“sofcwareEngineering Clas£“/>
</inferenceS>
</rule>
</schema>
</context>
The Context Kernel service makes available the methods
GetRulesO
andGetAny()
for querying context information. The methodGetRulesO
allows applications to retrieve‘ context information based
either
on the public identifierof
an application or the valueof premises or
inferences associatedto
primitive and derivative dimensions.The method GetAnyO also allows applications
to
retrieve context information basedon
the valueof premises or
inferences associatedto
primitive and derivative dimensions.Moreover, it is possible
to
specify responses based on the dimensions themselves. Ap—plications
may also specify the maximum numberof
answers or even combine premises using boolean operators as illustrated in Example 6: an application requests “the threemost
recent(last value=3)
activities (dimension=what)
which aperson
calledClaudia has
done in the kitchen onJune
04th, 2003".<l—— Example 6 —»>
<COnteXt>
<publiCID>URQjzIK7hQ9boR6NDixfeoCUCiusHi</publich>
<last: value="3 "/>
<premiseS>
<boolean type:"AND">
<premise dimension:"who" type=“person" value="claudia"/>
<premise dimension:“where" type="room' value="kicehen"/>
<premiae dimension:'when" type:!date“ Value="2003-06-04“/>
</boolean>
</premiseS>
<inferences>
<in£erence dimension="what"/>
</inferenceS>
</context>
4.3.
Context Kernel architecture
I I I I
I I I I
I I l I
I
;I
I II I I I
I I I I
1 W :
S
: Registry : DocumvorimdI I i I
Hi
sDAP-baad :
S
1 O I Status ‘,unmeaknfixapuiqfions xI [3 Ij A{ I: smwaga I; Cunen
I L I
P
I I inimmzfinn‘ ' ' Miami '
I I I I
I I I
I I I I
I I I I
I I I I
I I I
applieiipn
imlwdoeoi
i Mutational“Moe iln‘phm'en
tau: ' lawn 'lamfl ' lama ' lay!Figure2:Context Kernel architecture.
The
Context Kernel architecture canbe thought
as five distinct layers as depicted inFigure
2. In the application layer resides the setof
ubiquitous computing applicationsmaking use
of
the Context Kerrie] service by invoking SOAP messages. The next lay- ers refer to thecontract layer
using WSDL for the service description, and theprotocol
layer using SOAP on topof
HTTP, respectively. Thefunctional
service layer describes the service interface, i.e., the main functions provided by the Context Kernel service, such as registering andgetting
statusof
applications and storing and retrieving context information.The implementation
layer
refers to the Context Kernel logic implementation.The Context Kernel Web Service adopts a document—oriented API implementa- tion [Burner, 2003], abstracting the system architectures and creating a loosely-coupled connectedness that
withstands
changesto
theunderlying
implementation. Document- oriented approaches use Document as styleof
message andLiteral
as serialization format—
rather thanRPC
style andEncoded
format.The
following WSDL excerpt (Example 7) describes thebinding
between aportType element (portljvpeGetAny) and the HTTP communication protocol using a Document/Literal approach.<!—— Example 7 -->
<binding name:"getAnyEinding" type:"tna:portTypeGetAi-iy">
<soap:binding style:"document"
transport:
"http://www.w3 .org/2002/12/soap/bindiugs/H'1‘1‘P“/
><operation name: "getAny">
<input:)
<soap :body encodingstyle=“h:tp://WW.v13 .org/2002 /12/soap»envelope/enccding/none“
use:"li:eral"/>
</input>
<output>
<soap :body encodingstyle: "http://www.v13 .org/2 002/12/scap—envelope/encoding/none“
uaez“lit:eral"/>
(/output>
</operat:ion)
</binding>
In the next section we illustrate a scenario in which two context-aware applications make use
of
the Context Kernel service.5. Scenario of use
This
section illustrates how two applications can take advantageof
the benefits leveragedby
Context Kernel. First, we brieflypresent
the applications inrespect
with the context information they handle. Wedescribe a scenario in which those applications make queriesbased
on contextinformation
stored on Context Kernel.5.1.
Context-aware applications
CoTeia is an application for collaborative authoring
of
hyperdocu-ments
[ArrudaJr
and Pimentel, 2001]that
has been used as a collaborative learn- ing tool roughly for 100 courses during the three lastyears
at our institute(http: //coweb. icmc.usp.br).
It is implementedusing
PHP as server—sidescripting
language, XML standards for structuring and presentationof
web pages and a MySQL database.CoTeia could use the following
primitive
context information:0
user data
(who):usemame,
password, email, preferences and permissions;-
location by[P
(where): remote computerof
users and server;-
timing (when): login and logout.iClass is a capture and access application that has been used
to
capture classes and lectures sincemid-year
2002 at our institute(http
:/ /catuaba. icmc .usp.br/
iclass).
TheiClass
infrastructure includes electronic whiteboard, projector,tablet,
microphone, networked computer and software modules for capture, synchronization, storage and automatic generationof
web hyperdocuments.iClass
is implemented us- ing Java, XML standardsfor
structuring and presentationof
webpages
and the Xindice database [Apache XML Project, 2002].iClass could use the following primitive context information:
0
user data
(who): username, password;0 type
of
objectscaptured
(how): slides and handwritings (default), audio, au- dio/video, web logging;0 location (where): classroom’s name;
0 timing (when): creation date
of
a session,period
(semester andyear) of
a disci- pline,duration
timeof
visitof
each slide.Once defined their primitive context information, both CoTeia and
iClass
may storethem
on the Context Kernel infrastructureor
infer some derivative information from them.5.2.
Integration with Context Kernel
Once defined their derivative information, applications may store
their corresponding
rules on the Context Kernel database. Moreover, applications can exchange context infor- mationthrough
the Web, for instance, in order to provide userswith
a customized service.In our scenario, Renan
attends a
lectureall
Thursday morningsat lab4
room. Those lectures have beencaptured
by the iClassapplication and
madeavailable
on the Webfor later perusal. The requesting
Java code in iCIass sothat
Context Kernel stores that rule ispresented
as follows. Noticethat
iClass invokes the methodPutRulesO. This
scenario assumesthat
all applications involved in this scenario have already been registeredwith
the Context Kernel, thus theyhold
their public and private identifiers.//
Example Bpublic class PutkulesRequest (
public
static
void main(String args[]) throws Exception (//
an instance of class PutRulesPutRules ptRules = new PutRulesU;
//
primitive contextintonation string
premisesll[] = newstrinngl
l4];premises [2] [2]
premises [2i [3i "thursdayAM";
n.
premises[0] [01 = "who";
premises [0] [1]
:
"person";premises[0} l2}
:
"Renan":premises [0] [3] = “',-
//qualifier
as optional parameter premises [1] (0] = "where”:premises [1] l1]
:
"room";premises (1] [2]
:
"laba";premises [1] [Bl = "";
premises [2] [O] = ”when";
premises [2] [1] = “date";
//
derivative context information String inferences[] [l:
new Scringll] [2l; inferenceslol [0] = "what";As a result
of
the integration with Context Kernel, CoTeia and iClass— or
any application—
are ableto
apply theresults
obtained from queries to the ContextKernel
towards search, customizationof
contents and navigation, and automationof
services.For
instance, CoTeia may infer activity information, such as the authoringof hyperdocuments
from usernarnes and URIs. The iCIass application may infer the class to be captured from temporal andlocation
(e.g. room) informationof
a general schedule.This
scenario also illustrates thatnon
context-aware applications can beextended
to make useof
context informationwithout
having to implement the whole storage and exchange infrastructure.6. Limitations of Context Kernel
The
Context Kernel Web Service is anongoing
project. Therefore, ContextKernel has
still some limitations mainly related to itson—demandbehavior and querymechanism
as follows:Lack of a preemptive event notification. The
communication between theContext
Kernel and applications isexplicit, i.e., applications must explicitly makecalls to
the Context Kernel API to take some action. However, itis essentialthat Context
Kernel isable to detect and respondto
all relevant events occurring inubiquitous
computing environments, turning it into a Web Service with preemptive features;No
support for elaborate queries.
The query mechanismof
Context Kernel isbased on
the boolean operators OR and AND. Other query predicates anddelimiters ~
NOT, ALL, GROUP BY, ORDER BY, ASC and DESC ——and the
support for
nested queries arenot
implemented yet. For instance, despite providing the filter- ing mechanism last value, presentedin
Example 6, the Context Kernel API can notrequest
ALL occurrencesof
some typeof
context informationor
GROUP and ORDER queries results, such as “what are the namesof
ALL students who at—tended the HCI class this morning?”
or
“GROUPtasks
frommy to-do
list BY statusof
emergency and ORDERthem
BY date ASC”;No
support for queries
usingtemporal intervals.
Time information hasbeen widely
used as indexing mechanism inubiquitous
computing applications. However, the Context Kernel doesnot
handle continuous events, only discrete ones, such as dates and daysof
the week. It cannot
be inferred, for instance,whether
astudent
has attended a class or not from hispresence
in the classroom, since he could have attendedfor
few minutes only. Therefore, comparison operators— AFTER,
BE- FORE and BETWEEN—
combined withbeginfime, endfime
anddurationfime
attributes must be provided to tackle this limitation. In the Example 8, themethod PutRuIes()
might store the amountof
time necessary to inferthat Renan
had re- ally attended the lecture. In addition,if
Renanlefi
the classroomto drink
some water, a location-aware applicationmight
keep the times he lefi and cameback
to the classroom, add all durationtimes
that he was into the classroom, and storethat
information on Context Kernel. When [Class or CoTeia applications made a query onthe Context Kernel, they could infer with more accuracywhether
Remm has attended the lecture ornot.12
7. Conclusions and future work
Context information has been widely adopted in ubiquitous computing
applications so that
they may be able to adapttheir behavior
in conformance to users needs.Related work
reportsthat building
context—aware applications demands support forboth platform
heterogeneity and distributionof responsibilities
between applications andinfrastructures
— the
Web Services approach can be exploited inboth issues.Wepresent the Context Kernel Web Service, a work in progress
that
allowsappli-
cationsto
handle contextinformationbased
on semantic dimensionsby formalizing
a setof
XML-based operations associatedto
those dimensions. We present a samplescenario
inwhich
applications integratedto Context
Kernel may not only store andretrieve con- text
information, but also exchange itthrough
the Web towards search,customization of
contents and navigation and
automation of
services. As a Web Service, ContextKernel
allows applicationsto
interoperate seamlessly in heterogeneous settingsof hardware
andsofiware
such asthe
Web. In addition, being responsible for the storage and retrievalof
context information, Context Kernel also contributes to keep the integrityof context
information.Although the Web Services approach has some limitations
—
security,routing,
re—configurability and
performance issues —
new technologies [IBM, 2001],architec- tures
[Kleijnen and Rain, 2003] andmethods
[Arsanjani et al., 2003] arematuring to
achieve acceptable service level characteristics and migrate to afull service-oriented ar- chitecture that makes available useful business services. However, provided theaccess
to context informationitself
is a concern, context-aware applicationsthat
wouldrun
inrestricted
environments could also make useof
a solution as that adopted byContext
Kernel.At the
present time
we areworking
on the limitations described in Section 6,firstly
on the querying support.As
futurework
we aim at extending the Context Kernelinfras-
tructure by implementing an enhanced and evolutionary model forstoring
andretrieving
context informationthrough
web—basedontologies inorder to achieve agreater
levelof
se-mantic
interoperability among context-aware applications. Moreover, someapplications
have been chosen for integrationwith
the Context Kernel infrastructure, such as CoTeia and iClass.References
Abowd, G., Mynatt, E. D., and Rodden, T. (2002). The human experience.
Pervasive
Computing, l(l):48-—57.Apache
XML Project (2002). Apache Xindice. Available online inhttp
://xml
.apache
.org/xindice/.
Arruda Jr, C. R. E., Buloao Nero, R. F., and Pimentel, M. G. C. (2003). Open context—
aware storage as a web service. In
Proceedings of
theInternational
Workshop onMid-
dlewarefor
Pervasiveand
Ad—Hoc Computing heldas part of
the ACM/IFIP/USENIXInternational
Middleware Conference. 7p.Arruda Jr, C. R. E. and Pimentel, M. G. C. (2001). Projeto e implementacfio de
um
sis—tema colaborativo de edicao. Revista
Eletrénica
deIniciacdo Cienafica
doSociedade Brasileira
de Computacfio (REIC),I.
In Portuguese.Arsanjani, A., Hailpem, B., Martin, J., and Tarr,P. (2003). Web services: Promises and compromises. ACM Queue (WebServices), l(1):48—58.
Brotherton, J.A., Abowd,G.D., and Truong, K.N. (1999). Supporting capture and
access
interfaces for informal and opportunistic meetings. Technical Report GIT-GVU-99-06, Georgia Instituteof
Technology.Burner, M. (2003). The deliberate revolution. ACM Queue (WebServices), 1(1):28—37.
Burrell, J., Gay,G. K., Kubo, K., and Farina, N. (2002). Context—aware computing: A test case. In Proceedings
of
theInternational
Conference on Ubiquitous Computing,pages
1-15.Cattclan, R. G., Andrade, A. R., Rocha, C. F. P., and Pimentel, M. G. C. (2003). iClass:
um
sistema para captura e acesso de sessoes em ambiente educacional. RevistaEletrénica
de Iniciaccio Cientificada Sociedade Brasileira
de Computacdo (REIC), 3(1). 19p. (In Portuguese).Cheng, S., Garlan, D., Schmerl, B., Sousa,J. P.,Spitznagel, B., Steenkiste, P.,and Hu. N.
(2002). Software architecture-based adaptation for pervasive systems. In
International
Conference on Architectureof
Computing Systems(ARCS ’02): Trends in Networkand
Pervasive Computing, pages 67—82.Dey, A.K.(2001). Understanding and
using
context.Personaland
Ubiquitous ComputingJournal,
5(1):4~7.Dey, A. K., Abowd, G.D., and Salber,D.(1999). Acontext—basedinfrastructure for smart environments. In
Proceedings of
theInternational
Workshop onManagingInteractions
inSmart
Environments, pages 114—128.Fremantle, P.,Weerawarana, S., and Khalaf, R.(2002). Enterprise services. Communica- tions
of
the ACM,45(10):77—82.Garlan, D., Siewiorek, D., Smailagic, A., and Steenkiste, P.(2002). Project Aura: Toward distraction-free pervasive computing.
IEEE
Pervasive Computing, I(2):22—3l.Hess, C.K., Roman, M., and Campbell, R.H.(2002). Building applications
for
ubiquitous computing environments. InProceedings of
theInternational
Conference on Pervasive Computing, pages 16—29.Hong, J. I. (2002). The Context Fabric: an infrastructure forcontext—aware computing. In
Proceedings of
the ACM Conference on Computer-HumanInteraction,
pages554—555.Hong, J. I. and Landay,J. A. (2001). An infrastructure approach
to
context—aware com- puting. Human-ComputerInteraction
(HCI)Journal,
16(2—3).IBM (2001). Web Services Invocation Framework. Available online inwww—
106
.ibm
.com/developerworks/ l ibrary/ws
—wsi f
.html.
Kleijnen, S. and Raju, S. (2003). An open web services architecture. ACM Queue (Web Services), 1(1):38—46.
l4
Lyytinen, K. and Yoo, Y. (2002). Introduction. Special Issue: Issues and
challenges
in ubiquitous computing. Communicationsof
the ACM,45(12):62.65.
McKusick, K. (2003). Interview
with
Adam Bosworth. ACM Queue (Web Services), 1(1):12—21.Salber, D., Siewiorek, D. P., and Smailagic, A. (2001). Supporting
mobile workgroups on
a wireless campus. InProceedings of
the ThirdInternational
Workshop onHuman
ComputerInteraction
with Mobile Devices.Schilit, B.N., Adams, N., Gold, R., Tso, M., and Want,R. (1993). The ParcTab mobile computing system. In
Proceedings of
the Workshopon WorkstationOperating
Systems, pages34—39.Stal, M. (2002). Web Services: beyond component-based computing. Communications
of
theACM, 45(10):71—76.Truong, K. N., Abowd, G. D., and Brotherton, J. A. (2001), Who, What, When, Where, How: Design issues
of
capture & access applications. InProceedings of
theInterna- tional
Conference on Ubiquitous Computing, pages 209—224.W3C (2001). XML Schema, W3C Recommendation. Available
online
inhttpz//
www. w3.
org/TR/xmlschema— 0/.
W3C (2002). Web Services Activity. Available online in
http
:/ /www.w3 .org/
200 2
/ws.
W3C (2003a). Simple Object Access Protocol (SOAP) 1.2,W3C Proposed
Recommen-
dation. Available online inhttp
2//www
.w3 .org/TR/soaplz —partO/.
W3C (2003b). Web Services Description Language (WSDL) 1.2,Working Drafi. Avail- able onlinein
http
://www.
w3 .org/TR/wsdll2/.
Want, R., Hopper, A., Falco,V., and Gibbons,.1.(1992). The active badge location system.
ACM Transactions on Information Systems, 10(1):9l—102.
Weiser, M. (1991). The computer