/disecomm

A distributed ecommerce platform used for educational purposes

Primary LanguageJava

Disecomm - A distributed ecommerce platform

Disecomm is a distributed ecommerce platform used for educational purposes. It's a project focused on distributed architecture and microservices.

The idea is to focus on the architecture and the communication between the services, so the business logic is very simple and not the main focus of the project.

The project also explores observability, monitoring, and logging, so we can have a better understanding of what's happening inside the system.

Note: This project is intentionally over-engineered to explore different technologies and architectures.

Documentation

High-level architecture overview

Node: The architecture is still a work in progress, so it may change in the future.

High-level architecture

Technologies

  • Programming languages: Java, Go, TypeScript
  • Frameworks: Spring Boot
  • Databases: PostgreSQL, MongoDB, Redis
  • Message brokers: Kafka, RabbitMQ
  • Communication: REST, gRPC, GraphQL
  • AuthZ/AuthN: ??
  • Observability: Prometheus, Loki, Tempo, Grafana
  • Containerization: Docker, Kubernetes
  • CI/CD: GitHub Actions
  • Load testing: K6

Running the project locally

To run the project locally, you need to have Docker and Docker Compose installed on your machine.

Note: This project has many resources and services, so it may take a while to start everything. And it may consume a lot of resources from your machine.

  1. ๐Ÿ—๏ธ Build all the services:
make build-all

Note: The first time you run this command, it may take a while to download all the dependencies.

  1. ๐Ÿš€ Start all the resources and services:
make run-all
  1. ๐ŸŒ Access the resources and services at:

  2. ๐Ÿ“ˆ Run load tests with k6:

Note: You need to have k6 installed on your machine to run it from local.

  • Running k6 load tests will populate the Grafana dashboard with cool metrics.
  • The default scenario runs for 15 minutes. Check the main.js file to see the scenario details
make load-test-local

Running from local gives you better progress logs.

But You can also run the load test using docker:

make load-test-docker

Note: K6 dashboard will not be populated if you run it from docker (yet ๐Ÿ˜ฌ)

  1. ๐Ÿงน Clean all the resources and services:
make clean-all

#. Others

  • Use make or make help to see all the available commands.

grafana-dashboard.png k6-dashboard.png traces.png