Mirroring Smartphones for Good: A Feasibility Study

Release Date:2011-03-18 Author:Bo Zhao, Zhi Xu, Caixia Chi, Sencun Zhu, and Guohong Cao Click:

 

1 Introduction
    Smartphones have become more intelligent and powerful. Many complex applications previously used only on PCs are now being developed to run on smartphones. These applications expand the functionality of smartphones and make it more convenient to get connected. However, they also greatly increase the workload on smartphones and result in many more data transmissions between smartphones and telecom networks. Heavy workload and traffic affects both smartphone users and Telecommunications Service Providers (TSPs). For users, heavy workload and traffic drain a smartphone’s battery quickly. When we tested an Android Dev Phone 1, scanning a folder with 200 MB files took about 40 minutes and drained the battery by 10%. Uploading a 20 MB file drained the battery by more than 5%. 


    Recent research [1]-[4] has been done leveraging cloud techniques to help smartphones. An augmented execution model can be used to offload application execution from a smartphone to its clones in the cloud [2]. In an in-cloud antivirus system [3], smartphones can send suspicious files to an antivirus service in the cloud for scanning.  This avoids the need for resource intensive scanning to be performed locally on the phone. In addition, Zhang et al. [4] have suggested building elastic applications that can be partitioned into independent function components. These components can execute functions in the cloud instead of on smartphones. Cloudlets [1] are designed for applications that require real-time interactive response, and smartphones are connected to cloudlets via high speed wireless network connections such as Wireless Fidelity (Wi-Fi). In its framework, a smartphone migrates Virtual Machines (VMs) to the cloudlet infrastructure, which provides various services and returns the results to the smartphone. Since cloudlets have much greater computation power compared to smartphones, the execution speed is much faster. However, migrating the whole VM consumes much power and bandwidth.


    We propose a new framework in which a mirror is kept for each smartphone on a computing infrastructure in the telecom network. Using mirrors, some of the computation workload can be shifted from a smartphone to its mirror. Since a mirror is synchronized with a smartphone, operations such as file sharing and virus scanning can be performed directly on the mirror. The smartphone’s workload is reduced, and its resources are virtually expanded.


    This framework design leverages emerging cloud computing and virtualization techniques. On the smartphone side, a client-side synchronization module is deployed to collect user input data and transmit it to the mirror server (a powerful application server). With cloud computing technologies, the mirror server is capable of hosting hundreds of mirrors, and each mirror is implemented as a VM. To keep loose synchronization between the mirror and the smartphone, the mirror replays user input on the smartphone in exactly the same order.

 
    To illustrate the feasibility of deploying the proposed framework in 3G networks, we propose a network architecture based on UMTS (a 3G network architecture currently used by T-mobile). Two applications demostrate the benefits of this framework. A data caching application saves power consumption in a smartphone and saves 3G network bandwidth by caching a smartphone’s data in a mirror server. Another application is virus scanning in a smartphone.


    A prototype of the mirror server was built using Dell PowerEdge 1900. By measuring the protoype’s workload when different numbers of mirrors are used, we demonstrate that the scalability of the framework is acceptable. We also evaluate the power consumed by running the synchronization module on an Android Dev Phone 1. The results show that performance overhead on the smartphone is very small.


    The remainder of this paper is organized as follows: Section 2 describes the design of our framework. Next we present two applications to show the benefits of our framework in Section 3. Section 4 presents our testbed and experimental results. Section 5 concludes the paper.


