Context Based Service Discovery Algorithm for Ad Hoc Mobile Cloud

9 downloads 2685 Views 356KB Size Report
address this challenge, Ad-hoc Mobile Cloud (AMC) paradigm has evolved, where web services are hosted and provided by mobile peers. However, there are ...
Context Based Service Discovery Algorithm for Ad Hoc Mobile Cloud Dominic Afuro Egbe, A.O. Akingbesote, M.O. Adigun Computer Science Department University of Zululand, UZ Kwadlangezwa, South Africa [email protected] Abstract—Proliferation of Cloud markets has created influx of e-service consumers seeking cost effective services. But, mobile consumers face the challenge of intermittent internet disconnection, long latency, and high energy consumption. To address this challenge, Ad-hoc Mobile Cloud (AMC) paradigm has evolved, where web services are hosted and provided by mobile peers. However, there are three inherent challenges in AMC service discovery. The first is how to discover the node that has the context capability of providing the needed service. Second, the dynamic nature of the environment in terms of node mobility and third, is the issue of resource limitation. While literature has done much on the second and third challenges, the issue of the context of the service provider node is yet to receive much attention. On the other hand, most attempt to address the first challenge have been in the perspective of MANETs, where services are either hardware or software entities. Hence discovering services is based on best routes and node availability without necessarily considering the context of the provider’s node. This discovery approach has great impact on quality of service like the response time. To tackle this, we propose a context based service discovery algorithm. The algorithm uses a Search All Pick One Algorithm (SAPOA) to discover the closest service based on the provider’s context. An experiment is conducted using 10 nodes with 4 services. Our result provides the best service based on the trade-off between context battery level and distance. Keywords— Adhoc Mobile Cloud; Device context capability; node distance; SAPOA

I. INTRODUCTION A Potentially noticeable phenomenon in the last decade is the proliferation of e-markets and the rapidly expanding mobile consumer base [1]. This trend has led to the emergence of mobile web services – web services that are provisioned from mobile devices, accessed and invoked by peer nodes. Interesting, there is increasing demand for such services owing to the growing number of mobile devices and the fascinating evolution in the capabilities of such devices [2], [3]. The envisioned prospect of mobile web services has, in recent years drawn research attention towards advancing mobile web service provisioning as well as developing platforms to support it [4], [5]. 978-1-4673-8743-9/16/$31.00 ©2016 IEEE

M.B. Mutanga Department of Information and Communication Technology Mangosuthu University of Technology, MUT Durban, South Africa [email protected] This has brought about the issue of Mobile Cloud Markets. The proliferation of cloud markets has created influx of e-service consumers seeking cost effective services. But, mobile consumers face the challenge of intermittent internet disconnection, latency, and high energy consumption. To address this challenge, ad-hoc mobile cloud (AMC) paradigm has evolved, where web services are hosted and provided by mobile peers. AMC is an emergent cloud paradigm that takes advantage of mobile web services. This paradigm presents a platform for inexpensive and collaborative resource provisioning similar to the cloud setting. Such a platform is formed by a set of mobile devices (nodes), each having the capability to serve both as a server and, at the same time, a client of web services. These nodes communicate over radio and operate without the benefit of any infrastructure thereby creating an opportunistic resource sharing platform. Such characteristics make AMC an ideal solution for scenarios with weak or no internet connection. Apart from complementing the cloud, AMC can significantly minimize monetary cost for small computing communities like SMMEs by reducing internet subscription charges as well as avert other huge capital investments associated with infrastructure. Fundamentally, every service oriented environment requires a kind of service discovery mechanism. Web service discovery is the process of locating a web service that satisfies client’s requirement. Technically, the process of service discovery links clients to services. This linkage makes service discovery the core task in the web service model because it plays a major role in guaranteeing clients patronage, in addition, is the fact that web services may not be useful if they cannot be discovered. In AMC, service discovery is a significant challenge [6]. This challenge is associated with the fact that services are not hosted on readily accessible and centralized locations. Unlike cloud and the conventional web services platforms where services are hosted on remote servers and centralized registries respectively, in AMC, web services are hosted on peer nodes. The problem with the latter is twofold. First, mobile devices are resourced-constrained and have dynamic contexts, both of which impacts on service discovery [6]. Second, discovering a

