Slimmer, faster and more memory efficient.
Over the past months we have been working on improving the speed and efficiency of our Java API. We are happy to announce that as of today the API has officially been released in beta and is available for download. Below is a summary of the key updates in this version.
Support for data files of version 3.2
With the Internet of things and wearable gadgets gaining traction, we are likely to see a sharp increase in the number of devices that are capable of accessing the Web. The internal structure of the 51Degrees data file has been altered in version 3.2, reducing the size by about 20% whilst retaining the same amount of information
Our Java API version 3.2 supports both V3.1 and V3.2 data files to make the transition to the new version as easy and painless as possible.
Multiple HTTP Headers
Some browsers like Opera Mini send additional HTTP headers that can be used to identify the device more accurately. We've added an extra option to supply the entire set of HTTP headers to the match procedure that will automatically find the relevant headers and use them to identify the device. This was previously an option for the Servlet implementation, but not for the core API.
The HTTP headers are now stored within the data files instead of being hard-coded so you needn't worry about updating the API when new headers get added.
In the real world you rarely find a website/web project where every requesting device is different. Usually you would see the more popular devices being used more frequently simply because there are more of them. The improved caching algorithm exploits this fact to speed up detection. Cache size can now be controlled and no longer relies on a timer to be cleared.
The JAR files no longer contain embedded Lite data files. This means lighter JARs with less memory required, which will be of particular benefit in environments with multiple instances of the API sharing a data file.
This feature has been improved to make it more memory efficient. During the update the new data file is no longer fully loaded into memory. Instead, a temporary file is used. This change significantly reduces the memory footprint of the automatic update.
As part of each distribution we now provide a set of tests. We run these tests prior to each release to check as many aspects of the API as possible and to ensure that any changes do not break any existing features.