2 System Design 
    The proposed system provides an architecture for shifting computing from smartphones to their mirrors in the telecom network. Fig. 1 gives an overview of the system. On the smartphone side, a client-side synchronization module called Syn-Client is deployed within the smartphone Operating System (OS). This client collects smartphone input data, including user keyboard input, and transmits it to the mirror server for synchronization. Syn-Client is designed according to specifications of the TSP and manufacturer. On the mirror server side, the mirror server is a powerful application server for maintaining a set of VMs. One VM is a mirror for one smartphone. To keep mirrors and smartphones synchronized, a server-side synchronization module called Syn-Server updates mirrors based on data provided by Syn-Clients and based on network traffic between smartphones and the IP network. Network traffic data is collected by a traffic monitor module. The detailed design and implementation of other modules are not within the scope of this paper.

 


    (1) Location of the Mirror Server 
    In the proposed architecture, the mirror server monitors all network traffic of smartphones. In this case, traffic from both Internet Service Providers (ISPs) (e.g. Internet websites) and the TSP (e.g. AT&T) is considered. Bluetooth or Wi-Fi connections are not considered in this discussion; we only consider the case where a smartphone is connected through a 3G network.


    There are two options for deploying the mirror server: Deploying it in the ISP network (server I in Fig. 2) or in the TSP network (server T in Fig. 3). For the former, the dotted and dashed lines in Fig. 2 represent the message flows with proxy P and proxy G respectively. For the latter, network traffic from TSP and ISP is copied to server T within the telecom network. This requires modifying the existing telecom network, and details of this modification are given in the next section.

 

 


    In the systems proposed in [4], the cloud that assists smartphones is deployed with the ISP and is connected to smartphones via IP networks. However, in our architecture, if the mirror server is deployed in the ISP network, an additional proxy is needed to collect incoming smartphone traffic and forward it to the mirror server. As shown in Fig. 2, such a proxy can be deployed either beside the Gateway GPRS Support Node (GGSN) in a TSP network or beside the smartphone, represented as proxy G and proxy P respectively. However, placing a proxy beside the GGSN requires changing the telecom network so that messages can be forwarded and a mirror server can be placed in the TSP network. Taking these issues into consideration, we deploy the mirror server in the TSP network.


    (2) Mirror Design 
    Compared with using PCs, creating mirrors for smartphones has many advantages. First, same model smartphones have the same hardware specifications, default factory settings, OS, and many software applications. Moreover, in the restriction of usage agreement with a TSP, users are not allowed to modify the hardware or OS of their smartphones. Therefore, the mirror server only needs to keep one template of the factory defaults for each model.


    To build a new mirror for a smartphone, the mirror server creates a VM with exactly the same hardware/software specifications as the factory default. If the smartphone is in its original state; that is, first-time use, the mirror server can quickly update the mirror by supplying user information. If the smartphone is not in its original state, the mirror server copies software specifications and personal data from the smartphone’s storage to the mirror. During the copying process, the state of the smartphone is frozen and no operation by a user is allowed.


    (3) Synchronization Mechanisms 
    To keep a smartphone and its mirror synchronized through the telecom network, the mirror needs to be updated when the state of the smartphone changes. In this paper, one option is presented for loose synchronization, which requires identical hardware specification, storage (e.g. SD card), OS, and installed application software. In the first stage of our work, we are mainly concerned with maintaining storage consistency between a smartphone and its mirror.
Data replication is an intuitive method of storage synchronization and involves copying every new or updated data item to the mirror. However, this is too expensive when data activity is frequent on the phone. Therefore, a synchronization mechanism that periodically replays smartphone input at the mirror is proposed.


    The question for such a design is: Why is the data storage uniquely determined by user input? We noticed that changes in a smartphone’s state are always triggered by user inputs
