How CBT Nuggets Uses MongoDB Realm to Deliver a 5-Star App for 15,000 monthly users

When CBT Nuggets’ founder Dan Charbonneau started making training videos in the 1990s, he recognized that budget-conscious individuals and businesses needed a way to access education without being tied to a physical classroom. This insight explains the success of CBT Nuggets, an online IT training provider that now offers more than 5,000 courses ranging from basic computer skills to complex, certified network management.

CBT Nuggets works to ensure subscribers can view content from anywhere, at any time. To meet this promise, classes are delivered through streaming videos that range from ten to twenty minute “nuggets.” Content is available on both desktop and through a mobile app, making it easier for learners to fit training into their already-busy lives. But delivering high-quality, cross-platform content to remote learners is sometimes easier said than done.

Meeting User Needs in a Mobile-First World

In 2012, CBT Nuggets was providing an excellent desktop experience. The company knew its 60,000 learners also wanted to view content on mobile devices for added convenience. CBT Nuggets had released mobile apps on iOS and Android to fill this need, and were looking to see a good return on their investment.

By late 2014, the company knew they needed to better meet users where they were and opted to build new mobile applications from the ground-up. After talking to users, CBT Nugget’s development team discovered that learners might start a video by viewing it on a mobile device, and then complete the training later in the day from a desktop computer. Subscribers might sign-in to the mobile app to access the course catalogue, and from there would begin or resume viewing video content that they had downloaded to watch offline.

“That insight changed the whole perspective of how you architect these apps,” shares Isaac Overacker, the Software Architect responsible for mobile apps at CBT Nuggets. “The core goal of the app was to deliver a rock-solid offline experience to the user, meaning we needed apps that were built to be offline by default. And we needed the client-side datastore - Realm - to be the central source of truth.”

CBT Nugget’s new mobile app needed to work regardless of the strength of a network connection. A learner’s viewing history needed to consistently and reliably sync across both desktop and mobile applications. And both web and mobile applications needed to keep feature-parity to ensure a consistent user experience across devices. If the mobile development team could meet these user requirements, CBT Nuggets believed they could deliver a best-in-class mobile experience to their users. Realm’s Database and a client-to-server sync provided the solution.

Delivering a 5-Star Mobile App Experience

As CBT Nuggets’ iOS Team began work on the new app, they quickly decided to replatform on the Realm Database and build a homegrown sync solution in parallel.

According to Overacker, the decision to use Realm Database was easy. “A colleague brought the Realm Database to my attention, and I immediately fell in love with it. The whole schema is code and it just fit with how we were thinking about our development cycle.”

To deliver on user needs, the new application also required a reliable data sync between the client and server. 31% of CBT Nuggets subscribers watch video content on both desktop and mobile. For users viewing content on mobile, the Realm database acts as the source of truth for course progress and user's profiles on device and needs to be up-to-date at all times. CBT Nuggets initially created and hosted a DIY sync solution that fanned out to different systems, polling for changes that needed to be reconciled in the app. When an offline user viewed videos, “heartbeats” were taken every few seconds to track what percentage of a video has been viewed. That data was sent to a unified backend as soon as the device was back online.

The new iOS app was released by late 2015, and immediately began outperforming the company’s Android app built on SQLite. The prior iOS app, built on Xamarin had an average 2-star user review. The new iOS application built on Realm was reliable, resilient, and rapidly improved the app store user rating to achieve a 4.9-star average. Initial data loads of the course catalogue and video content - which involved pulling all JSON data into the device - were completed in seconds, when it had previously taken 30 seconds or more. By early 2017, CBT Nugget’s Android app had also been replatformed to run on Realm and Google Play Store reviews showed 4.8 stars.

CBT Nuggets’ new mobile applications were resulting in thousands of happy users, with 15,000 monthly active mobile app users. “Realm is a big part of why our apps are so stable and so well-received,” shares Overacker.

Unlocking the next stage of development velocity

For users, the mobile apps built on Realm Database, with a DIY sync solution, delivered a reliable and up-to-date viewing experience at all times, across all platforms. But for the development team, the architecture came with significant trade-offs.

CBT Nuggets’ mobile development team invested months writing the polling code to batch for changes on multiple platforms, and to reconcile those changes. New feature development was slowed down by the need to update their synching mechanism, and monitoring the homegrown sync was difficult. The app developers were responsible for delivering the complete experience to the customer, but when problems arose, the complexity of the DIY sync code meant work needed to be coordinated across multiple teams, slowing down the resolution.

With the launch of MongoDB Realm, CBT Nuggets team is now able to offload the work of building and maintaining their sync solution, and focus on shipping new fullstack features that they know users need. With Realm Sync, data is stored on MongoDB Atlas on the backend Realm Sync ensures data stays up-to-date across the client and server, in real time. To get started, the team just needed to create a model for their data and add it to Realm in order to start syncing, giving them the ability to start syncing quickly. With MongoDB Realm's Sync,the CBT team doesn't have to worry about scaling, managing, or upgrading their infrastructure.

The CBT Nuggets development team is thrilled.

CBT Nuggets

MongoDB Realm drastically changes the speed at which we’re able to unlock and build new features. It has a measurable impact on our developer experience and time-to-market. It’s so much simpler to implement a new feature across multiple platforms, now.

For CBT Nuggets’ app developers and customers, that means that delivering high-quality, cross-platform content might be easy, after all.