-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreface.tex
More file actions
84 lines (63 loc) · 8.11 KB
/
preface.tex
File metadata and controls
84 lines (63 loc) · 8.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
\chapter{Introduction}
\pagenumbering{arabic}
\epigraph{``Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.''}{--- \textup{Benjamin Franklin} }
Social networks and instant messaging services gained a tremendous amount of popularity because they allow people to communicate freely and effectively.
Popular services such as Twitter have been used to provide people with up-to-date information in times of crisis such as natural disasters.
Recent events such as the Arab Spring and the Honk Kong protests showed that such applications are also useful as tools to allow the population to organize and communicate in the context of a large scale protest \cite{firechat_hk}.
While all of the popular services work very well in general, they suffer from a crippling flaw: they rely on centralized infrastructure to work.
To connect to a service like Twitter, a smartphone requires a working Internet connection which can be provided by either a cellular network or by a WiFi Access Point.
In case of a natural disaster, such a networking infrastructure may not be available for a variety of reasons, including power loss or damages to the antennas needed to relay signals.
The issue gets worse when considering that infrastructure is always controlled by a government which can decide to limit access to it or forbid it entirely.
Even though WiFi and cellular networks require centralized infrastructure in order to work, modern smartphones are also equipped with technology that allows for direct communication.
Direct communication between devices (peer-to-peer) is a form of communication where participating members (peers) rely on the exchange of messages between each other, eliminating the need for centralized infrastructure.
Peer to peer communication is a well studied topic in computer science but its applications to mobile devices are very limited.
The goal of this thesis work is to study the feasibility of a messaging system that does not rely on external infrastructure using technology commonly found on modern mobile devices.
\section{Review of the literature}
A variety of studies has already been made in the field of device to device communication, for different reasons.
\paragraph{Mobile Ad Hoc Networking} RFC 2501 \cite{rfc2501} describes the characteristics of mobile ad hoc networks (MANETS). MANETS are defined as continuously self-configuring, infrastructure-less networks of mobile devices connected wirelessly.
\paragraph{Serval Project}
The Serval Project developed a mobile application that enables mobile devices running the Android operating system to communicate using their Wi-Fi connection.
Since it is not possible for Android applications to create and manage ad-hoc Wi-Fi networks (unless the devices is rooted), devices running the Serval mesh periodically switch between client mode and access point mode \cite{serval_multi_modal}.
This greatly limits the efficiency and operating range of the application, and makes it impossible to have an end-to-end connection over many hops.
In order to overcome this problem, the Serval project has developed a hardware utility that extends the range of a mesh network.
However, those mesh extenders are expensive (costing up to 400\$), making their use impractical in contexts where cost of hardware is an important factor.
Another downside of using Wi-Fi over Bluetooth is that the former is less power efficient, and may drain the battery of the device faster than Bluetooth.
\paragraph{iTrust}
The iTrust project \cite{iTrust} is a distributed system that permits the uncensored publication and access to information without depending on one or more central authorities.
This project can rely on a multitude of technologies in order to make the nodes communicate.
It has been implemented over the HTTP, SMS and Wi-Fi direct protocols \cite{iTrust_http}.
However, the iTrust project is meant for the distribution of information (as opposed to instant messaging, on which this thesis is focused), and its technology is not meant for applications where it is required that data is exchanged in almost real-time.
\paragraph{Multipeer}
Multipeer is a framework developed by Apple that enables applications to establish a multi-hop mesh network and communicate using different wireless interfaces, including Bluetooth, Wi-Fi and Wi-Fi ad hoc \cite{multipeer}.
This framework is completely transparent for developers, and switches between protocols automatically when needed.
However, this framework is available only on devices running the iOS operating system.
\paragraph{LTE Advanced} The concept of device to device (D2D) communication is being researched for use in LTE Advanced networks \cite{lte_advanced}, in order to enable devices to talk directly when they are in close proximity.
This would bring benefits under both the cost and performance perspectives, since the communication between those devices would not rely on the cellular network infrastructure.
However, LTE Advanced does still rely on the cellular network for other purposes, like authentication, and this would make it unsuitable in situations where access to the cellular network is not possible.
Moreover, the LTE technology is not yet common on mobile devices, and the network infrastructure does not always support it.
\paragraph{IEEE 802.11s} IEEE 802.11s is a IEEE 802.11 amendment that tries to overcome the limitation of single-hop communications enabling the creation of wireless mesh networks \cite{ieee80211s}.
Networks of this kind can be used to extend the range of an existing wireless network, or to enable the communication over a vast area during emergency situations, when network infrastructure may be unavailable.
\chapter{Technology choices}
In creating a mobile peer-to-peer application there are two important choices to make: which operating system to use and which communication technology is going to be used to relay messages.
\section{Mobile Operating Systems}
The smartphone market is divided between Google's Android (which owns roughly 78\% of market share), Apple's iOS (18\%), Microsoft's Windows Phone (3\%) and everything else (1\%).
Given the fact that Android is the most used operating system we decided to focus our work on devices running it.
Its diffusion also made it easier to find devices to test the application on.
\section{Communication}
As discussed, most modern devices are equipped with some form of device-to-device communication.
The four technologies available for this purpose are:
\paragraph{Near Field Communication (NFC)}
is a form of radio transmission that only works when the two devices communicating are held at a distance of 10 centimeters or less.
This characteristic makes it well suited for use-cases such as payments where remote activation of the transmission at a considerable distance is undesirable but also makes it a poor choice for a messaging application.
\paragraph{WiFi AdHoc}
is a decentralized form of wireless network. Unlike WiFi Infrastructure where a central device (Access Point) manages the routing of packages, in an AdHoc network the nodes are responsible of forwarding data between devices involved.
\paragraph{WiFi Direct}
is a wireless technology that works by emulating a WiFi Infrastructure setup. The device setting up the network becomes the Access Point (AP) and forwards packets between the other participating devices forming a Master-Slave setup.
A master device can not participate in another WiFi network neither as a master nor as a slave.
\paragraph{Bluetooth}
is a wireless technology created with the goal of exchanging data over a short distance, typically in the order of tens of meters.
\subsection{Choice}
Near Field Communication was not an option for obvious reasons, users would have to physically touch devices in order to exchange messages.
WiFi direct was not a good fit as it does not allow the creation of distributed networks, all the devices that want to communicate must be connected to the master.
WiFi AdHoc would have been the best choice but it is not available on Android.
Bluetooth was selected because it allows the creation of mesh networks and has a reasonable range. It is also available on almost every smartphone running Android.