Elixir and Bleacher Report - An Example of "Individualised Content at Web-Scale"

The Elixir programming language has been quickly gaining ground on Ruby and other web programming languages since its creation (not coincidentally by a Ruby programmer, Jose Valim) in 2011. There are lots of reasons developers of various backgrounds are converting to the language. As the demands placed upon web apps increase - including requirements for scalability and concurrency for highly personalized, highly trafficked websites - the trend towards the Elixir language seems like it will continue.

Adoption of the Elixir language (most Elixir developers use the Phoenix framework) is trending similar to what RoR did in 2006. That development framework received a big popularity boost after Apple announced that it would be shipping the language/framework with its next Leopard operation system.

The discovery and use of Elixir/Phoenix in the past few years by the teams of engineers who have used it to build highly trafficked, high profile websites like Pinterest, Moz, and Bleacher Report has propelled its adoption among developers.

This article describes some of the specific reasons the Bleacher Report engineering team chose Elixir.

Why Bleacher Report Chose Elixir

Michael Schaefermeyer gave a presentation at ElixirConf EU 2015, in which he described the reasons why he and his engineering team chose Elixir to build BleacherReport.com, the second largest sports news website on the internet.

The challenge facing Schaefermeyer and his team when architecting the next iteration of Bleacher Report was fulfilling the site's demand for highly personalized content that allowed visitors to consume news (merged streams of social media and articles) based upon their own preferences, an interaction trademarked by Bleacher Report as "Team Stream".

Before switching over to Elixir, Bleacher Report was primarily written with RoR. The website's functionality consisted of lots of services supporting two primary apps: a UI and an API. Caching was done heavily using Memcached and Redis, which were necessary to offset slow responses from using relational databases (MySQL and PostgreSQL) for data storage.

Despite the team's heavy RoR background, Elixir appealed to the Bleacher Report team as they considered how to serve highly personalized content to millions of users daily.

Elixir's List-Manipulation and Concurrency Capabilities

Elixir, as a functional programming language, naturally handles linked lists well, performing list manipulation efficiently at the execution level besides exposing robust list manipulation functions naturally as a core part of the language.

Bleacher Report's user customization required multiple lists to be manipulated simultaneously to create customized experiences for each of the site's users. The concurrency capability of Elixir, one of the most attractive features the language inherited from its parent, Erlang, allow lists to be sorted and merged in parallel. This significantly speeds up the process of delivering Bleacher Report "Team Stream" content. The Ecto.Repo repository definition for Elixir was used to handle data storage for its lists.

Elixir Maturity and Risk

One of the objections to using a language like Elixir, especially in 2015, when the language was less than a year "stable", is its immaturity, which normally translates into unpredictability. When Elixir was used to create Bleacher Report in 2015, there were very few examples of how to use the language to power large-scale apps in the cloud.

What's impressive about Elixir is that while it was relatively unproven compared to languages like Ruby and NodeJS, its superior utility made it worth the risk.

Elixir's documentation and an active support community have offset much of the risk that is posed to businesses from developing with a new language.

You can watch the full video presentation from Michael Schaefermeyer where he explains why he and his team at BleacherReport.com chose Elixir/Phoenix to create the latest version of the website.

The Future of the Elixir Language

No doubt as there continues to be more demand for highly personalized web experiences that require concurrency and scalability that can't be achieved through Ruby, PHP and other popular web programming languages, Elixir will continue to thrive and grow in its adoption.

Since Bleacher Report's use of Elixir in 2015, several other high profile web apps have also made public their use of the language, including Moz.com and Pinterest.

Elixir with Nanobox

The Nanobox development team has used Elixir extensively. We're impressed by its power and excited about its potential. In fact, our development platform's Elixir support is designed to help Elixir developers use the language to obtain concurrency performance goals similar Bleacher Report without having to divert their attention into specialized DevOps tasks such container (Docker, Kubernetes, etc.) orchestration or handle other hosting and infrastructure issues.

Launch an unlimited number of Elixir apps for $10/mo

Nanobox has streamlined the development to production workflow for Elixir programmers, including everything from setting up your local dev environment to monitoring and scaling an app in production. Here is a quick overview of how the platform works.

To get started with Elixir on Nanobox, follow our Elixir guide to install the Nanobox local dev environment. Once your app is ready to go live, use Nanobox's automated deployment tool to push your app out to your preferred cloud provider.

You may want to read through our explanation of how to deploy Elixir apps on Nanobox to get a feel of what the platform provides for Elixir developers.

When your Elixir app is live, you can use Nanobox's production dashboard for monitoring, scaling, and otherwise managing the app as it grows and evolves.

Richard Robbins

Richard Robbins is a husband, father, and marketing guy. He does technical writing.

@richaned Lehi, UT

Subscribe to Nanobox

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!