I woke up one morning last week to find my wife capturing a Squirtle in the corner of the room. Not the real room, of course: just the augmented reality version that exists in Pokémon Go.

The idea of augmented reality, of using computers to superimpose extra information relevant to the real world, has existed for decades. William Gibson’s Neuromancer is famous for not only introducing the concept, and some of its uses, but also for coining the term “cyber.” Right now, augmented reality is on the rise. Retailers are using it to allow you to see their products in place in your home before you buy them, simply by holding up a smartphone running their app. The Eurofighter Typhoon has a heads-up display that gives the pilot real-time information, no matter where they are looking at the time. This is for all the world like something from Star Wars. With the technology maturing, its range of functions means that it can make its way into the home, not just into a few billion dollars’ worth of high-spec warplane.
Pokémon Go enters the arena at this point. It’s currently sitting at the top of the game and app charts. What is interesting is that it got there in a matter of days in every region in which it was released. What is more interesting is that in that same few days, its usage has grown to more than that of Twitter. The infrastructure behind this game had to scale, and it had to scale big and quick.
The game itself is basically a glorified geocaching effort. Pokémon (pocket monsters) “spawn” at semirandom locations, and the point of the game is to go out and find them. In this respect, the game is not much different than Ingress, Niantic’s previous game. Ingress was a simple geocaching app that had players locate points in space and “capture” them for in-game story rewards. Pokémon Go has added the augmented reality concept by depicting the Pokémon that are being captured in real time. It is this extra element that has grabbed the attention of the masses, not just of the geeks who’ve been exchanging Pokémon cards for the better part of three decades.
My real interest, though, is in the infrastructure that allowed Niantic to scale the game so much and so quickly. There are two aspects to this. The first is that it already had the infrastructure and some ability to scale in the design of Ingress. This is no small game: people play it all over the world. So, the ability to scale, to provide distributed access, and to handle many, many requests was there already. The second is that adding the augmented reality part is almost 100% client-side. Accessing the smartphone camera and superimposing a graphic is not so complex in the modern world. Crucially, it doesn’t require external traffic. Beyond discovery of the location, and some code to say which Pokémon is at the location, most of the data is held on the client. This reduces the problem down to one of a simple distributed database issue—albeit a distributed database with forty million users across the world.
Pokémon Go relies heavily on Ingress not just for the mechanics of how the game works on the back end, but also for the raw data points. The same coordinate points that Ingress used so well to create its complex grid of pickup points, which has allowed groups of people to draw pictures over whole cities in virtual reality, provides the basis for the locations of Pokémon, training gyms, and other in-game ideas.
The final piece of the puzzle is, again, one that was previously solved for Ingress: the use of scalable, distributed cloud systems to allow growth on demand and relatively local access.
This meteoric rise hasn’t been entirely error free. There have been serious issues with server availability— and presumably load—and to a lesser extent, authentication. As more resources have been added to the system, most of the problems have gone away. Hackers have made attempts to take out the system, some successfully for a time. However, nothing seems to be able to halt the growth for long.
The game is currently running at a daily $1.6 million dollars from iOS alone, with takings in excess of $35 million within the first month of release. This is a massive success story for modern computing practices and distributed computing.
Could your latest app scale to forty million users in a matter of weeks? Could it handle the DDOS attempts that would come with it?