GithubHelp home page GithubHelp logo

cq-shop's Introduction

CQ Shop

Build Status

Intro

An e-commerce system written in a microservice architecture. Communication between applications is implemented mainly with events that are processed by Kafka

The following applications are domain services:

  1. cart-service
  2. logging-service
  3. notification-service
  4. order-service
  5. user-management-service
  6. warehouse-service

The following applications are infrastructure/application services:

  1. api-service-gateway
  2. config-server
  3. eureka-server
  4. schema-registry-server
  5. Kafka
  6. traffic-simulator

Technology Stack and Architecture

All the services are implemented with Java 11 and Spring Framework. Each application is built with Gradle. They use Config Server and Eureka Server.

The api-gateway-service is an application that runs as a Zuul Gateway. It delegates all the calls into proper services.

Current Architecture

Current Architecture

Topics and Streams

All the domain applications publish to Kafka two kinds of messages:

  1. domain events - messages that notify about a fact that has happened in the system, e.g. user account created.
  2. commands/queries - messages related to CQRS implementation. Those messages are used to pass information within an application/service.

There are two main types of Kafka Topics:

  1. service-name-events - topics for domain events. Domain services are allowed to listening to only those streams.
  2. application-command-topic - a topic for command/queries messages

Messages format

All the messages are transferred as Avro Messages. The schema of all events is available in the avro/ directory. Microservices are using schema-registry-server to register and receive schema related information.

TODOs and tech debt

  1. Cover services with unit tests.
  2. Write integration tests. Consider Spring Cloud Contract.
  3. Refactor traffic-simulator.
  4. Do not use repositories in controllers. Push Queries and handle them in proper handlers.
  5. Implement Event Sourcing for restoring applications' state.

Publications

  1. CQ-Shop - introducing the project
  2. CQ-Shop - Event Storming
  3. CQ-Shop – Events and Anomaly Detection
  4. CQ-Shop – Architecture, Environment, and Tools
  5. CQ-Shop – Summary

Links

  1. Trello Board
  2. Gathered materials
  3. Drive directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.