Querying and Updating a Context-Aware Service Directory in Mobile
Christos Doulkeridis and Michalis Vazirgiannis
DB-NET Research Group, Department of Informatics
Athens University of Economics and Business (AUEB)
Athens 104 34, Greece
Abstract Current standardization efforts regarding service direc-
tories, like UDDI and ebXML, present certain limitations.
Several interesting research directions material- In , the authors achieve service categorization based on
ize through the convergence of mobile computing and WSDL descriptions, which proves restrictive, when trying
service-oriented computing. As mobile devices keep get- to address issues like mobility of services, semantic discov-
ting smaller, cheaper and more sophisticated, their use ery and context-awareness. Therefore, research initiatives
is becoming a commodity. We envision future scenar- have tried either to enhance service directories [1, 6, 12] or
ios that involve mobile devices acting not only as re- to identify new research challenges .
questors, but as providers of data as well. In order to hide The WASP project  extends the functional-
the heterogeneous nature of web data, service-oriented ar- ity of UDDI by introducing UDDI+, an attempt to
chitectures are adopted. Nevertheless, existing service improve the existing service discovery mechanisms re-
discovery mechanisms usually focus on exact or seman- garding semantic and contextual features. However, this
tic matching of static attributes, thus ignoring contextual approach is technology-speciﬁc, depending on previ-
parameters. We argue that context for mobile web ser- ous work concerning UDDI and DAML-S , whereas our
vices plays an important role in service discovery by approach is an external and independent model that en-
increasing the precision and efﬁciency of the search. We ex- ables context-based indexing within any service directory.
plain our notion of context regarding mobile services The CB-SeC framework  attempts to enable sophisti-
and describe query evaluation, updating and merg- cated discovery and composition of services by combin-
ing of context-aware service directories. ing agent-oriented and context-aware computing. Its notion
of context is similar to our approach, but the representa-
tion is different. Modelling the contextual information is
1. Introduction & Motivation achieved by means of a recursive function, whereas our ap-
proach is more data-centric. Lee et Helal  also rec-
Mobile services have emerged by the convergence of ognize the limitations of existing service discovery ap-
mobile and service-oriented computing as a novel category proaches and argue in favor of providing support for
of pervasive computing . While the usage of mobile de- context-awareness by means of service registries. The au-
vices keeps getting part of our daily life more and more, the thors introduce the notion of context attributes, as part
capabilities of the same devices are enhanced, thus moving of the service description, which allow dynamic evalua-
away from the client application perspective and towards tion of contextual parameters to enhance service discov-
scenarios of small, ad-hoc mobile service providers . In ery.
this respect, mobile devices can provide access to their data Throughout this paper, a use-case scenario will be
through mobile services, thus hiding the heterogeneous na- adopted to demonstrate the usefulness of our approach.
ture of data scattered around the world, while providing Consider the case of a tourist, Chris, who carries a mo-
a common, universally accepted, machine-understandable bile device with limited capabilities to access world-wide
way to exchange information . spread information from practically anyplace, while vis-
iting Athens during the Olympic Games. On arrival at
∗ This research is partially supported by EU IST project DBGlobe (IST- the airport, the tourist wants to collect electronic ho-
2001-32645) under the FET Proactive Initiative on Global Computing tel brochures to choose the best accommodation, according
to his interests. Thus, Chris initiates a search for web ser- Image Retrieval Services
vices that provide hotel information, by entering a couple of &1
keywords, such as: hotel, accommodation. After some sec- [location=Acropolis]
onds the result of the search is depicted on the small &2
screen of the device. This comprises a long list of web ser- [time=09:00] [time=10:00] [time=09:00] [time=14:00] [time=09:00]
vices and their short descriptions, that return information &6 &7 &8 &9 &10 &11 &12 &13 &14 &15
about accommodation facilities. At ﬁrst, as Chris tra- [image=jpg]
verses through the services, he ﬁnds hotels located in other &16
&20 &21 &23 &24 &25 &26 &27 &28 &29
countries. Having found a web service that actually con- [user=Chris]
[user=Nikos] [user=Stratis] [user=Michalis] [user=Joan]
[user=John] [user=Maria] [user=Chris] [user=Niki] [user=Sue] [user=Kostas]
cerns the area around his current location, he invokes #2
#5 #41 #5
#1 #43 #17 #14 #6 #44
it, only to see that it returns a pdf brochure that his de- #3
#18 #15 #7
vice cannot display. Finally, when he ﬁnds a web service #19
that returns results that can be displayed, he is disap-
Figure 1. A context-aware service directory
pointed to see that the hotel is very expensive.
that contains image retrieval services.
Several implications and disadvantages of this discovery
process materialize through this scenario. First, the data vol-
ume sent to the device is extremely large, when compared
We focus on context modelling for web services and we
to its small storage space. Then, the precision of the search
choose a model adopted from previous work on context-
is small, since it ignores various important factors that af-
dependent representations : context is represented by a
fect the user’s request. Moreover, the whole process is time-
set of dimensions that take one or more discrete values .
consuming and annoying for the user, who downloads infor-
For example, on arrival at the airport, the context of the im-
mation that while relevant, cannot be processed by his de-
age retrieval services that Chris provides from his device is:
vice. Obviously a context-aware service directory  would
facilitate service discovery and increase its precision.
Each service category is represented by a graph, which is
The contribution of our work consists of: (a) motivating
formed by combining different contexts of services. A set
the importance of context for web service discovery, espe-
of such service categories form the service directory. Ser-
cially in mobile environments, (b) increasing the efﬁciency
vices are modelled as leaves of the graph (circular nodes).
and quality of the service discovery procedure, and (c) in-
Each service category may contain different contextual di-
troducing update algorithms and a query formulation mech-
mensions. The morphology of the graph is similar to a tree,
anism for a context-aware service directory.
but there can exist leaves, which belong to different subtrees
The rest of this paper is organized as follows: section 2
(i.e. service nodes pointed by more than one edge, being
deals with querying a context-aware service directory and
valid for different contexts). Note that the approach is: (a)
shows how it increases the precision of the search. Sec-
generic, in the sense that it is oblivious of the actual model
tion 3 presents basic algorithms for updating the context-
of the directory and (b) complementary to existing efforts
aware service directory. In section 4, we present the prelim-
of standardizing service directories (UDDI, ebXML).
inary experiments we have performed and ﬁnally section 5
The contextual query (Qcxt )  is issued against the
concludes the paper and explores future research directions.
context-aware service directory to match relevant mobile
services. Consider the graph of ﬁgure 1, which represents
2. Querying a Context-Aware Service Direc- a context-aware service directory and more speciﬁcally,
tory the service category of image retrieval services. Image re-
trieval services are differentiated according to relevant di-
In this section, we describe the formulation of queries is- mensions of context, in particular: location, time, type of
sued against the service directory and we explore how query image, and user identity. In our scenario, Chris wants to
evaluation is performed. In previous work , we have in- visit picturesque locations in Athens and share his images
troduced a context-aware service directory as a mechanism with other tourists near him. He publishes a service on his
to facilitate service discovery based on contextual parame- mobile device that makes available images of type jpg. As
ters. Furthermore, we have discussed in detail how service he walks, the service is made available at 10:00 in Acropo-
discovery is performed based on context. lis and at 12:00 near Plaka (the oldest section of Athens and
In mobile and dynamic environments where users move arguably the nicest neighborhood in central Athens). Now,
frequently, it is important to enable ad-hoc search queries. consider another tourist who also visits Acropolis shortly
A simple and convenient way is to support keyword-based after 10:00 and wants to ﬁnd pictures of Acropolis to store
search queries. This approach enables the user to express in her PDA. She enters the keywords:
(to the best of his knowledge) what he seeks. Qusr = (photos,Acropolis)
Algorithm: MergeDirectories Directory A (DA ) Directory B (DB )
Input: Root1, k, Root2, j, [d1 = v1 , ..dj−1 = vj−1 ] &1
[d i = vi1 ] [d i = vi4 ]
Output: Root1 [di = vi2 ] [di = vi3 ]
1 Node n &2 &3 &4 &5
[dj = vj1 ] [dj = vj3 ]
2 Context cxt // for example: [d1 = v1 , d2 = v2 , ..] [dj = vj1 ] [d = v ]
[dj = vj1 ]
[d j = vj3 ]
[dj = vj2 ]
[dj = vj4 ] [d j = vj5 ] [d j = vj2 ] [d j = vj5 ]
[dj = vj3 ]
[dj = vj2 ]
3 Find RA ∈DA for context [d1 = v1 , ..dj−1 = vj−1 ] &6 &7 &8 &22 &23 &9 &10 &11 &12 &13
&21 &22 &23
[d k = vk2 ]
4 n = RA [d k = vk1 ]
[dk = vk1 ] [dk = vk1]
[dk = vk1] [dk = vk2] [dk = vk1 ] [d k = vk1 ] [dk = vk1 ]
[dk = vk1]
[d k = vk3 ]
[dk = vk2] [dk = vk2]
5 // for every service in DB execute the [dk = vk1] [d k = vk3 ]
[dk = vk3 ] [dk = vk1] [dk = vk2 ]
#40 #41 #43 #44
6 // algorithm InsertNewService for DA #1 #2 #4 #5 #41 #43 #44 #6 #8 #10 #13 #14 #16 #17 #42 #45
7 for each servID ∈DB #3 #40 #42 #45
#7 #9 #11
8 Find the context (cxt) of service servID #x : Service
Update DA by attaching
&y DB under [di = vi2 ]
9 InsertNewService(n, servID, k-j+1, cxt) node
10 endfor Figure 3. Merge DA , DB for context [di = vi2 ].
11 return Root1
Figure 2. Algorithm for merging directories.
generality, let us assume that one of the directories, say DA ,
contains a superset of the dimensions of the other. Notice
to initiate a search for suitable services and at the same time that this a reasonable assumption, since merging is useful
a contextual query is formulated: only for similar service categories that use similar dimen-
Qcxt = (location=Acropolis,time=10:05,image=(jpg,gif)) sions. Then, merging service directories is accomplished by
that captures her location, the current time and the capabil- merging the corresponding service categories. Moreover, by
ities of her device. The evaluation of Qcxt on the service means of the restructuring procedure , it is always pos-
directory focuses on the left subtree of the graph (for lo- sible to transform the dimension hierarchies of the directo-
cation Acropolis) and returns service with id: 1, which be- ries in the form:
longs to Chris, and ignores service with ids: 2 and 3 that re- DA = d1 , .., dj , .., dk and
turn mpg ﬁles. As you see, even for a simple example, the DB = dj , .., dk
precision of the search is increased and the results are re- Figure 2 describes the procedure of merging two directo-
ﬁned in terms of the relevant context. ries. Our algorithm ﬁnds in directory DA the node RA with
context [d1 = v1 , ..dj−1 = vj−1 ] (line 3). Then, for each
3. Updating a Context-Aware Service Direc- service that exists in DB , its context is retrieved (line 8)
tory and subsequently the algorithm InsertNewService  is ex-
ecuted (line 9) in order to insert the service in DA .
In this section we discuss about updating the service di- In ﬁgure 3 two service directories are depicted, namely
rectory structure. Note that construction and search algo- DA and DB . Services in DA and DB are deﬁned by 3 and
rithms have been presented in . Assuming a ﬁxed set of 2 dimensions of context respectively. The updated directory
contextual dimensions, we focus on update operations re- DA contains two kind of nodes: white nodes that used to be-
garding (sets of) services and context values. While inser- long to DA in its initial form, and grey-colored nodes that
tion of new services and updates of the context of services used to belong to DB . The ﬁgure gives an intuition of the
are discussed in , we focus here on Merging Directories. notion of merging two context-aware directories.
3.1. Merging Directories 3.2. Complexity Analysis
In order for a mobile, ad-hoc system to be scalable, a Consider a service directory that contains n services, and
major issue is to move from centralized architectures to dis- k contextual dimensions. Assume that each dimension can
tributed solutions. The management of distributed context- take up to m distinct values. Further on, let us assume a
aware service directories is a step towards this direction, ’complete’ or ’dense’ graph, i.e. m edges starting from ev-
particularly for peer-to-peer systems that dynamically re- ery node. In , we have discussed the similarity of the
conﬁgure their organization by replacing a number of peers graph structure with multiple way (m-way) search trees.
with a super-peer. This highlights the need for merging di- With respect to these results, the mean value of the num-
rectories in mobile, peer-to-peer environments. ber of node accesses for InsertNewService is :
Let us consider the case of updating a directory DA by Eins = m/2 ∗ k = O(mk)
merging with another directory DB . Without restriction of and for MergeDirectories of directories DA and DB :
peer environments and we will explore novel aspects (di-
Performance of MergeDirectories
for m=7 values per dimension mensions) of context. Another interesting research direction
concerns the support of inexact matching in the service dis-
80 k=4 covery process, with respect to context.
100 200 300 400 500 600 700 800 900 1000
Number of Services (n)
 R. Akkiraju, R. Goodwin, P. Doshi, S. Roeder. A Method for
