Replacing Cellular with Wifi Direct Communication for a Highly Interactive, High Bandwidth Multiplayer Game
Total Page:16
File Type:pdf, Size:1020Kb
Replacing Cellular with WiFi Direct Communication for a Highly Interactive, High Bandwidth Multiplayer Game by Pablo Ortiz B.S., University of California, Santa Barbara, 2011 Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE F TECHNOLOGY at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY ICT 2 2013 September 2013 LIBRARIES @ Massachusetts Institute of Technology 2013. All rights reserved. Author ................................................... Department of Electrical Engineering and Comp jcience August 6, 2013 C ertified by ............. ... /.................................. .. Li-Shiuan Peh Professor Thesis Supervisor Accepted by ....................... Le Kolodziejski Chair, Department Committee onraduate Students Replacing Cellular with WiFi Direct Communication for a Highly Interactive, High Bandwidth Multiplayer Game by Pablo Ortiz Submitted to the Department of Electrical Engineering and Computer Science on August 6, 2013, in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering and Computer Science Abstract The objective of this work is to explore the benefits of replacing cellular with Wi-Fi Direct communication in mobile applications. Cellular connections consume significant power on mobile devices and are too slow for many highly interactive mobile applications. Wi-Fi Direct, the recently released wireless standard, promises to provide the speed, power effi- ciency, and security of Wi-Fi to devices communicating within a short range. Using Wi-Fi performance as a baseline, the performance of a proof of concept system, Super Tux Kart Direct, is evaluated when communication is enabled by either LTE or Wi-Fi Direct. At the time of writing and to the best of the author's knowledge, Super Tux Kart Direct is the first, real-time, multiplayer kart racing game playable via Wi-Fi Direct. Thesis Supervisor: Li-Shiuan Peh Title: Professor 2 Acknowledgments The completion of this thesis would not have been possible without the tireless support and encouragement from my dear Katie Lampier. My sanity and morale were brought back from the brink countless times by her efforts. Without the expertise of my colleague Jason Gao, I would have floundered under the weight of my ignorance with respect to many of the practical considerations involved in conducting research on Android devices. His aid was invaluable in ensuring that this work progressed smoothly. I would be remiss if I failed to mention the noble efforts of Dr. Seth Hetu in assisting me with the completion of this thesis. Not only did he spend many hours of his valuable time helping me test and debug my proof of concept system, but he also gave me a great deal of practical advice for dealing with large code bases. I would also like to extend my deepest gratitude to my thesis supervisor, Dr. Li-Shiuan Peh, for all the help she provided me with while working on this project. Her wisdom and guidance got me through many of this work's major roadblocks. 3 Contents 1 Introduction 8 1.1 Thesis Organization ........... .......... 9 2 Background 11 2.1 W i-Fi . ...... .. ... ..... ..... 11 2.2 Cellular Networks ....... .......... 12 2.2.1 Mobile WiMax . ... 13 2.2.2 LTE .......... 14 2.3 Device-to-Device Technologies 15 2.3.1 Ad-hoc Wi-Fi ..... 15 2.3.2 Bluetooth ........ 16 2.3.3 Wi-Fi Direct ...... 18 3 Design 20 3.1 Super Tux Kart ......... 21 3.1.1 History ........ 22 3.1.2 The Xapantu Version 22 3.2 Super Tux Kart Direct . 24 3.2.1 Wi-Fi Server ..... 26 3.2.2 Wi-Fi Direct Server 27 3.3 Key Implementation Details ........ ........ 28 3.4 Related Work ......... .. ....... ...... 28 4 Experimental Setup 30 4.1 Equipment ....... ............ ............. .... 30 4 4.1.1 Experimental Equipment ........................ 31 4.2 Experiments. ................................... 31 4.2.1 Application Runtime. .......................... 32 4.2.2 Player Input Throughput ................. ....... 33 4.2.3 Player Input Response Time ...................... 34 4.2.4 Round Trip Network Latency ............... ....... 35 5 Results 36 5.1 Application Runtime ........... ............. ....... 36 5.2 Player Input Throughput ..... ......... ......... ..... 40 5.3 Player Input Response Time. .... ........ ........ ...... 44 5.4 Round Trip Network Latency ... ......... ......... ..... 48 5.5 Performance Breakdown ....... .......... .......... .. 52 6 Conclusions 56 6.1 Future Work .... .............. ............. .... 58 5 List of Figures 3-1 Design of Super Tux Kart Direct .......... 25 5-1 Application Runtime Results for 2 Phones ..... ........ .. 38 5-2 Application Runtime Results for 4 Phones . .... .... ....... 39 5-3 Player Input Throughput Estimates for 2 Phones ........... 42 5-4 Player Input Throughput Estimates for 4 Phones .... ....... 43 5-5 Player Input Response Time Results for 2 Phones ....... .... 46 5-6 Player Input Response Time Results for 4 Phones .... ....... 47 5-7 Round Trip Network Latency Results for 2 Phones .... .... ... 50 5-8 Round Trip Network Latency Results for 4 Phones .. ... .... .. 151 5-9 Performance Breakdown for 2 Phones ..... .. ........ .. 54 5-10 Performance Breakdown for 4 Phones ... .... .. .... .... 55 6 List of Tables 5.1 Observed Application Runtime in seconds ............ ....... 36 5.2 Observed Player Input Throughput in inputs/second ... ....... ... 40 5.3 Observed Player Input Response Time Results in milliseconds ...... .. 44 5.4 Observed Round Trip Network Latency in milliseconds ....... ..... 48 7 Chapter 1 Introduction Humanity, as a whole, is more connected now than ever before, and, as time goes on, be- comes more connected by all forms of electronic communication. As of 2013, the total number of cellular subscriptions in the world is nearly equal to the global population [9]. This near-saturation of cellular connections around the globe coupled with high consumer demand highlights the need for fast and efficient communication methods in mobile de- vices. While service provided by 4G cellular networks is sufficient for many applications, its shortcomings inhibit the deployment of many others. 4G cellular networks provide cellular devices with higher data rates and lower latencies than their 3G predecessors. The improved network performance comes with a high cost for any cellular device communicating over a 4G network, however. A recent study has shown that, in the case of LTE, this improvement in network performance takes its toll on the batteries of cellular devices, reportedly consuming as much as 23 times as much power as communicating over Wi-Fi. [8] The same study showed that connections to LTE networks also consume more power than connections to 3G networks. Though 4G networks sport better network performance than their 3G predecessors, 4G networks still do not provide data rates as high as those observed in Wi-Fi connections, one of the most power efficient and speedy communication methods available to users. Furthermore, the impending spectrum crunch along with exponential growth in demand suggests that the cellular infrastructure may face intense scalability challenges. Fortunately for applications in which cellular device locality can be leveraged, the new, short range, wireless technology Wi-Fi Direct could be used to mitigate the shortcomings of communication over cellular networks. 8 Wi-Fi Direct builds on Wi-Fi and inherits the data rates, security features, and power efficiency of its predecessor. [5] The standard works by allowing Wi-Fi enabled devices to connect to a Wi-Fi Direct enabled device as though it were a wireless access point. Devices connected in this fashion are then able to communicate directly in a peer-to-peer fashion as if a part of a network with a star topology. Wi-Fi Direct makes use of the same frequency bands as Wi-Fi does. Thus, use of the technology will not add interference to nearby devices communicating over a cellular network. As an infrastructureless technology, Wi-Fi Direct is able to enable communication in places where existing infrastructure does not provide coverage (i.e. remote areas, disaster zones, underground, etc.). It also has the potential for reducing the load of cellular networks by removing the need for the cellular network as an intermediary in applications where device locality can be leveraged. The objective of this thesis is to explore the benefits of using the new, short range, wire- less technology Wi-Fi Direct as a means of communicating between cellular devices instead of traditional communication over a cellular network. The design and implementation of a proof of concept system is presented here along with its performance results when either a 4G connection or a Wi-Fi Direct connection is used. 1.1 Thesis Organization The rest of this thesis will be organized as follows. Chapter 2 provides context for the communication technologies considered in this work. It presents the history, strengths and weaknesses of many common wireless technologies used in cellular devices. Perhaps most importantly, it provides many more details on the features and performance of Wi-Fi Direct. Chapter 3 presents the design of the proof of concept system, Super Tux Kart Direct, and key aspects of its implementation. Chapter 4 describes the equipment used during development, the equipment used during experiments, and the experimental setup. The description of the experiments conducted