Celebrated automotive designer Colin Chapman of Lotus is credited with coining the phrase “Simplify, then add lightness”. We at DeviceAtlas think that this is fitting guidance for all engineering endeavours, especially software.
Representation of part of the DeviceAtlas Patricia Trie
In computer science, trie structures are often used in search-like use cases such as spell checkers and predictive text. Despite their apparent complexity, they are an approach that works exceedingly well. The diagram above depicts a tiny portion of our data in a trie.
But tries are not a perfect match to the problem at hand since they work best when they have perfect prior knowledge e.g. dictionary data in a spell checker. While DeviceAtlas has prior knowledge of well over 99% of incoming device types, we nonetheless have to allow for unknowns. To this end we have incorporated some improvements into the traditional Patricia trie. Firstly, our algorithm can handle non-perfect matches when necessary through our addition of pattern matching at key nodes in the trie where characters in the user-agent are not significant. This also removes unnecessary splaying of the trie, hugely decreasing the memory footprint of the loaded data. Secondly, our data convection algorithm ensures that even a partial match of a user-agent string will yield useful data. This set of innovations has worked so well that no significant changes to the API have been required since its conception. We have been granted patents for this algorithm in both the EU and USA.
But lightness in software isn’t limited to algorithm efficiency and raw speed—it also applies more generally to memory footprint and file sizes. As with speed, so it is with memory footprint—it impacts almost everyone. Memory consumed by a device intelligence solution should be low and predictable so as not to impact the core job at hand, be it serving ads, adapting web pages or analysing traffic. Our API can operate in as little as 15MB of RAM with our data loaded. Even with this tiny footprint, sub-microsecond lookups are achievable on modest hardware.
What about data file sizes? Is the download size of a device data file really an issue for customers day to day? Probably not, but we don’t like to make assumptions so we keep things extremely lean.
At DeviceAtlas we’re fervently committed to an engineering philosophy of speed and lightness, but without compromising accuracy. But rather than making meaningless performance claims here we would instead suggest that you try it yourself. Check the speed, check the accuracy, check the memory footprint. Note the consistency of implementation of the APIs, check their stability in the release notes, check how far it goes back, look for breaking API changes (I’ll save you the time—there are none). All of these aspects are important in making a provider decision. But it should always be fast and accurate!
So please, check it out! It’s really quick to try and we’re happy to help you.
Get started with a local device detection trial
DeviceAtlas is a high-speed device detection solution used by some of the largest companies in the online space to:
- Optimize UX and conversion rate on mobile
- Boost web performance
- Target ads and analyze web traffic
Get started with a locally-installed trial to test DeviceAtlas at no cost.