MA
martinkr/golem-monolith-microservices
Beispielcode für Golem.de: Microservices
Monolith to Microservices — Evolution example
This repository demonstrates the progression from a monolithic architecture to a fully distributed microservices system. Each folder represents a different architectural stage:
Folder Overview
01_monolith/— Single monolithic application with all logic in one file02_modulith/— Modular monolith: still a single process, but organized into logical service modules03_microservices/— Fully distributed microservices: independent services, separate processesmicroservices/— Additional microservices examples or helper modules
Architecture Stages
Stage 1: Monolith (01_monolith/)
Single file, single process. Everything together.
cd 01_monolith
node index.jsStage 2: Modulith (02_modulith/)
Still a single process and entry point, but code is organized into separate logical modules (services):
data-service.jsaggregation-service.js
cd 02_modulith
node index.jsStage 3: Microservices (03_microservices/)
Each service runs in its own process. Services communicate over the network (HTTP, etc.).
cd 03_microservices
npm install
npm run startQuick Start — Run the final microservices setup
From the root of this repository:
cd 03_microservices
npm install
npm run startThis starts the full microservices demo (usually on http://localhost:3000 or similar). Check the server output for the exact URL.
Prerequisites
- Node.js
- npm
Learning Notes
- Review each stage in order to understand the architectural evolution
01_monolith/shows the original single-file design02_modulith/shows internal organization without distributed architecture03_microservices/shows how to split into separate processes and services- Each stage uses plain JavaScript with minimal dependencies (Express, axios, etc.)
Additional Resources
- Review
package.jsonin each folder for dependencies and scripts - Check
serve.jsin03_microservices/for the orchestration logic - Inspect
services/folders to see service implementations