Dbljump is 6 times faster with our new API
Summary: We’ve launched a new version of the Dbljump API, which makes switching between articles faster than before. We now have the right data platform on which to build new features you can see and use, including better article pages.
The next time you visit the Dbljump video game reference, you’ll notice links between articles load much, much faster. It’s all thanks to our new API!
The new API is made with Ruby on Rails 6, whereas previously we were on Rails 5.
But the real reason for the speed boost is jsonapi-serializer.
Our API follows the JSON:API specification. Previously, we used a Ruby gem called Active Model Serializers (AMS) to turn database records into JSON:API. But AMS is old and mothballed, while jsonapi-serializer is around 25 times faster at serializing responses!
What’s an API?
An API (application programming interface) is a way for people or other applications to interact with an application. When a digital service needs to be used by various apps, having an API gives those apps a simple interface to use.
Our API lets dbljump.com fetch articles from the database, handles user logins, processes new data before its gets saved, and other things like that.
Speed comparison
The easiest way to see the speed boost is by comparing the test suites of our old and new APIs.
In software development, having an automated test suite is a way to make sure features stay workin over time. Adding new features or taking away old ones can unintentionally break other features. Testing flags broken features straight away.
Our old API test suite completed around 62 test assertions per second. But the new one handles 400 assertions per second. That’s 6.45 times faster!
A better platform for building new features
The new API has lots of other improvements too. So, it gives us a great foundation on which to build new Dbljump features you can see and use. We’ll have an update about new features soon.
In the meantime, why not join our mission to build the world’s best video game reference now? Choose how you want to get involved and click below: