Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

The introduction of cloud computing leads to a new era in utility computing, where the computing power is offered as a service [1]. The combination of Mobile technology with cloud computing radically changed the perspective of distributed application processing in mobile devices. The benefits that can be utilized by the end user are reduced cost, improved performance and higher scalability. The mobile devices having resource intensive components which will affect the battery charge. But we can’t even offload the entire application to the cloud also. The total application offloading is not possible because majority of the applications are using the local resources like global positioning system, camera and other sensors [2]. So for offloading the application to cloud the application should be spitted into different groups according to some granularity levels. The parts which are highly resource intensive are offloaded to the cloud and system dependent parts are executed at the mobile device itself. The implementation of above model introduces the problem of communication cost between the components that reside at the mobile side and the components at the cloud side.

The deployment should be optimized based on both the mobile user and cloud provider perspective. All the remote components should be deployed to a virtual machine with enough CPU power while reducing the communication cost between the local and the remote components. One more constraint that is introduced is the security of the parts which are offloading. The partitioning should be such a way that the most vulnerable parts are retained back in the mobile and the rest of the parts are offloaded to the cloud for remote execution. The major contribution of this paper include

  1. 1.

    We present algorithms to partition an application consisting of interconnected components which will reduce the communication cost between cloud and the mobile and at the same time reduces the security risk incurred due to offloading.

  2. 2.

    Considering the bandwidth as a dynamic variable an adaptive factor is included in the algorithm

2 Related Work

Graph partitioning is one of the fundamental issues in many domain such as task allocation on grid, network partitioning and VLSI design. The graph partitioning deals with cutting the graph into k parts while minimizing the number of edges that are cut. If the k = 2 it is called bi-partitioning which is needed in our problem. Finding a solution for this problem is NP-Hard [3] in nature. Kumar et al. [4] describes a series of offloading strategy and has done an extensive survey on the offloading strategy existing. Kernighan-Lin [5] One of the most popular local graph partitioning algorithm is Kernighan-Lin algorithm. The K-L algorithm starts with the partitioning of vertices in a balance manner that is each partition contain equal number of nodes. It proceeds in a series of passes. During each pass, the algorithm improves the initial solution by swapping pairs of vertices to create a new solution which is having smaller edge cuts if any. This process is repeated until no more subsets are found. This is the local minimum and no improvements can be done to this solution.

A simple min-cut algorithm by Stoer-Wagner [6] proposes a graph cutting those edges with minimum weights. This is one of the fastest algorithm. It works in different phases and at each phase it identifies a pair of vertices for min-cut. Multilevel k-way Partitioning Scheme for Irregular Graphs - Karypis and Kumar [7] introduced a new multilevel graph partitioning technique. It consists of three phases like coarsening, partitioning and un-coarsening. A graph G is initially coarsened into a smaller graph and then bisection is done on that graph. Then the coarsened graph is expanded back to the original graph by periodically refining the partition. Since this decreases the edge cut this is one of the popular methods used.

Graph partitioning - A survey- Ulrich Elsner [8]: this paper describes in detail about all the graph partitioning strategies. Hunt and Scott introduced an automatic distributed partitioning system called Coign, [12] which automatically transforms a program into distributed applications without accessing the source codes. Coign constructs a graph model of the application’s inter-component communication through scenario-based profiling to find the best distribution. Later a graph cutting algorithm is executed to partition the application across the network. One of the advantages of this method is that an end user without source code can change the application into distributed applications.

The paper [13] deals with partitioning of programs in resources constrained devices to enable them to do distributed processing. This also deals with multiple constraints such as minimize energy and maximize performance. Here they are converting the application into Object Relational Graph (ORG) using static analysis and dynamic profiling. Later it is converted into Target Graph. This allows for uniform strategy for different constraints. Ou et al. [10] proposed a class level application partitioning strategy which improves the performance of offloading. It considers a multi-cost graph based model which is implemented in Java. It uses an online decision making strategy for splitting and offloading. the work is based on Heavy Edge Light Vertex Matching algorithm (HELVM). Expensive adaptation decision is the major disadvantage of this method. The work done by Tim et al. [14] proposes an algorithm which minimizes the time required for application execution. They are using Heavy Edge Matching (HEM) for coarsening and K-L for refinement. They uses Java and Adhoc framework for simulation.

3 Problem Statement

In our method the mobile application which is to be offloaded is partitioned into two for local and remote execution. First of all the application should be converted into graph called Weighted Object Relational Graph (WORG). Then taking the bandwidth changes into consideration the graph is broke dynamically. We are making the partition strategy as minimum data transfer and maximum security. So that the application is executed in a distributed manner with minimum transfer cost.

The Fig. 1 shows the architecture diagram for the proposed work. The Weighed object relational graph is calculated for the mobile application using the code analysis. Then the application is partitioned into two parts cloud partition and a local partition using genetic algorithm. The dynamic bandwidth due to mobility of the mobile node is also taken into consideration. Whenever there is a major change in the bandwidth correspondingly the partitions are changed.

Fig. 1.
figure 1

System architecture

3.1 Weighted Object Relational Graph (WORG)

The application is converted into Weighted Object Relational Graph by using Soot Analysis frame work [9]. Figure 2 shows a sample WORG of a face recognition application. Each node is represented as a circle with weight which represents the memory cost for that node. En edge connecting two nodes represents the communication between the nodes with the corresponding costs. Static analysis and dynamic profiling techniques are used to create the WORG from the application. The example shows four classes Face preview, Image capture, Face Detection and Face detection library, where the face preview is the main class and from that image capture and face detection are called.

Fig. 2.
figure 2

Weighed object relational graph (WORG)

3.2 Application Partitioning Algorithm

