OpenShift 4
Storage Templates and Catalog
Example Voting Application
Hello, and welcome to this lesson. My name is Mumshad Manambath. In this session, we'll delve into microservices architecture by deploying a simple yet powerful web application. This sample application, renowned for its Docker demonstrations, illustrates how to build and deploy an entire application stack using Docker.
Application Overview
This voting application comprises multiple components, each built with a distinct technology, seamlessly integrated to offer a complete voting solution.
Voting Interface – Python
The application starts with a Python-based web interface where users can cast their vote between two options: cats or dogs. When a vote is submitted, it is stored in Redis, serving as an in-memory data store.
Vote Processing – .NET Worker
After a vote is registered in Redis, a dedicated worker application written in .NET processes the vote. This worker updates a PostgreSQL database by incrementing the vote count for the selected option. The PostgreSQL database maintains a table with the total votes for each option, ensuring that all entries are accurately recorded.
Note
The PostgreSQL database is critical for data persistence, ensuring that each vote is reliably accounted for in the application's record.
Results Display – Node.js
The final component is a web interface developed in Node.js, which retrieves the latest vote counts from PostgreSQL and presents the results to the user, ensuring that the displayed data is always current.
Microservices Architecture in Action
The sample application integrates diverse services and development platforms—including Python, Node.js, and .NET—to form a cohesive microservices architecture. This implementation serves as a prime example of how to configure an entire application stack with Docker, leveraging the strengths of multiple technologies.
Warning
Be diligent in monitoring and maintaining each component of this microservices architecture to effectively manage potential debugging and scaling challenges that may arise from using multiple programming platforms.
Watch Video
Watch video content