(e.g. keyboard typing) or network inputs (e.g. arrival of data packets) and that most applications are deterministic. Given a list of inputs, the application generates deterministic outputs. In this case, if the same list of inputs is applied to a smartphone and its synchronized mirror, both generate the same output and are synchronized again after applying the inputs. Note that in our design, to save communication overhead, only user inputs are forwarded to the mirror. The mirror caches the network inputs to a smartphone in the previous synchronization period so that later it can directly feed the cached data to the mirror. Also, the output from the mirror execution does not actually leave the mirror server. The global clock of the telecom network is used to timestamp all inputs/outputs. For example, on the smartphone side, the user pushes a button to open an email client application, types an email, and sends it by clicking an icon on the screen. On the mirror side, if the “pushing,” “typing,” and “clicking” actions are exactly replayed in order, the mirror  sends the same email and both  have the same archived email in storage.


    It can therefore be assumed that, by applying exactly the same inputs to a smartphone and its mirror in the same order, the storage of a phone and its mirror will be synchronized. This assumption may be untrue for certain applications, such as those that generate a random number. However, it is suitable for most email, IM, web browser, VoIP, and MMS/SMS smartphone applications as well as this mirror service. Therefore, all inputs to the smartphone are monitored and later applied to the mirror in order. Periodic synchronization improves transfer efficiency and reduces power consumption greatly by sending the inputs in a batch.


    (4) Network Design 
    The mirror server resides in a 3G network as an application server and supports services such as security, storage, and computation delegation. It is easy to configure the nodes of a 3G network to route all incoming/outgoing smartphone messages (such as session control messages, data packets, and other 3G signaling protocols) to traverse the mirror server without any interaction with the smartphone. It is not necessary to modify any protocol or software of the network nodes.


    Take UMTS for example. Each subscriber to the mirror service has their user profile updated in the Home Subscriber Server (HSS) and their user policy and mirror service profile registered at the Call Session Control Function (CSCF).


    The HSS periodically updates the Serving GPRS Support Node (SGSN) with changes of user information; thus, SGSN becomes aware of the mirror service for a user. When SGSN receives a message from/to a user, it either forwards the message to CSCF or forwards it to the mirror server depending on whether the message belongs to a service with session control.


    Technical report [5] details the deployment of a mirror server in a UMTS network. In [5], two sample message flows of typical telecom services are presented to show that the mirror server is compatible with a UMTS network, and only minor changes are needed.


3 Applications 
    The proposed framework can support many applications. In this section, two are identified.

 

3.1 Data Caching Application
    Increasingly, people are using their smartphones to share multimedia data with friends. Although data downloading/uploading speed between smartphones and BS has significantly increased in recent years, receiving and sending bulk data still takes time and consumes a lot of power.


    File sharing on smartphones currently has many weaknesses. For example, if the receiver runs out of battery or is downloading very slowly in the current location (weak signal), the download may have to be abandoned. Also, if a user sends the same file to different people in a short period of time, for each send the smartphone must do a separate file upload, wasting a lot of bandwidth and power.


    Based on the proposed framework, we present a data caching application. It is deployed on the mirror server, which brings more flexibility to downloading and significantly saves battery and upload time.


    (1) Bulk Data Downloading
    For bulk data downloading, data caching provides a temporary storage service. When a user wants to download a file from the Internet, the caching service first downloads the file to its temporary storage. Once the downloading is complete, the caching service sends a “file-cached” notification to the user via synchronization messages. This is kept for a period of time depending on the TSP policy. When the user decides to download the cached file, they obtain it directly from the mirror server. Moreover, according to the synchronization mechanism, once the smartphone starts to download a file from the mirror server, its corresponding mirror also downloads the file from the mirror server. Therefore, no extra storage synchronization is necessary.


    (2) Bulk Data Uploading
    For bulk file uploading, data caching uses the smartphone’s mirror on the server. The mirror has the same storage as its corresponding smartphone and can replay all actions performed on the smartphone. Thus, if a user wants to send a bulk file to multiple people, there is no need to upload the file multiple times through the wireless link. Instead, data caching can send the file directly from the mirror to multiple people. Compared with uploading from smartphone, synchronization consumes much less battery power, especially when the file size is large.

 

3.2 Antivirus Scanning Service 
    Recent research [6], [7] shows there is an influx of worms, viruses, and other mobile phone malware on 3G networks. In a virus scan, the scanner reads files, compares them with virus signatures, and returns a result to the user. The scan process is CPU and I/O intensive, and in a smartphone, is inconvenient and drains the battery quickly.


    In the proposed framework, an antivirus scanner can be deployed as a service on the mirror server, and the scanner can access the file system on the mirrors. Furthermore, a hook application is installed on the phone. When a user launches the hook on the smartphone, it sends a request with parameters to the mirror server. Instead of scanning the real files on the smartphone, the scanner scans the synchronized mirror. The result is sent back to the smartphone.  Because the smartphone and its mirror are synchronized, scanning the mirror generates the same result as scanning the smartphone.


    The benefits of shifting antivirus scans are threefold as follows: Battery power of the smartphone is saved; CPU and I/O intensive workloads are offloaded so that performance of the smartphone is not affected; and the scan speed on the mirror is much faster than that on the smartphone with limited capabilities.