Let a graph G = (V, E) is the application graph where G is the vertex and E is the edges between the vertices. Each vertex is represented by a cost V i , which depicts the cost of the vertex including the CPU cost, Memory cost and vulnerability factor for each node. The vector is represented as W v . The edge weight represents the communication cost between the components. The adjacency matrix represented by C ij , the value of communication cost(bandwidth) between node V i and V j . If there is any communication cost between V i and V j , Cij represents the weight otherwise C ij  = 0. This is represented by a vector W e . If in the graph we have n nodes and m vertices W v is a vector of length n and Cij is a matrix of n X n. The vulnerability factor for each node can be represented as S i.

The basic idea in security parameter is during offloading the app is divided in such a way that keep the components that have the biggest impact on the vulnerability to the local mobile itself. The vulnerability index depends on various features like call relationships, propagated vulnerabilities, cloud originated vulnerabilities and so on. Here we assume random values as vulnerability index for each node. In the optimized partitioning k modules are offloaded to the cloud. Our problem can be defined as an objective function min (transmission cost) + max (security)

Transmission cost: Minimize

\( \sum\nolimits_{i = 1}^{n} {\sum\nolimits_{j = 1}^{k} {\mathop C\nolimits_{ij} } } \times \left( {\mathop x\nolimits_{i} XOR\mathop x\nolimits_{j} } \right) \times b \) where \( \mathop x\nolimits_{i} \) = 0 if node i is executed on the local machine (mobile) and is equal to 1 if executed on remote machine.

Security cost: Minimize

\( \sum\nolimits_{i = 1}^{n} {\mathop S\nolimits_{i} } \times \left( {1 - \mathop x\nolimits_{i} } \right) \)Which will reduce the security risk of moving the more vulnerable nodes to the cloud. Here the security is preserved by moving less vulnerable nodes to the cloud. The total cost function can be represented as Minimize \( \sum\nolimits_{i = 1}^{n} {\sum\nolimits_{j = 1}^{k} {\mathop C\nolimits_{ij} } } \times \left( {\mathop x\nolimits_{i} XOR\mathop x\nolimits_{j} } \right) \times b + \sum\nolimits_{i = 1}^{n} {\mathop S\nolimits_{i} } \times \left( {1 - \mathop x\nolimits_{i} } \right) \)

The above equation can be solved by Genetic algorithm is one of the evolutionary methods which can be used for graph partitioning [11]. The graph partitioning can be formulated as a multi-constrained optimization problem where the objective function can be formulated as above equation. The inputs to the algorithm can be V - Number of nodes n, E - Number of edges, W v - Node weight vector, W e - Edge weight vector and S n - Vulnerability index vector and the output is formulated as a vector of length n with 0’s and 1’s where 0 represents local and 1 represent remote execution. The basic genetic algorithm can be stated as below.

The above algorithm works as follows. The optimized partition using genetic algorithm is calculated for the current bandwidth and the previous bandwidth. The following facts are considered for change partition

  1. 1.

    If the bandwidth is increasing the partitions which are there in the cloud remains the same and some of the local components are offloaded to the remote site. That is no change in S and some nodes in C will be shifting to S

  2. 2.

    If the bandwidth is decreasing the partition which is there in the mobile remains the same and some of the remote components are shifted back to the local site. That is no change in C and some nodes in S will be shifting to C.

The application is partitioned according to the above algorithm and the dynamic and adaptive nature is calculated at each iteration of a bandwidth change. If the bandwidth changes the results are calculated and decision is taken on whether to shift the nodes from mobile to cloud or cloud to mobile depending on the above two conditions.

4 Application and Evaluation

The ORG constructed with the Dacapo Benchmark using soot framework and spark tool. The Table 1 specifies the graph which we considered for our experiments.

Table 1. - Sample application graph data

The ORG is constructed from the above data and adaptive splitting algorithm is applied onto the graph. The bandwidth is taken from a real time bandwidth trace obtained from a Samsung Galaxy phone.

Energy efficiency of graph partitioning algorithm

The following is the evaluation of our algorithm with some standard methods. Stoer-Wagner is the basic graph bi-partitioning algorithm and an Integer Linear Programming based algorithm where all the constraints are specified. The whole evaluation is calculated on different bandwidth scenarios. The bandwidth parameter we varied from 10-100 and the execution time is plotted against the bandwidth. Local execution is done for all the sample graphs and the execution time is constant for any bandwidth. In all the sample graphs the ILP solution is taking more time because it is making the partition based on all the constraints. The Stoer-Wagner solution is also taking much larger time than the local execution. Energy efficiency is also calculated for the sample graph and our algorithm gives a better result than all other algorithms.

Our algorithm works reasonably well in all graphs at any bandwidth. Even if the adaptive algorithm is not showing better performance at lower bandwidth, higher bandwidth solutions are much better than the local solutions. At lower bandwidth the transmission cost is much larger that is the reason for lower performance. The Figs. 3 and 4 shows all these result.

Fig. 3.
figure 3

Energy consumed for various graphs

Fig. 4.
figure 4

Execution time for various graphs

5 Conclusion and Future Work

In this paper we used a genetic algorithm for graph partitioning and an adaptive algorithm for changing the fragments according to the variations in the bandwidth. Basically bandwidth is one of the most frequently changing components in offloading which will affect the decision a lot. Our algorithm is shifting the nodes dynamically depending on the current situations. Our experimental evaluation shows that the adaptive algorithm works reasonably good than the conventional liner programming approaches.

Our future work is to expand the conditions to more sophisticated values which will consider all aspect of offloading scenario. A real android application will be taken and converted into graph and then partitioning can be done. The vulnerability index will be calculated based on all the parameters.