Skip to content

Latest commit

 

History

History
141 lines (104 loc) · 7.68 KB

README.md

File metadata and controls

141 lines (104 loc) · 7.68 KB

Online Boutique

Online Boutique is a cloud-native microservices demo application. Online Boutique consists of a 10-tier microservices application, written in 5 different languages: Go, Java, .NET, Node, and Python. The application is a web-based e-commerce platform where users can browse items, add them to a cart, and purchase them.

Signadot uses this application to demonstrate the use of technologies like Kubernetes, gRPC, and OpenTelemetry. This application works on any Kubernetes cluster. It’s easy to deploy with little to no configuration.

Screenshots

Home Page Checkout Screen
Screenshot of store homepage Screenshot of checkout screen

OpenTelemetry

Online Boutique is instrumented using the OpenTelemetry framework. There are simple and advanced instrumentation techniques offered by OpenTelemetry that are leveraged in the application. Each service in the src folder explains how OpenTelemetry was used with specific code examples.

Development

Prerequisites

Install

  1. Launch a local Kubernetes cluster with one of the following options:
  • To launch Minikube (tested with Ubuntu Linux). Please, ensure that the local Kubernetes cluster has at least:
    • 4 CPUs
    • 4.0 GiB memory
    • 32 GB disk space
minikube start --cpus=4 --memory 4096 --disk-size 32g
  • To launch Docker for Desktop (tested with Mac/Windows). Go to Preferences:
    • choose “Enable Kubernetes”,
    • set CPUs to at least 3, and Memory to at least 6.0 GiB
    • on the "Disk" tab, set at least 32 GB disk space
  1. Run kubectl get nodes to verify you're connected to the respective control plane.

  2. Run skaffold run (first time will be slow, it can take ~20 minutes). This will build and deploy the application. If you need to rebuild the images automatically as you refactor the code, run skaffold dev command.

  3. Run kubectl get pods to verify the Pods are ready and running.

  4. Access the web frontend through your browser

  • Minikube requires you to run a command to access the frontend service:
minikube service frontend-external

Cleanup

If you've deployed the application with skaffold run command, you can run skaffold delete to clean up the deployed resources.

Architecture

Online Boutique is composed of 10 microservices (plus a load generator) written in 5 different languages that communicate with each other over gRPC.

Architecture of microservices

Find Protocol Buffers Descriptions at the ./pb directory.

Service Language Description
adservice Java Provides text ads based on given context words.
cartservice C# Stores the items in the user's shopping cart in Redis and retrieves it.
checkoutservice Go Retrieves user cart, prepares order and orchestrates the payment, shipping and the email notification.
currencyservice Node.js Converts one money amount to another currency. Uses real values fetched from European Central Bank. It's the highest QPS service.
emailservice Python Sends users an order confirmation email (mock).
frontend Go Exposes an HTTP server to serve the website. Does not require signup/login and generates session IDs for all users automatically.
loadgenerator Python/Locust Continuously sends requests imitating realistic user shopping flows to the frontend.
paymentservice Node.js Charges the given credit card info (mock) with the given amount and returns a transaction ID.
productcatalogservice Go Provides the list of products from a JSON file and ability to search products and get individual products.
recommendationservice Python Recommends other products based on what's given in the cart.
shippingservice Go Gives shipping cost estimates based on the shopping cart. Ships items to the given address (mock)

Features

  • Kubernetes: The app is designed to run on Kubernetes
  • gRPC: Microservices use a high volume of gRPC calls to communicate to each other.
  • OpenTelemetry Tracing: Most services are instrumented using OpenTelemetry trace providers for gRPC/HTTP.
  • Skaffold: Application is deployed to Kubernetes with a single command using Skaffold.
  • Synthetic Load Generation: The application demo comes with a background job that creates realistic usage patterns on the website using Locust load generator.

History

This project originated from Honeycomb's Microservices Demo, which itself was derived from the excellent Google Cloud Platform Microservices Demo. It was forked in 2022.

Application demo

This application will exhibit usage of Sandbox environments using the Signadot platform. See feature testing guide for more details.


This is not an official Signadot or Google project.