1. Home
  2. Training Library
  3. DevOps
  4. Courses
  5. Building A Cloud Native Application

Architecture Review

The course is part of this learning path

Contents

Introduction
1
Introduction
PREVIEW3m 32s
Quick Demonstration
Architecture Review
5
Go API
9m 54s
Test and Validation
Summary
12
Review
1m 15s
Start course
Overview
DifficultyIntermediate
Duration51m
Students30

Description

Introduction

This training course is designed to help you master the skills of designing and building cloud native applications.

Observe first hand the end-to-end process of building a sample cloud native application using React, Go, MongoDB, and Docker. By taking this course you'll not only get to see firsthand the skills required to create a robust enterprise grade cloud native application, but you'll also be able to apply them yourself as all code and deployment assets are available for you to perform your own deployment:

https://github.com/cloudacademy/voteapp-frontend-react
https://github.com/cloudacademy/voteapp-api-go
https://github.com/cloudacademy/language-vote-app

Learning Objectives

What you'll learn:

  • Understand the basic principles of building cloud native applications
  • Understand the benefits of using React for frontend web development
  • Understand the benefits of using Go for backend api development
  • Understand the benefits of using MongoDB as a database system
  • And finally, you’ll learn how to package and run microservices as lightweight containers using Docker

Demonstration

This training course provides you with several hands on demonstrations where you will observe first hand how to

  • Build a React based web frontend
  • Build a Go based API
  • Deploy and configure a MongoDB database
  • Deploy the full end-to-end application to Docker running locally

Prerequisites

  • A basic understanding of web based software development
  • Previous exposure to containers and containerisation - in particular docker

Intended Audience

  • Anyone interested in learning how to architect cloud native applications
  • Anyone interested in using modern development tools such as React, Go, MongoDB and Docker
  • Anyone interested in containerisation
  • DevOps Practitioners

Transcript

- [Instructor] Okay, welcome back. In this lecture, I'm going to provide you with a quick, high-level review of the architecture used to create this application. In doing so, you will understand the messaging and networking requirements to make this application functional, and, also, as used in the setup in this course and the next course when we deploy it into Kubernetes. 

From an end user point of view, the application provides a web front-end, which allows the end user to vote for their favorite programming language. As the application initially launches, an AJAX call is made to the API to request the particulars for each displayed programming language. In this case, three AJAX calls are made. After the page has completed loading, the end user can then click on any one of the +1 voting buttons to vote for their preferred language. This again results in an AJAX call that is directed at the API. 

The API, as we now know, has been developed in Go and simply reads and writes to a back-end MongoDB database. The high-level architectural view, as shown here, documents the composition of the application. The application consists of the following three components, packaged as containers: The front-end; a React-based web application, which provides a voting interface. The API; a REST-based API developed in Go. This provides typical Create, Read, Update and Delete API endpoints. The front-end web application generates AJAX calls which are then sent and serviced by this API. The database; a MongoDB database. The API connects to the database and performs the required read/writes. 

In the next course, we'll set up MongoDB within Kubernetes as a replica set for redundancy purposes. 

The following sequence diagram shows the messaging as used within the application when the application first loads. Key points of this diagram are: One, the browser loads the main application, HTML, JavaScript and CSS files. Two, each programming language component makes an individual AJAX call to the /languages/{name}API endpoint to retrieve the details about the programming language keyed on the programming language name. Three, the API in turn connects to the back-end MongoDB database and performs a db.collection.find, filtered on the programming language name to return the document that contains all the details about the programming language. Four, a response containing the programming language then flows back all the way to the browser. Five, the browser renders the final full application view. 

The following sequence diagram shows the messaging as used within the application when an end user clicks on the +1 voting button for a particular programming language. Key points of this diagram are: One, clicking the Vote button for any one of the three programming languages will result in an AJAX call being made from within the Vote component to the API endpoint languages/{name}/vote. Two, the API in turn connects to the back-end MongoDB database and performs a db.collection.updateOne, filtered on the programming language name and increments the Vote field on the respective document. Three, an update success code is returned in the response and is passed all the way back to the originating AJAX call. Four, the browser renders and increments the respective Votes div within the Vote component. 

Okay, that completes this lecture on a brief but important high-level architectural review of the entire cloud-native application. 

Go ahead and close this lecture and we'll see you shortly in the next one where we'll review the React-based front-end code base, exploring the key component

About the Author

Students10951
Labs28
Courses65
Learning paths15

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.
 

Covered Topics