4 Evaluation
    (1) The Prototype 
    Because UMTS 3G networks are very complicated with multiple protocols and many different nodes, only big telecom equipment vendors such as Nokia, Alcatel-Lucent, and Ericsson have real prototypes. In order to evaluate the performance, scalability, and feasibility of our framework, we set up a simplified prototype. Android Dev Phone 1 was used as the smartphone, and the Dell PowerEdge 1900 was used as the mirror server. The PowerEdge 1900 has two Quad Core Intel Xeon 1.60 GHz CPUs, 8 GB Memory, 320 GB Disk, and Ubuntu 8.04 Desktop OS. The mirror server was connected to the IP network and could be accessed by the smartphone through T-mobile’s 3G network. Because we could not route or collect incoming and outgoing smartphone messages in T-mobile’s 3G networks, for the synchronization feature in this prototype we only replayed the user input data on the mirror so that the mirror took the same tasks as the smartphone.


    A syn-client module was developed for the smartphone to collect input data in real time and periodically transfer it through the 3G network to our mirror server. On the mirror side, Android emulator was the mirror.


    (2) Synchronization and Battery Cost 
    In the proposed framework, the Syn-Client module inside the smartphone sends the input information to the mirror periodically. The battery cost of periodic sending is determined by the input frequency and the time interval between two sending operations. To measure the power consumption of different input frequencies and different sending intervals, the power consumption of periodic sending was measured in two cases. In the first case, the smartphone was very active and generated two events every second. In the other case, the smartphone only generated one event every five seconds. In both cases, the total battery cost was measured with different sending time intervals over a 6 hour period.


    Battery cost is shown in Fig. 4. With the same frequency of event generation, shorter sending intervals consume more battery power. At the same sending frequency, more input events cause more data to be sent and more battery power to be consumed.

 

 
    To determine the benefit of downloading/uploading, the battery cost of synchronization was compared with file downloading/uploading using ftp and a 20 MB file. For periodic synchronization, a case was chosen in which the user generates 0.5 events per second on average and the smartphone synchronization period is 60 seconds. Table 1 shows that the average power consumption of a smartphone in standby and that using synchronization are very close. Compared to these, file downloading/uploading using ftp consumes five times more power.

 


    To determine the benefit of our solution in antivirus scanning, SMobile VirusGuard [8] was installed on an Android Dev Phone 1 and used to scan folders of different sizes. All folders were filled with Android Package (APK) files used for application installation. As shown in Table 2, the time and battery needed for a scan increases as the folder size increases. When the folder size is 200 MB, it takes more than 39 minutes and 10% battery to complete the scan. During the scan, a user can explicitly feel the smartphone slow down. Table 2 also shows that much less time is spent scanning the same folders on a PC using Symantec Endpoint Protection software.

 


    (3) Scalability 
    To evaluate the scalability of the proposed framework, we studied how many mirrors the server could support with different workloads. In this experiment, a web browsing service was used as an example to evaluate scalability.


    Fig. 5 illustrates CPU usage versus different numbers of emulators together with different workloads. In general, the mirror server can support at least 20 mirrors with heavy workload (browsing the Web every 1 minute) or more than 30 mirrors with light workload (opening a Web page every 5 minutes). In this case, CPU usage increases almost linearly with the number of mirrors.

 


5 Conclusion and Future Work 
    In this paper, we propose a new framework that uses cloud computing and VM techniques to shift the workload from smartphones to a computational infrastructure in telecom networks. This greatly reduces the workload of a smartphone and virtually expands a smartphone’s resources. The feasibility of deploying such a framework is shown in the protocol design, a synchronization study, and a scalability test. In future research work, we will study different synchronization mechanisms and determine which mobile applications can benefit from the proposed framework. We will build the whole system and evaluate its performance in a real 3G network.  We also intend to investigate more complex scenarios with additional incoming traffic through Bluetooth and Wi-Fi connections. 

 

