Repl.it: A collaborative cloud development environment for work and the classroom

About Repl.it

Repl.it is building a full-featured, serverless hub for collaborative online development and classroom coding. Based in San Francisco and founded in 2016, Repl.it moved its solution to the cloud to serve its surging base of developers and students.

Industries: Technology
Location: United States

Repl.it is building a first-of-its-kind online development environment for students and developers to learn, collaborate, build, host, and ship applications.

Google Cloud Results

  • Scales up and down on demand to accommodate collaborative learning and deploying for developers and students
  • Pushes and pulls builds quickly and more securely without leaving the network using Google Container Registry
  • Enhances the developer and student experience with easy-to-use Google CLI

1 million monthly active users

Repl.it is revolutionizing software development and education by taking what's traditionally thought of as a solo experience, putting it on the cloud, and making it multiplayer.

"We just exceeded 1 million coders a month," says Repl.it CEO and Co-founder Amjad Masad. It's a milestone that he takes personal pride in because Amjad has dedicated most of his professional life to a single mission: making programming accessible and software easier to develop and share.

Amjad's passion for creating a better programming experience began years ago while working as a founding engineer at Codecademy. Codecademy provides free programming lessons in over a dozen languages to 45 million users, especially those in underserved communities. Amjad left Codecademy to pursue a broader opportunity — to build a first-of-its-kind online development environment not only for classrooms, but also for commercial developers.

The company's services are popular with two groups. For students, Repl.it is a plug-and-play classroom resource. About 20 percent of all kindergarten through 12th grade schools in the United States engage or have engaged with Repl.it in code jams, hackathons, and other activities. For developers, Repl.it is a collaborative, live work environment where they can build, iterate, and tap into more advanced features, including hosting web services, packaging products, and shipping applications.

"When we hit a certain CPU threshold, Google Cloud Load Balancing will instantiate new instances and go up and down as needed."

Amjad Masad, CEO and Co-founder, Repl.it

On a typical day up to 70,000 developers across more than 60 countries collaborate via Repl.it. They use Repl.it's multiplayer feature, working in a shared Repl.it container and programming in one or more of the 47 languages that Repl.it supports. Repl.it encodes language support into its integrated development environment (IDE) browser.

For its developers and students, Repl.it delivers a substantial value: minimizing the time spent acquiring, setting up, supporting, debugging, or adding a third-party package to an IDE. Developers and students want to "jump into a coding session in seconds and immediately begin collaborating with others," says Repl.it Designer Haya Abdalla. And that, Haya adds, is why the startup took its name from the REPL shell UI that supports writing software interactively and executing it without delay.

Perhaps the most remarkable feat is that with a staff of seven, the firm delivers a full-service experience to so many developers. As it uses Google Cloud Platform (GCP) and Google Kubernetes Engine to increase the efficiency of its DevOps team, the Repl.it team has more time to manage and extend its platform.

From a single VM to the cloud

Repl.it found a flexible partnering relationship — and a reliable technology environment — by working with Google Cloud for Startups. Amjad and his team worked with Google Cloud to integrate the legacy open source pieces of the Repl.it ecosystem, including its Redis database and containers, into a scalable cloud-based platform.

The Repl.it platform began as a single virtual machine — a Droplet on Digital Ocean. Amjad deployed using secure shell protocol (SSH) and git clone . As its user communities grew to 1 million actives in less than two years, Repl.it's success brought new challenges.

The initial challenge was the execution environment — the container system that allows developers to run their code securely and concurrently. It grew quickly, morphing into a rapidly expanding distributed system that needed to scale on demand.

Finding solutions to building, deploying, and maintaining this scale of infrastructure overwhelmed the Digital Ocean Droplets environment. "We would manage our own Redis and manage our own Docker container registry," Amjad recalls. "When we needed to scale, we had to move to a better deployment process."

Repl.it first turned to AWS but found it didn't meet the organization's needs. "The documentation wasn't helpful, Cloud Deploy didn't work as expected, and, there was just a general lack of support from the AWS team," says Amjad. This prompted the move to GCP.

"It [the Google command line interface] is really well-designed. It's easy to explore and easy to find documentation for."

Amjad Masad, CEO and Co-founder, Repl.it

