Learning Microservices with Weightlifting

Overall Goal and Plans

After several books and countless YouTube videos about microservices it is time to build my own. What better way to ensure my accuracy and understanding than documenting the creation and evolution of my first application using microservices.

I will be building a web application to track workouts. The base functionality will include viewing past workouts, logging new workouts, tracking personal records and uploading videos.

architecture-resized.png

This application has a lot of potential for future functionality such as user authentication, integration with other sports and payment APIs.

What are microservices?

Microservice architecture is a way of structuring a large application in to many smaller isolated applications. Creating many small services instead of one large monolith application has many advantages.

  • Services can use different technology stacks
  • Each service can be updated and deployed independently
  • One service can fail without affecting all other services
  • Services can scale independently

There are disadvantages to using a microservice architecture.

  • Communication between services can introduce latency and complexity
  • Debugging entire applications can be difficult

Following along

All of the source code for this project will be available in a GitHub repository. I am developing this application on Linux. If you are using Mac or Windows some of the commands I demonstrate may need to be modified.

Required Tools

Please follow the linked documentation to install node and docker.

Optional Tools

Feel free to use whatever editor and tooling you choose. Screenshots in this series will show Visual Studio Code as my editor, Postman for testing the API and MongoDB Compass for viewing the state of the databases.

Technology Stack

The front end for this project will be written with Next.js and hosted using Vercel. Each microservice will be written in JavaScript using nodejs and packaged with Docker. Each microservice requiring a database will have its own MongoDB instance. We will use AWS S3 for object storage where required.

node-logo.png

mongo-logo-resized.png

nextjs-logo-white-resized.png

docker-logo-resized.png

Whats Next?

Post about setting up the API coming on Tuesday 1/18/2022.

Additional Reading

What are Microservices? | IBM