Skip to content

workbackai/playground

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hyperdrive logo Debugging Playground

Welcome to the Debugging Playground

This repository contains a mock online shop, made up of microservices.

Our goals is to provide a realistic example of a distributed system that can be used to test and demo our debugging tool.

Quick start

Prerequisites:

  • Docker
  • Docker Compose v2.0.0+
  • 6 GB of RAM for the application

Start the demo:

docker compose up --force-recreate --remove-orphans --detach

Source: Docker deployment

Open the demo: http://localhost:8080/.

Quick links

Title URL
Mock online shop http://localhost:8080/
Grafana UI http://localhost:8080/grafana/
Load Generator UI http://localhost:8080/loadgen/
Jaeger UI http://localhost:8080/jaeger/ui/
Tracetest UI http://localhost:11633/
Flagd configurator UI http://localhost:8080/feature

Source: Docker deployment

FAQ

Where can I find logs?

When the demo is running, you can get logs from Docker:

# Get all logs
docker compose logs

# Get service logs
docker compose logs {SERVICE NAME}

When the demo is not running, you can find example logs in logs/. For example all.log, checkout.log, accounting.log, product-catalog.log, ad.log, cart.log, payment.log, recommendation.log.

To generate more example logs, run:

# Start services and capture logs (press Ctrl+C to stop capturing logs)
bash -x logs.sh

Where can I find traces?

When the demo is running, you can inspect traces in the Jaeger UI: http://localhost:8080/jaeger/ui/

What are all the services?

The demo is composed of microservices written in different programming languages that talk to each other over gRPC and HTTP; and a load generator which uses Locust to fake user traffic.

Service Language Description
accounting .NET Processes incoming orders and count the sum of all orders (mock/).
ad Java Provides text ads based on given context words.
cart .NET Stores the items in the user's shopping cart in Valkey and retrieves it.
checkout Go Retrieves user cart, prepares order and orchestrates the payment, shipping and the email notification.
currency C++ Converts one money amount to another currency. Uses real values fetched from European Central Bank. It's the highest QPS service.
email Ruby Sends users an order confirmation email (mock/).
fraud-detection Kotlin Analyzes incoming orders and detects fraud attempts (mock/).
frontend TypeScript Exposes an HTTP server to serve the website. Does not require sign up / login and generates session IDs for all users automatically.
load-generator Python/Locust Continuously sends requests imitating realistic user shopping flows to the frontend.
payment JavaScript Charges the given credit card info (mock/) with the given amount and returns a transaction ID.
product-catalog Go Provides the list of products from a JSON file and ability to search products and get individual products.
quote PHP Calculates the shipping costs, based on the number of items to be shipped.
recommendation Python Recommends other products based on what's given in the cart.
shipping Rust Gives shipping cost estimates based on the shopping cart. Ships items to the given address (mock/).
react-native-app TypeScript React Native mobile application that provides a UI on top of the shopping services.

Source: Services

graph TD
subgraph Service Diagram
accounting(Accounting):::dotnet
ad(Ad):::java
cache[(Cache<br/>&#40Valkey&#41)]
cart(Cart):::dotnet
checkout(Checkout):::golang
currency(Currency):::cpp
email(Email):::ruby
flagd(Flagd):::golang
flagd-ui(Flagd-ui):::typescript
fraud-detection(Fraud Detection):::kotlin
frontend(Frontend):::typescript
frontend-proxy(Frontend Proxy <br/>&#40Envoy&#41):::cpp
image-provider(Image Provider <br/>&#40nginx&#41):::cpp
load-generator([Load Generator]):::python
payment(Payment):::javascript
product-catalog(Product Catalog):::golang
quote(Quote):::php
recommendation(Recommendation):::python
shipping(Shipping):::rust
queue[(queue<br/>&#40Kafka&#41)]:::java
react-native-app(React Native App):::typescript

ad ---->|gRPC| flagd

checkout -->|gRPC| cart
checkout --->|TCP| queue
cart --> cache
cart -->|gRPC| flagd

checkout -->|gRPC| shipping
checkout -->|gRPC| payment
checkout --->|HTTP| email
checkout -->|gRPC| currency
checkout -->|gRPC| product-catalog

fraud-detection -->|gRPC| flagd

frontend -->|gRPC| ad
frontend -->|gRPC| cart
frontend -->|gRPC| checkout
frontend ---->|gRPC| currency
frontend ---->|gRPC| recommendation
frontend -->|gRPC| product-catalog

frontend-proxy -->|gRPC| flagd
frontend-proxy -->|HTTP| frontend
frontend-proxy -->|HTTP| flagd-ui
frontend-proxy -->|HTTP| image-provider

Internet -->|HTTP| frontend-proxy

load-generator -->|HTTP| frontend-proxy

payment -->|gRPC| flagd

queue -->|TCP| accounting
queue -->|TCP| fraud-detection

recommendation -->|gRPC| product-catalog
recommendation -->|gRPC| flagd

shipping -->|HTTP| quote

react-native-app -->|HTTP| frontend-proxy
end

classDef dotnet fill:#178600,color:white;
classDef cpp fill:#f34b7d,color:white;
classDef golang fill:#00add8,color:black;
classDef java fill:#b07219,color:white;
classDef javascript fill:#f1e05a,color:black;
classDef kotlin fill:#560ba1,color:white;
classDef php fill:#4f5d95,color:white;
classDef python fill:#3572A5,color:white;
classDef ruby fill:#701516,color:white;
classDef rust fill:#dea584,color:black;
classDef typescript fill:#e98516,color:black;
Loading
graph TD
subgraph Service Legend
  dotnetsvc(.NET):::dotnet
  cppsvc(C++):::cpp
  golangsvc(Go):::golang
  javasvc(Java):::java
  javascriptsvc(JavaScript):::javascript
  kotlinsvc(Kotlin):::kotlin
  phpsvc(PHP):::php
  pythonsvc(Python):::python
  rubysvc(Ruby):::ruby
  rustsvc(Rust):::rust
  typescriptsvc(TypeScript):::typescript
end

classDef dotnet fill:#178600,color:white;
classDef cpp fill:#f34b7d,color:white;
classDef golang fill:#00add8,color:black;
classDef java fill:#b07219,color:white;
classDef javascript fill:#f1e05a,color:black;
classDef kotlin fill:#560ba1,color:white;
classDef php fill:#4f5d95,color:white;
classDef python fill:#3572A5,color:white;
classDef ruby fill:#701516,color:white;
classDef rust fill:#dea584,color:black;
classDef typescript fill:#e98516,color:black;
Loading

Source: Architecture

About

πŸ› A demo app to test our debugging tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • TypeScript 53.1%
  • Python 10.6%
  • Go 7.9%
  • C# 4.4%
  • Dockerfile 4.0%
  • Java 3.8%
  • Other 16.2%