Cloud partnering to scale legacy open source

Today, Repl.it uses Ansible to push deployments, creating instance templates in Container Registry in GCP Cloud Memorystore provides a low-latency, in-memory store for the Redis database. Compute Engine scales the instance group automatically.

This is a crucial piece because Repl.it's execution environment must now support about 10,000 concurrent containers. "When we hit a certain CPU threshold, Google Cloud Load Balancing will instantiate new instances and go up and down as needed."

Repl.it uses Google Container Registry and Cloud Storage to more securely and responsively manage Docker images and build and deploy pipelines. A proxy prefix handles the persistent links for containers. Cloud Memorystore provides a scalable, low-latency, in-memory store for the extremely distributed Repl.it Redis database. The REPL functionality is coded in the browsers used by developers and classroom coders. BigQuery interacts with Segment.com to capture metrics showing how Repl.it communities use site components.
Repl.it uses Google Container Registry and Cloud Storage to more securely and responsively manage Docker images and build and deploy pipelines. A proxy prefix handles the persistent links for containers. Cloud Memorystore provides a scalable, low-latency, in-memory store for the extremely distributed Repl.it Redis database. The REPL functionality is coded in the browsers used by developers and classroom coders. BigQuery interacts with Segment.com to capture metrics showing how Repl.it communities use site components.

A code-in-the-browser environment

As Repl.it's integration with GCP progressed, Amjad found a new code-in-the-browser solution to communicate more responsively with Cloud Storage. The innovation was presaged by Amjad's prior engineering expertise.

In 2010, when Amjad was a computer science student at the Princess Sumaya University in Jordan, dismayed by the process of setting the development environment he became convinced that browsers held enormous potential to streamline the coding experience. He set about building the first open source, in-browser REPL. Several companies based in the United States quickly recognized its value, and so did Codecademy, which integrated it into its classroom platform.

Amjad's new, cloud-based browser environment uses the signed URLs feature of Cloud Storage. When a Repl.it IDE browser creates a new file, it obtains a signed URL from the web server to create the file in Cloud Storage. "That way the browser's writing to and reading from Cloud Storage directly," says Amjad. "This enables Repl.it to use Cloud Storage to synchronize its files and file system."

"I would say to start-ups: before you scale, leverage your own architecture with the start-up programming that Google Cloud Platform provides and talk to the Google staff engineers."

Amjad Masad, CEO and Co-founder, Repl.it

Integration flexibility, well-designed UIs

Repl.it also uses a new Google Cloud feature that brings the on-demand billing flexibility of Cloud Functions to the container world. "That'll bring down our costs even more and we can offer our customers the flexibility to build production systems here and host them on Google Cloud via our IDE," says Amjad.

BigQuery helps Repl.it better understand its users. Every day, Repl.it uses BigQuery, which interacts with a legacy Segment.com proxy to capture metrics showing how students and developers use the site. Amjad is excited about the new UI for BigQuery, which captures more events and displays an instrumentation of component usage.

Repl.it thinks the new interactive Cloud command line interface (CLI) in GCP is a great fit for its students and developers. "It is really well-designed," explains Amjad. "It's easy to explore and easy to find documentation for." He also likes the CLI auto-update feature. When a new version of Google Cloud is released, the CLI automatically prompts users to stay in sync.

"There's a school of thought in start-ups that you should not worry about scalability until it happens and a big part of that is true," says Amjad. "But if you actually scale, you're in a world of pain." He laughs and offers this advice: "I would say to start-ups: before you scale, leverage your own architecture with the start-up programming that Google Cloud Platform provides and talk to the Google staff engineers."

Contributors to this story

Amjad Masad: Repl.it CEO and Co-founder. Amjad was the founding engineer at Codecademy and created developer tools for Facebook prior to launching Repl.it in 2016.

Haya Abdalla: Repl.it Designer and Co-founder. A full stack UX designer, Haya developed the information architecture, website, and UI for Repl.it.

About Repl.it

Repl.it is building a full-featured, serverless hub for collaborative online development and classroom coding. Based in San Francisco and founded in 2016, Repl.it moved its solution to the cloud to serve its surging base of developers and students.

Industries: Technology
Location: United States