References 
[1] M. Satyanarayanan, P. Bahl, R. Caceres, and N. Davies, “The case for VM-based cloudlets in mobile computing,” IEEE Pervasive Computing,
vol. 8, no. 4, pp. 14-23,  2009.
[2] B. G. Chun and P. Maniatis, “Augmented smartphone applications through clone cloud execution,” in Proc. HotOS XII, Monte Verità, Switzerland, 2009.
[3] J. Oberheide, K. Veeraraghavan, E. Cooke, J. Flinn, and F. Jahanian, “Virtualized in-cloud security services for mobile devices,” in Proc. MobiVirt 2008, Breckenridge, CO, pp. 31-35.
[4] X. Zhang, J. Schiffman, S. Gibbs, A. Kunjithapatham, and S. Jeong, “Securing elastic applications on mobile devices for cloud computing,” in Proc. CCSW 2009, Chicago, IL,  pp. 127-134.
[5] B. Zhao, Z. Xu, C. Chi, S. Zhu, and G. Cao. “Mirroring smartphones for good: A feasibility study,” CSE Technical report, presented in Mobiquitous’2010. [Online]. Available: www.cse.psu.edu/~bzhao/mirror report.pdf
[6] Z. Zhu, G. Cao, S. Zhu, S. Ranjan, and A. Nucci, “A social network based patching scheme for worm containment in cellular networks,” in Proc. INFOCOM 2009, Rio de Janeiro, Brazil,
pp. 1476 - 1484.
[7] B. Zhao, C. Chi, W. Gao, S. Zhu, and G. Cao, “A chain reaction dos attack on 3G networks: Analysis and defenses,” in Proc. INFOCOM 2009, Rio de Janeiro, Brazil, pp. 2455-2463.
[8] “Smobile virusguard for google android.” [Online]. Available: www.smobilesystems.com

 

Biographies

Bo Zhao (bzhao@cse.psu.edu) is a Ph.D. Student in the Department of Computer Science and Engineering, The Pennsylvania State University. He received his B.S. degree in computer science from the Peking University in 2003. His research interests include 3G network security, power saving of the telecom networks, and 3G network services.

Zhi Xu (zux103@cse.psu.edu) is a Ph.D. student in the Department of Computer Science and Engineering, The Pennsylvania State University. He received an M.S. degree in Computer Science from the University of Ottawa in 2007 and a B.Eng. degree from Beijing University of Aeronautics and Astronautics in 2004. His research interests include mobile network security and online social network security.

Caixia Chi (chic@alcatel-lucent.com) is a researcher at Bell Labs. She received her Ph.D. degree from the Institute of Applied Mathematics, Chinese Academy of Sciences in 2000. Her research focuses on optical network, network modeling and optimization, algorithm design, and graph theory.

Sencun Zhu (szhu@cse.psu.edu) is an associate professor in Department of Computer Science and Engineering, The Pennsylvania State University. He received his Ph.D. degree in Information Technology from George Mason University in 2004, an M.S. degree from University of Science and Technology of China in 1999, and a B.S. degree from Tsinghua University, China in 1996. His research interests include network and systems security, software security, and social network security.

Guohong Cao (gcao@cse.psu.edu) received the M.S. and Ph.D. degrees in computer science from Ohio State University. Since then, he has been with the Department of Computer Science and Engineering at The Pennsylvania State University, where he is currently a professor. His research interests include wireless networks and mobile computing. He has published over one hundred papers in the areas of sensor networks, wireless network security, data dissemination, resource management, and distributed fault-tolerant computing. He has served on the editorial board of the IEEE Transactions on Mobile Computing and IEEE Transactions on Wireless Communications and has served on the program committee of many conferences. He was a recipient of the NSF CAREER award in 2001. He is a fellow of the IEEE.

[Abstract] An increasing number of applications and functions are being introduced into smartphones, but smartphones have limited computation ability and battery resources. To enhance smartphone capacity, cloud computing and virtualization techniques can be used to shift the workload from smartphone to computational infrastructure. In this paper, we propose a new framework in which a mirror is kept for each smartphone on a computing infrastructure in the telecom network. With mirrors, the workload can be greatly reduced, and smartphone resources can be virtually expanded. The feasibility of deploying this framework in telecom networks is demonstrated in the protocol design, a synchronization study, and a scalability test. Two applications are introduced to show how computational workload on the smartphone and traffic in the telecom network are signi?cantly reduced using our techniques.

[Keywords] mirror; cloud computing; smartphone