Skip to content

About

Fun experiment comparing monolithic vs microservices architectures with Go and gRPC.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Order Management System - Architecture Comparison

CI/CD Pipeline Docker Build

This project demonstrates two different architectural approaches for building the same Order Management System: Monolithic and Microservices.

🛠️ Tech Stack

  • Language: Go 1.21+
  • Communication: gRPC, HTTP REST APIs
  • Protocol Buffers: Service contracts
  • Containerization: Docker + Docker Compose
  • Testing: Go testing framework
  • Deployment: Single binary (monolithic) vs Independent services (microservices)

🏗️ Architecture Overview

Monolithic Architecture

  • Single codebase with all services
  • In-process communication
  • Shared dependencies and utilities
  • Simple deployment and development

Microservices Architecture

  • Independent services with separate codebases
  • Network-based communication (gRPC)
  • Independent deployment and scaling
  • Technology diversity possible

📁 Project Structure

oms/
├── monolithic-architecture/      # Monolithic implementation
├── microservices-architecture/   # Microservices implementation
├── docs/                         # Additional documentation
└── ARCHITECTURE_COMPARISON.md    # Detailed comparison

🚀 Quick Start

Monolithic Architecture

See monolithic-architecture/README.md for detailed setup instructions.

Microservices Architecture

See microservices-architecture/README.md for detailed setup instructions.

Docker Compose (Recommended):

cd microservices-architecture
docker-compose up --build -d

🎯 Features

Both implementations provide the same functionality:

  • Orders Service: HTTP + gRPC APIs for order management
  • Kitchen Service: Web dashboard for order visualization
  • Real-time Updates: Dashboard reflects new orders immediately
  • Health Checks: Service health monitoring

📊 Performance Comparison

Aspect Monolithic Microservices
Performance 20,231 req/s 110 req/s
Response Time 467µs 44ms
Memory 20-30 MB 40-60 MB
Communication Function calls gRPC network
Deployment Single binary Independent services

📖 For detailed comparison: See ARCHITECTURE_COMPARISON.md

🔧 Prerequisites

  • Go 1.21 or later
  • Protocol Buffers compiler (protoc)
  • Docker (for microservices)

📖 Documentation

🧪 Testing

Both architectures have comprehensive test suites:

  • Monolithic: cd monolithic-architecture && go test ./... -v
  • Microservices: cd microservices-architecture && go test -v ./tests/integration_test.go

🎯 When to Choose Each Architecture

Monolithic: Small to medium apps, small teams, simple business logic, fast development Microservices: Large complex apps, multiple teams, different scaling needs, high availability


📖 For detailed information: See the individual README files in each architecture directory and the comprehensive Architecture Comparison.

About

Fun experiment comparing monolithic vs microservices architectures with Go and gRPC.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages