Classcraft - Making the Most of Compose

Published

Classcraft gamifies the whole classroom experience, making education a fun adventure for both students and teachers. We chatted with Shawn Young, ex-teacher, programmer, and founder of Classcraft Studios about their teaching platform built on Meteor.js and their use of Compose for MongoDB and Elasticsearch.

“It’s boring.” That’s the usual answer most parents get when they ask their children about school. Shawn Young, a former 11th grade teacher has seen this firsthand in his career. According to Shawn, “There’s a crisis in education right now. We’ve started solving a lot of the logistical problems with technology like parent communication, homework, and distributing resources. But now we’re realizing that, as a market, all these great tools aren’t actually enough to get students excited about coming to school.” Worse, a recent Gallup study found out that this disengagement increases as students progress causing dropouts. At home, the students have a richer digital interactive experience through the internet, social media and games. At school this experience is missing. Shawn wanted to solve this engagement problem.

In 2013, he created a basic online role-playing game that would make the classroom participation more engaging for his students. A former student posted the game on Reddit. Within a week, it went to the front page of Reddit Gaming. And suddenly Shawn started to get inquiries from thousands of teachers about the game. Realizing he had got something here, Shawn teamed up with his father Lauren, a 35-year business veteran, and brother Devin, a creative director in New York, to start Classcraft Studios. 

The first beta of Classcraft was launched in January 2014 and then an open version of the product was made available in August of the same year. The original app was built on PHP. But soon they moved to Node.js and Meteor.js because of the scaling and speed they needed for a real-time game.

Classcraft Dashboard Screenshot

The entire monolithic single server app was hosted on Amazon Web Services (AWS) and deployed using Capistrano, a Ruby tool, for compiling and deploying a Meteor instance. It all worked fine for a year, but as Classcraft exploded in popularity they started to see some hiccups with the architecture. They had only one server, but needed the ability to run multiple instances of the app. Node wasn’t designed for it. They used Passenger (also a Ruby tool) to overcome this Node limitation. NGINX was used to direct people to the right process. It temporarily made things better, but then they started running into memory leak issues that would impact everyone on the server. 'Hot patches' were deployed to fix things in the app, but these forced restarts, which required all users to connect to the database at the same time. As a result, the database started to crash. 

The obvious solution was to scale vertically by adding memory to the servers. So, they switched to the top tier of the AWS services. But soon it became clear that they also needed horizontal scaling – a challenge because documentation on how to do this with Meteor was sparse at the time. Fortunately, Meteor came out with Galaxy, a Docker-based solution for hosting Meteor apps that would enable horizontal scaling through containers. Upgrading from MongoDB 2.6 to 3.2 also helped mitigate some of the performance issues.

But all these changes came at a cost. During peak times, Shawn found himself spending 20 hours a week on sysadmin tasks for just to keep the app running. During one of their upgrades, Shawn said, ”I stayed up all night, and I hadn’t completed the migration – I thought I would do it fast the next day, but basically it was becoming a huge time sink. My senior developer and I were running on fumes. The end of that first night I started looking into other solutions.”

That’s when Classcraft decided to move to Compose. It coincided well, because it was right after Compose had implemented the WiredTiger storage engine as an option. Classcraft could use it to migrate their entire platform very easily. As the product evolved, the team developed features requiring advanced search capabilities. While MongoDB is great at many things, the complex types of location-based and fuzzy searches they needed weren't ones that MongoDB supports well. Thus, Classcraft turned to Compose for Elasticsearch. “Part of what’s cool is that basically you don’t have to provision an entire Elasticsearch setup yourself. I can just press a button [on the Compose console] and then I know, for our use, it’s probably the best way that it should be set up.”

Another feature they liked about Compose was the ability to assign user permissions and roles. “It’s actually pretty cool to be able to give developers selective access. For awhile we would restrict access to the database on the old stack, because you could just go in there and write queries and erase all the users, right? You don’t want to let anybody do that.” 

With Compose, Classcraft was able to select the right tools for the app they were building without all the administrative overhead. “Looking back, I am very happy that we moved to Compose,” Shawn said. “Basically, Compose took the hassle of database management off of our hands so we could focus on what’s most important to us - our product. And I didn’t have to do anything. It’s pretty great!”

So how is Classcraft doing these days?

“Fantastic!” according to Shawn. They just passed 2.1 million users. The app is available in 75 countries in 10 languages. People are flooding social media with great testimonials and feedback. Classcraft's success is getting noticed in academia too who are publishing papers on their achievements. And then there are schools where kids are dressed up in armor and doing giant dance battles against one another - as part of the game exercise! Occasionally they would get a testimonial from a teacher that says, 'This has completely changed my classroom. It’s the best thing that’s happened to me in my entire career.'

“It’s all very humbling”, said Shawn. “Thanks to Compose for having our back as we set to make an impact in the educational sector.”

To learn more about Classcraft Studios and their platform, visit: https://www.classcraft.com/.


If you have any feedback about this or any other Compose article, drop the Compose Articles team a line at articles@compose.com. We're happy to hear from you.

Image by: Classcraft