Recently at dotMobi we have been investigating how to make our DeviceAtlas device detection even better, while at the same time trying to keep the size of the distributable database as compact as possible. As some of you may know, DeviceAtlas uses a tree of data stored in a very compact JSON file to distribute our device data knowledge. The actual format of this JSON file is a Patricia tree organised around the user-agent strings of the devices that we have data about.
We thought it might be fun to actually plot a portion of this tree to see what it looks like. The result is below.
This image shows a tiny portion of the overall tree – we have depicted only a couple of hundred nodes from the total of many thousands. In particular we have zoomed in on the section of the tree beginning with ‘N’, since this is a busy area in mobile user-agent strings.
You can immediately see that there are two main legs here highlighting where N branches into N-OKIA and N-EC. As you add characters to the user-agent string you descend further down the tree until you know everything about it. See the image attachment below for a higher resolution version where you can see more detail.