Repository navigation
01‐ Intro
This workshop will guide you through the process of building a robust and scalable microservices-based application using Go. We'll cover essential concepts, patterns, and tools to design, implement, and deploy interconnected services.
Throughout this workshop, we'll be building a simple User and Task Management system. This system will be decomposed into independent micro-services, each responsible for a specific domain or functionality.
By the end of this workshop, you'll be able to:
- Understand the core principles of micro-service architecture.
- Design and implement Go micro-services using the Fiber framework.
- Set up communication between micro-services using HTTP and the NATS messaging system.
- Persist data using a MySQL database.
- Implement the Command Query Responsibility Segregation (CQRS) pattern for better data handling.
- Use Docker Compose to define and run multi-container applications.
- Gain insights into testing, monitoring, and other crucial aspects of micro-service development.
We'll be using a modern technology stack that is well-suited for micro-service development:
- Go (Golang): A fast, concurrent, and efficient programming language ideal for building micro-services.
- Fiber: A lightweight and high-performance web framework for Go, perfect for creating RESTful APIs (https://gofiber.io/).
- MySQL: A popular open-source relational database for data persistence.
- NATS: A simple and performant messaging system for asynchronous communication between services (https://nats.io/).
- Docker Compose: A tool for defining and managing multi-container Docker applications.
Our project will be divided into multiple services, each representing a distinct part of our system:
-
User Service:
- Responsible for managing user data (creation, retrieval, updates, deletion).
- Will be implemented using the CQRS pattern, separating commands (data modification) from queries (data retrieval).
-
Task Service:
- Handles task-related operations (creating tasks, assigning tasks to users, updating task status, etc.).
- Will communicate with the User Service to retrieve user information when needed.
-
Notification Service (Optional):
- A potential addition for handling asynchronous notifications to users, such as email or real-time updates.
To help you learn progressively, the workshop is divided into branches. Each branch builds upon the previous one, introducing new concepts and features:
- Download Go: Visit the official Go download page and download the installer for your operating system.
- Install Go: Follow the installation instructions for your OS.
-
Verify Installation: Open a terminal and run
go versionto verify the installation.
- Download Docker: Visit the Docker website and download Docker Desktop for your OS.
- Install Docker: Follow the installation instructions provided by Docker.
-
Verify Installation: Run
docker --versionin your terminal to ensure Docker is installed correctly.
- Download Git: Git Page
- Install Git: Follow the installation instructions provided by Git.
REPO URL: https://tinyurl.com/go-task

-
Clone the Repository:
-
git clone https://github.com/rfashwall/go-task.git
-
-
Navigate to the First Branch:
-
git checkout 01-create-our-first-micro-service
-
Now we're ready to begin the workshop! Let's start by building our first micro-service.