service in AMC first entails discovering a node that has the right service and the capability in terms of its current context to provide the needed service at the time of request. In principle, it means that a node itself is considered to be a composite service (a service that contains a service or services). Therefore, there are two dimensions to service discovery in AMC – discovering a node service and discovering the actual web service. We focus on the first dimension. Research efforts in this domain have mainly focused on using hope-count while the use of comprehensive device context has been less explored. Our idea is based on the fact that while a relevant service may be discovered, the context of the provider node can greatly affect quality of service or the entire discovery process. For instance, if a client invokes a service from a host that is too far away, response time is negatively impacted [7]. Also, if the context capability of the device like battery level or memory is low, the discovery process may be grounded. In this paper, we propose a Search All Pick One Algorithm (SAPOA) for AMC that is based on inter-node distance and device context capability. This algorithm uses the node distance and device context capability (battery Level) as the user’s quality of Service preference probability to discover the best services. II. LITERATURE REVIEW Over the past few years, research attention has been directed towards optimizing specific parts of current web service discovery. Such optimization is mainly aimed at designing web service discovery mechanisms that are more tailored to fit the constraints of mobile domains. Some of the aspects in service discovery that have been greatly optimized include semantic reasoning [8]; context-aware discovery [9], [10]; resource efficient discovery [6], [11], [12]; location-based mobile services and capacity-driven service discovery [13], [14]. Currently, researchers have improved several other areas in web services discovery in line with the limited capabilities of mobile devices. However, in the context of ad hoc mobile cloud, all the researches highlighted above only focuses on the dimension of service discovery that deals with how to discover actual services as explained in section 1. Most works have looked into the other aspect of service discovery (nodes discovery) in the perspective of MANETs, where services are either hardware or software entities [15]. For example, the work in [16] presents a model-based service discovery mechanism for mobile systems. The authors aimed to achieve platform independent service discovery for pervasive domains using the Model-Driven Approach (MDA). Like the other works in AMC, this work only focused on actual services discovery. In the work reported in [7], [17], a similar approach towards determining an efficient route from source to destination node is presented. Both works considered the use of distance between source and destination amongst others, as an important parameter in choosing the best route. Another prominent research effort in this direction is reported in [18]. The “work polarized gossiping algorithm” proposes a probabilistic protocol for path discovery. The main idea is to

determine the most appropriate destination node based on its proximity to the source node without the use of external location service support like GPS. We appreciate the works of these authors for providing us an insight in the area of service discovery for examples [8], [9] and [10]. However the shortfalls observed from these works have given us the opportunity to contribute to the body of knowledge. For examples, the work of [8], [9], [10], [11] and [12] focus mainly on actual service discovery using distance without looking at the context capability of the service and the distance together. This is because a service may have the shortest distance with less device context capability. For example, a service with short distance of say 10m with low battery power may not be good for a client who wants to run high powered job. Apart from this, most works also based their work on MANET rather than viewing services from both hardware and software concept. This work is differentiated from the aforementioned authors by the introduction of our Search All Pick One Algorithm (SAPOA) for AMC. The algorithm discovers services based on device context capability and distance as against the conventional one dimension location based approach. III. THE AMC SERVICE DISCOVERY FRAMEWORK The proposed service discovery is depicted in Fig. 1. The framework is made up of two major components: the first is the user interaction data component while the second is the discovery component. A. Interaction and Data Component There are four sub-components that constitute this component. These are: request interface, the controller, service advertisement modules and the lightweight database. The framework utilizes simple keyword-based service search interface as against semantic approach. This keyword-based approach minimizes resource consumption, which is a major requirement in resource constrained domains. When service requests are launched, they are coordinated by the controller module. The controller is responsible for fetching the appropriate node that meets the requested consumer’s or client’s demand by invoking the node discovery algorithm. This discovery algorithm searches for all nodes that meet the preference of the client. After this, it then decides the best service out of those that meet the requirement. This is achieved through the use of our service advertisement subcomponent (see Fig. 1) that acts as a temporal registry or catch. This is because AMC is infrastructure-less; therefore a decentralized service discovery approach is the most ideal approach to adopt in our own opinion. In our model, the catching process allows mobile nodes to temporally hold services advertisements from peer nodes. Such advertisements include dynamic information like node ID, services offered, battery level, and node distance. This is shown in Table 1. In this table, for example service Id 001 is connected to two nodes (2, 3). The distance from this node to node 2 is 10 and that of node three is 20. The capacity of this node based on battery level and memory are 25% and 5 MB respectively. Our argument for using the cache is based on the fact that

Fig. 1. Ad hoc mobile cloud service discovery framework

