Skip to content

DistributedPlayground/project-description

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Distributed Playground

The purpose of this project is to practice the development of distributed systems

Goal

For this project, I'll create an ecommerce platform. This platform will allow users to purchase goods that are maintained by us. This is not a two sided marketplace with our users being both companies and consumers -- at least for now. To simplify, we'll centrally define the products.

Architecture

Functional Requirements

  • Users should be able to make purchases using card payments
  • Users should be able to see available products, including their remaining stock
  • Users should be able to sort and filter products

Quality Attributes

  • Should be designed to handle >10M users per day
  • Should have 99.9% uptime
  • Should allow for concurrent development from a large distributed team

Design

  • We will use Golang as the primary backend language.

  • We will provide an internal CP db optimized for writes in postgres

    • This db will be exposed to our systems through a REST API
  • Implementing a psudo CQRS (Command Query Responsibility Segregation)

    • "Psudo" here because we really just want to segregrate the most read heavy users (customers) to a separate db and api optimized for their needs
    • This customer read db will be updated through a service that reads from a Kafka queue

Service Descriptions

  • API Gateway: Not Implemented
  • Products: A REST API with a postgres db. It allows sellers to manage their products and product collections. This service publishes writes to a kafka queue.
  • Product Search: A GraphQL API with mongodb. It allows customers to query the current products and collections. It reads updates from kafka to update the mongodb database.
  • Inventory: A gRPC API with redis. It is intended to maintain the most up-to-date state of product inventory. It reads updates to product inventory made by sellers from kafka, and also writes updates to the product inventory made by customers through purchases.
  • Orders: Not Implemented Orchestrator for Payments, Fufillment, and Notifications, state management with kafka
  • Order Recovery: Not Implemented

Running the Services

  1. Ensure that you have cloned the following repositories into the same directory so that they are parallel in your local filesystem:
git clone https://github.com/DistributedPlayground/products
git clone https://github.com/DistributedPlayground/product-migrations
git clone https://github.com/DistributedPlayground/product-search
git clone https://github.com/DistributedPlayground/inventory
git clone https://github.com/DistributedPlayground/infra
  1. Follow the instructions detailed in the infra repository to set up and run the services.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors