To be honest, codebase requires refactoring due to problems in core functionality and architecture If you're going to review this distributed ball of mud, I sincerily apologize, It has been made in 8 days from Pre-Existing Services that I had written as part of previous homeworks in the Otus Microservice Course
This is my final project for Otus Microservice architecture course Theme: E-Store
Functionality:
- Authentication
- Billing
- Warehouse tracking
- Order placement
- Notifications
- Delivery
The system is based fully on Event Sourcing and Reactiveness. I chose Kafka as a Message broker and Project Reactor as reactive extensions provider for Java
GraphQL API wasn't implemented and Product Aggregate doesn't fully work. There is also a big flaw in the processing of changes to the warehouse
Notifications are implemented just by writing into MongoDB
Authentication uses JWT. Refresh tokens weren't implemented
Authorization was to be processed on the Infrastracture level using Envoy Proxies and examining of the contents of the provided JWT
- Kubernetes Cluster
- Helm
- Install istiod
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
kubectl create namespace istio-system
helm install istio-base istio/base -n istio-system
helm install istiod istio/istiod -n istio-system --wait
- Install istio-ingress
kubectl create namespace istio-ingress
kubectl label namespace istio-ingress istio-injection=enabled
helm install istio-ingress istio/gateway -n istio-ingress --wait
- Run
bootstrap.sh
in KubernetesDeployment folder. It will install everything needed into newly created namespacefinal
- Run
tear-down.sh
in KubernetesDeployment folder. kubectl delete ns stream-processing
Total: 20 Gi of Storage and ~4 Gi of RAM
git clone https://github.com/ReDestroyDeR/E-Store-Otus-Final
- Start all the dependencies via
docker-compose up -d
- Open
E-Store-Otus-Final
in IntelliJ as Project - (Optional) If modules haven't been detected automatically you need to:
- File -> Project Structure -> + -> Import module -> ( NotificationService/OrderService/BillingService/...) -> Maven
- Wait until they don't appear in Project Structure Menu
- Generate Avro schemas for each service
mvn avro:schema
- Mark
target/generated-sources
as generated sources folder in Project Structure- ... Service -> Sources -> Select target/generated-sources -> Alt + S -> (On the right panel) Source Folders target/generated-sources Edit properties (Pencil Symbol) -> Check For generated sources
- You have ready development deployment!