Mesh Networks in iOS7
One of the more interesting features to be released as a part of iOS7 was the Multipeer Connectivity framework. The framework allows for the creation of mesh networks through communication between multiple devices in close proximity without having to be connected via traditional wifi. The framework supports connectivity using Bluetooth Low Energy (BTLE), infrastructure wifi (traditional wifi), and peer to peer wifi (ad hoc networks between two devices). This last type is most compelling because it doesn’t require devices to communicate via mobile phone tower – the framework sets up an “off the grid” network and devices communicate directly with each other.
One of the core aspects of a mesh network is the redundancy of nodes (iOS devices) in the grid. If one point fails, the network communications are rerouted along other paths. Apple achieves this by allowing devices to connect via whatever wireless connection is available (wifi, peer to peer wifi, bluetooth), daisy chaining through as many devices as necessary. In an iOS7 mesh network devices (peers) are set up to join the network and communicate in two distinct phases, discovery phase and session phase.
The discovery phase is made up of devices acting as advertisers and browsers. An advertiser is a device that makes itself discoverable to other peers, notifying browsers it is ready to be invited into a session. A browser listens out for advertisers and invites them to join the network. If the browser’s invitation to join is accepted we then move into the session phase. To add complexity to the discovery phase devices can simultaneously be acting as advertiser and browser, advertising for new networks to join while also browsing for peers to join the current network.
The session phase provides support for communication between connected devices on the network via the transfer of encrypted data. The framework allows for three types of data transfer: messages, streaming and resources. Messages are clear chunks of data sent in one call. Streaming opens a stream of data to the network. Resources let the user send a URL to a local or web location.
Mesh Networks of the type that iOS7 provides with the Multipeer Connectivity framework offer a lot of exciting creative potential. By facilitating the discovery of and the communication with nearby devices Apple has taken much of the pain away for app developers setting the network up. The future of unshackling our phones from our mobile providers via a fleet of wifi enabled drones is still some way off, in the meantime we’ll probably see many more Snap Chat derivatives, and also hopefully more useful collaborative applications in education and gaming.

