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