#VelocityConf: Mobile Performance from the Radio Up

I seem to be going to a lot of really deep, low-level talks this year. I think it's good to get a refresher and see what has happened in these spaces since I learned the first theoretical bits over 10 years ago. Unfortunately, most of the material in this talk didn't exist 10 years ago, so it was fairly new. There are obviously two types of radio we deal with on a regular basis: Wi-Fi and 2g/3g/4g.


Leaving out a lot of the detail, Wi-Fi is Ethernet over the air. This means that the collision detection and avoidance systems are exactly like Ethernet. Of course, it's been a while since we used Ethernet hubs, so the collision issues are really about whether you are trying to send while receiving, so they don't happen very often. In Wi-Fi, you may be colliding with someone using the same frequency on a different network, so it's much worse than Ethernet ever was. Because of this, the protocol is not necessarily adapted to the task of wireless communication.


The cellular protocols, on the other hand, are designed for stability and scalability. They are also designed to optimize battery life. As a result, there is a radio resource controller (RRC) that will handle assigning time slots, powers, and modulations to any data-sending tasks. Once this has completed, the controller may choose to power down the radio. Unfortunately, this power-saving mechanism also means that the first packet is often very slow, sometimes many seconds are needed just to re-create the network connection.

The key to this issue is to ensure that your mobile applications and sites respond instantly, if only to let the user know that something is happening. After that, you may be at the mercy of the network.