Databases

Build it like you MEAN it with MongoDB Atlas on GCP

[Editor’s note: Today, we hear from the folks at MongoDB, who give their take on how to build high-performance web and mobile apps with fully managed cloud and database services.]

As a developer, you’re likely familiar with the LAMP stack—Linux, Apache, MySQL and PHP—, open-source components for building dynamic websites and web applications. In recent years, LAMP has given way to MEAN and MERN—development stacks used to build web and mobile applications.

The MEAN stack is comprised of the following open-source components:

  • MongoDB, a NoSQL database
  • Express.js, a web application framework that runs on Node.js
  • Angular.js or Angular, a JavaScript MVC framework that runs in browser-based JavaScript engines
  • Node.js, an execution environment for event-driven, server-side, and networking applications

mean_mern_mongodb.png

At the same time, React.js has risen in popularity since the MEAN stack was introduced and emerged as a popular alternative to Angular.js. React.js is a JavaScript library that can be executed either in the browser or on the backend server within Node.js.

The beauty of MEAN and MERN is that they are based on a standard development language—JavaScript—for both server-side and client-side execution. This standardization gives organizations greater flexibility when it comes to hiring developers and grants the advantage of not having to switch contexts while writing client side and server side code.  Developers also report that coding in JavaScript delivers performance improvements.

The benefits of MongoDB Atlas -- Managed Cloud Database

MongoDB is a document-oriented NoSQL database known for its scalability, rich queries, and auto-sharding. MongoDB Atlas delivers all the same functionality but as a fully managed cloud database. MongoDB Atlas features built-in operational and security capabilities that automate time-consuming administration tasks such as infrastructure provisioning, database setup, ensuring availability, global distribution, backups, and more. With Atlas, sharding a cluster or building out a three-node replica set is as easy as clicking a button. The UI and API are easy to use, so developers can spend more time building applications and less time managing the database.

We offer a free tier of MongoDB Atlas on Google Cloud Platform (GCP), which provides 512 MB of storage, enough space for developers to play with the database and build a prototype without ever entering a credit card number.  

Why GCP?  

Here at MongoDB, we’re big fans of GCP, which lets organizations reduce infrastructure costs while improving application reliability and scalability. Each selectable region in MongoDB Atlas contains at least three zones for availability with the ability to offer backup and disaster recovery on a global scale to prevent service disruptions. This enables us to provide higher availability, lower latency, and improved security.

Deploying a MEAN or MERN app to GCP

There are a couple ways you can deploy your MEAN or MERN web application on GCP. You could, for example, use the Google Compute Engine and install everything from scratch. But our favorite method for deploying a MEAN or MERN application to Google Cloud Platform is to leverage containers and Google Kubernetes Engine (GKE). Doing so can be done in just three steps:

  1. Deploy a container using Cloud Build.

  2. Register the container in the GCP environment using Container Registry.

  3. Finally, add these images to GKE to provide a highly available application environment.

Running a MEAN/MERN development stack on top of GCP can free your team to focus on adding value to your application, rather than configuring and maintaining infrastructure. If you’d like to learn more, register to attend our webcast on October 9th 11:15am PT.