advancements in mobile operating systems (OS) such as Android have now made it possible to incorporate lightweight relational databases to mobile devices. There are several lightweight databases such as BerkeleyDB, CouchbaseLite, LevelDB, SQLite, and UnQLite. NID 001 002 003

TABLE I. DYNAMIC SERVICE DISCOVERY TABLE PROFILE Connected Distance Service Context Capability nodes Offering Batt.Lev Mem. (%) (MB) 2,3 10, 20 K1 25 6 4,5 20,13 K1 12 7 4,6 15,10 K2 15 8

B. The Discovery Component The discovery component works with the container. It consists of three sub-components. These are: the Service Discovery Engine (SDE), the Node discovery Engine (NDE) and the Context Manager (CM). The Node discovery Engine (NDE) deals with node information and the services being provided by such mobile node. The Service Discovery Engine (SDE) has the profile of the device context capability information as related to each service. The context manager manages the flow of profile and other related information in the system by interacting with the SQLite database to extract static context. The crux of our work is under the container. We are mainly concerned in this study on the discovery algorithm that searches the node discovery and the service discovery engines with the aid of the cache on receiving a service discovery query from the clients. We propose a Search All Pick One Algorithm (SAPO) and the two metrics we consider are the distance and the battery level. What this algorithm does on receiving client request is to search all the nodes in the NDE based on the client’s preference QoS required to see all the matches. This

provides information about all the nodes with shortest route that have that service and the distance through the cache as earlier discussed. The SAPOA then connects the SDE to demand for the device context capability of such nodes. For example let us say node 1 with battery level of 56% is making a request for the best service that offers K1 service (See Table 1 or Fig. 3). The SAPOA (See Table 2) searches for all services that meet the requirement (K1) in the network and their distances from the NDE of our framework. The SAPOA then connects the SDE to get the device context capability (Battery Level). The next is to now decide the best service out of all that meet the requirement (See Fig. 3). This then becomes a decision issue. Our SAPOA algorithm solves this by first normalizing the available information using (1) and (2) as described in [19] for even distribution purpose. The SAPOA then incorporates Analytical Decision Algorithm to rank the service. Our best service discovery tree is shown in Fig. 2. In this Fig., the square represents the decision point and the circle represents the chance event. Therefore, the three branches from the decision point represent the three alternate services A,B and C respectively. Next is the two chances emanating from the chance event 2, 3 and 4 with their preference probability and payoff attached. By payoff in this context we mean the distance and the battery level values respectively. The composite weight or the Expected payoff (EVi) of each service is calculated as the product-sum of the preference probability (P1, P2, P3), the distance and the battery level (a11, a12,, a13) as shown in Fig. 2. The preference probabilities are called the state of the nature and we may have n states of nature and m alternative services to be discovered. In general, if pi(>0) is the preference probability supplied by the client for state j and aij is the payoff of the alternative service i , given state j(i=1,2,…..m: j=1,2,…..n), then the expected payoff for alternative i is given in (3).

­° Q j max − Qi , j if Q max j - Q min j ≠ 0 Vij = ® max min if Q max j - Q min j = 0 °¯ Q j − Q j

(1)

­° Qi , j − Q j min if Q j max - Q j min ≠ 0 Vij = ® max min min max if Q j - Q j = 0 °¯ Q j − Q j EVi = ai1 p1 + ai 2 p 2 + … + ain p n Where i = 1, 2, …, n and

¦

k

i −1

pi = 1

(2)

(3) (4)

Our SAPOA best service is then the service with the highest Expected payoff (EVi). That is, Max {EVi, …, EVi} which is the highest composite weight as shown in Fig. 2. In this research, the issue of cost inclusion is not considered. We hope to address that in future. The SAPO algorithm is show in Table 2. TABLE II. THE SAPOA ALGORITHM // input the client’s node and battery level CnodeÅCn CblevÅCb // expected minimum metric parameter Input eblev Array node[maxnode] Array listsearch[maxsimilarlist] Array P(maxnode, maxsimilarlist) Array V(maxnode, maxsimilarlist) Call discoveryservice If a= “nf” then Report (No Found” Stop endif end stop // discover all services that meet requirements discoveryservice() j=1 for i = 1 to maxnode do if i = cn then skip search node(i,Cn,Cb) if search node(i,Cn) Å true then search node(i,Cb) P[i,j] Å node(Cn, Cb) endif endif end do //Normalized P = (Pij ; 1” i ” n ; 1, ” j ” m ;) for( i=0; i