Scalable backend
AVROTROS wanted us to develop the infrastructure on Google Cloud Platform (GCP). This gave us the opportunity to set up the back-end completely cloud-based with Google BigTable as a scalable data source, Go as a cloud optimized development language and gRPC as very efficient communication between the backend and apps. Our solution can handle a high load without having to fall back on caching.
One million users
So, scalability of the back-end was the most important starting point for this project. The peak load is enormous: around one episode, one million viewers use the app and the requests per second can increase very quickly. The rest of the week the load on the app is minimal. By choosing a scalable data source and putting all services in pods that can scale easily and quickly, we are prepared for all scenarios.
Optimizing data traffic
If one million players are using the app, a scalable back-end alone is not enough. The data traffic between the app and the back-end must also be optimized. We tackled this in two ways.
- The first is gRPC. This is an optimized communication framework that outperforms REST with JSON or XML, offers lower latencies, and can integrate into the apps to minimize possible errors.
- The second optimization is that we have drastically reduced the number of back-end calls from the app to the back-end by giving the app itself more responsibilities with state management and by storing data locally. This means that only changes need to be communicated.
Smart UI/UX improvements
Without designing the app from scratch, the AVROTROS designer has also implemented smart UI/UX optimizations. For example, the suspicion game ('verdenkspel') needed improvement, but as the most important part of the app, it was exciting to adjust this interface. The AVROTROS designer has therefore designed several interfaces to test with end users. By quickly testing these prototypes with real users, we were able to iterate quickly. After the second prototype, the designer had enough feedback and confidence to create a final new design. A concept that AVROTROS had wanted for some time, namely the equal distribution of points among candidates, became an important new function. This wish was left on the shelf, because it did not really fit in with the old concept.
The challenge of the ruler
The suspicion game also includes a ruler with which players can bet points on a candidate. The principle of the ruler is simple. But the challenge is to create a clear ruler that allows for 100 points and also 50,000 points to be distributed and that swipes smoothly. We developed several prototypes to achieve the right UX feeling. A mathematical proof-of-concept was also created to determine how the ruler scales with the number of points a person has. Because from when is a line on the ruler worth not one point, but five points, for example? And what is the maximum length of the ruler so that it does not become too long or short?
Stress testing
Before the first broadcast, hundreds of thousands of players installed the app, created accounts, created pools and wagered points. There are only a few weeks between the moment the app is available for download and the first episode, during which there is no room for errors or the release of a new version of the app. As a result, good testing was conditional in this process. Together with Polteq's software testers, we set up a cloud-based testing system that can perform realistic - but also much higher - load, peak and stress tests on expected usage scenarios.
Realistic test for one million players
A realistic test for the app meant that we had to simulate millions of players playing the game. Loading individual endpoints to see whether the backend scales up properly and can handle the load is too one-sided. It is often the combination of various actions performed simultaneously (read and writes) that reveals problems. That is why we have divided virtual players into various playing strategies with their own behavior. For example, a casual or fanatical player, or a player who divides her points among several candidates, or someone who has been convinced from the start who the mole is. By giving the virtual players such properties, we have imitated specific behavior and created a more realistic image.
Thanks to smart choices, full focus on scalability and very good testing, the new Who is the Mole? app can handle millions of users. Let's play!!