World-class public service

The Danish Broadcasting Corporation’s TV application has to be error-free and top-tuned to keep its users coming back. In this article, ProData consultant Sebastian Ostenfeldt Jensen shares the recipe for high performance: A dedicated team, inventive solutions and a fault localizer app.

Interview with Sebastian Ostenfeldt Jensen, Fullstack developer at ProData Consult. Working at the Danish Broadcasting Corporation (DR).

Do you remember the days when you had to be sitting in front of your TV at a specific time to watch the news or the next episode of your favorite series? Now most of us take it for granted that we can catch our favorite shows on the go or whenever we happen to feel like watching. We no longer surf channels, we surf content providers. So if Denmark’s national public service broadcast corporation DR is going to hold on to its viewers, it has to deliver world-class services.

When Danes open the DR TV app on their mobile phones to watch the local versions of Bake Off or X-Factor, they step into a whole universe of content – content provided by the TV application Jensen and his colleagues are responsible for. All content is delivered from this TV application, no matter whether you stream DR’s programs from your mobile phone, your computer or your Playstation. In other words, it’s the backbone of DR’s TV streaming services. This means that an error-free, top-tuned TV application is a decisive factor in allowing DR to realize its ambition to deliver streaming services of the highest possible quality.

“When we talk about performance, we don’t differentiate between clients such as mobile and browser. The TV application is what’s decisive in determining what kind of experience you get on the service you’re using,” explains ProData consultant Sebastian Ostenfeldt Jensen, one of the quirky brains on the development team whose job is to make sure that the app lives up to viewers’ expectations.

Small improvements, high quality

The developers are constantly finding ways to adjust and optimize the app. While many of the improvements aren’t strictly necessary to provide good services, ‘good’ is not good enough from DR’s ambitious perspective. So the development team takes a proactive approach, constantly finding refinements to improve the user experience. And improving the TV application is a question of a making lots of small adjustments. For example, the team improved performance significantly by restructuring the API which communicates with the services: Before, there was a single API which had to send a very large amount of content to the streaming service player pages, which was impractical. In the new solution, the developers have split up the calls to the API, which gives better response times when users access their favorite program. Jensen explains:

“The API would much rather have five separate calls asking for five separate things. This increases performance significantly, gives better response times and takes some of the load off the API.”

There was plenty of room for improvement on the player pages, where users stream programs. For example, the way the lists of related and popular programs at the bottom of the player pages was displayed to users was suboptimal. Every time a user switched to a new player page, the application called the API to request data on related lists. But this was unnecessary, because this part of the page did not change.

Jensen and his team responded by redesigning the way the player pages load the lists of related programs. Their inspiration was a single page approach which only loads the content which changes, and which is standard in newer applications developed today. As Jensen explains it:

“To reduce the amount of content which is loaded when the user switches player pages, we added an ESI link to the player pages. The ESI link refers to a separate address where the lists of the related and popular programmes are located. The referrals make the content load faster and improve response times, because the new ESI link works together with Varnish, DR’s cache server."

Stand-alone troubleshooting app

To measure response times, DR uses a variety of tools to monitor the performance of the TV application. But these tools also help localize relevant errors and pinpoint potential improvements. Thanks to one of the monitoring tools, a developer on the team noticed response times which didn’t live up to DR’s level of ambition.

“The connection between the TV application and our internal server was interrupted, but we couldn’t see what was causing the error or where it was,” remembers Jensen.

To solve the mystery – and others that might arise in future – the ProData consultant developed a separate application with just a single function: to find the error. This is a simple application which simulates the way the TV application makes calls to the API and generates data for further analysis. Jensen says:

“What’s smart about the application is that you can change the settings and simulate a variety of scenarios. In this way, we can learn more about when and where problems occur.”

In collaboration with DR’s DevOps team and the backend team, the developers regularly analyze the data provided by the separate application – and fix the errors and make the improvements revealed by the analyses. Yet another concrete initiative that optimizes response times for the TV application.

Jensen enjoys having co-responsibility for improving the performance of the TV application. Most of us get irritated if we have to wait for our favorite series to start playing, and the consultant is no exception:

"I myself get super irritated when an app has long response times, so I find it very natural to contribute to making sure DR’s viewers have the best possible streaming experience.”

Who’s Who:

Name: Sebastian Ostenfeldt Jensen

Age: 37

Education: Computer scientist, University of Copenhagen

Title: Fullstack developer at ProData Consult, working for the Danish Broadcasting Corporation