Semantically Enhancing the Service Discovery Capabilities of
Figure 4. Performance of MergeDirectories. UDDI. In Proc. of Workshop on Information Integration on the
Web (IIWeb-03), Acapulco, Mexico, August, 2003.
 C. Doulkeridis, E. Valavanis, M. Vazirgiannis. Towards a
Emer = nB ∗ (C + Eins ) = Context-Aware Service Directory. In the Proceedings of the
nB ∗ C + nB ∗ mA /2 ∗ kA = O(nB (C + mA kA )) 4th VLDB Workshop on Technologies on E-Services (TES’03),
where C is a function of mB and kB , concerning the cost Berlin, Germany, September, 2003.
of ﬁnding the context of a service in DB .  C. Doulkeridis, M. Vazirgiannis. Querying and Updating
a Context-Aware Service Directory in Mobile Environments.
Technical Report, DB-NET Research Group, Athens, 2004.
 S. Helal, N. Desai, C. Lee, V. Verna. Konark - A Service Dis-
covery and Delivery Protocol for Ad-hoc Networks. In Proc.
In this section, we present some experimental results
of the 3rd IEEE Conference on Wireless Communication Net-
concerning the performance of the algorithm: MergeDirec- works, (WCNC), New Orleans, Louisiana, March, 2003.
tories. All algorithms are implemented in Java and our ex-  B. Hofreiter, C. Huemer, W. Klas. ebXML Status, Research Is-
periments are performed in main memory on a Pentium IV sues, and Obstacles. In 12th Int. Workshop on Research Issues
with 256MB RAM. Given two graphs representing two ser- on Data Engineering (RIDE02), California, February, 2002.
vice directories, we measure the time required for merging  M. Jeckle, B. Zengler. Active UDDI - an Extension to UDDI
the directories for a speciﬁed context. An intuition of the for Dynamic and Fault-Tolerant Service Invocation. cite-
form of the directories DA , DB used in our experiments seer.nj.nec.com/552374.html, 2002.
is depicted in ﬁgure 3. DA contains all contextual dimen-  S. KouadriM., B. Hirsbrunner. Towards a Context Based Ser-
sions of DB , plus one extra dimension, which is placed di- vice Composition Framework. In the Proc. of the 1st Int. Conf.
rectly under the root. For example, when we measure the on Web Services (ICWS’03), Las Vegas, USA, June, 2003.
time for k = 5 dimensions, m = 7 values per dimension  C. Lee, S. Helal. Context Attributes: An Approach to En-
and n = 500 services, this corresponds to directories: DA able Context-awareness for Service Discovery. In the Proceed-
ings of the 2003 Symposium on Applications and the Internet
with k = 5 dimensions, m = 7, n = 500 and DB with
(SAINT’03), Orlando, FL, USA, January, 2003.
k = 4, m = 7, n = 500 (different services from those in
 M. Paolucci, T. Kawamura, T.R. Payne, K.P. Sycara. Seman-
DA ). The result of the experiment is the updated DA with tic Matching of Web Services Capabilities. In Proc. of the 1st
k = 5 dimensions, m = 7, n = 1000 services. Int. Semantic Web Conf. on The Semantic Web, Sardinia, Italy,
Figure 4 shows how the performance of the algorithm June, 2002.
degrades as the number of contextual dimensions increases.  S. Pokraev, J. Koolwaaij, M. Wibbels. Extending UDDI with
According to our scenarios of use, typical values for k range Context-Aware Features Based on Semantic Service Descrip-
from 2 to 7 and m ranges from 4 to 10. However, we intend tions. In Proc. of the 1st Int. Conf. on Web Services (ICWS’03),
to continue our experiments towards exploring the scalabil- Las Vegas, USA, June, 2003.
ity of the algorithm for larger numbers of k, m and n.  M. Satyanarayanan. Pervasive Computing: Vision and Chal-
lenges. IEEE Personal Communications, August 2001.
 A. ShaikhAli, O.F. Rana, R. Al-Ali, D.W. Walker. UDDIe:
5. Conclusions & Future Work An Extended Registry for Web Services. In the 2003 Sympo-
sium on Applications and Internet Workshops (SAINT-w03).
In this paper, we showed the importance of context in  Y. Stavrakas and M. Gergatsoulis. Multidimensional
mobile service discovery and we described an approach that Semistructured Data: Representing Context-dependent Infor-
increases the efﬁciency and quality of service discovery. We mation on the Web. In Proc. of the 14th Int. Conf.
motivated the use of a context-aware service directory, we on Advanced Information Systems Engineering (CAISE’02),
examined how querying is performed and we discussed up- Toronto, Canada, May 2002.
dating the directory. Furthermore, we presented some initial  E. Valavanis, C. Ververidis, M. Vazirgiannis, G. C. Polyzos,
experimental results. K. Norvag. MobiShare: Sharing Context-Dependent Data and
Our future work will focus on the synchronization of Services from Mobile Sources. In Proc. of IEEE/WIC Int. Conf.
context-aware service directories in decentralized, peer-to- on Web Intelligence (WI’03), Halifax, Canada, October, 2003.