All details of the original Hipster Shop: Cloud-Native Microservices Demo Application can be found here.
The Hipster Shop project contains a 10-tier microservices application. The application is a web-based e-commerce app called “Hipster Shop” where users can browse items, add them to the cart, and purchase them.
Home Page | Checkout Screen |
---|---|
Checkout Cell | Frontend Cell |
---|---|
Hipster Shop is composed of many microservices written in different languages that talk to each other over gRPC.
Service | Language | Description |
---|---|---|
frontend | Go | Exposes an HTTP server to serve the website. Does not require signup/login and generates session IDs for all users automatically. |
cartservice | C# | Stores the items in the user's shipping cart in Redis and retrieves it. |
productcatalogservice | Go | Provides the list of products from a JSON file and ability to search products and get individual products. |
currencyservice | Node.js | Converts one money amount to another currency. Uses real values fetched from European Central Bank. It's the highest QPS service. |
paymentservice | Node.js | Charges the given credit card info (mock) with the given amount and returns a transaction ID. |
shippingservice | Go | Gives shipping cost estimates based on the shopping cart. Ships items to the given address (mock) |
emailservice | Python | Sends users an order confirmation email (mock). |
checkoutservice | Go | Retrieves user cart, prepares order and orchestrates the payment, shipping and the email notification. |
recommendationservice | Python | Recommends other products based on what's given in the cart. |
adservice | Java | Provides text ads based on given context words. |
loadgenerator | Python/Locust | Continuously sends requests imitating realistic user shopping flows to the frontend. |
Hipster Shop is composed of many microservices written in different languages that talk to each other over gRPC. This sample is structured into 5 cells:
- Execute below command to deploy the cells in one go. If you are interested on building and running the image, execute the steps explained here.
cellery run wso2cellery/front-end-cell:latest -n front-end-cell -l cartCellDep:cart-cell -l productsCellDep:products-cell -l adsCellDep:ads-cell -l checkoutCellDep:checkout-cell -d -y
Clone the hipstershop-cellery repository and
navigate to the hipstershop-cellery sample.
cd hipstershop-cellery/
cd hipstershop-cellery/ads-cell
cellery build ads-cell.bal wso2cellery/ads-cell:latest
cellery run wso2cellery/ads-cell:latest -n ads-cell
cd hipstershop-cellery/products-cell
cellery build products-cell.bal wso2cellery/products-cell:latest
cellery run wso2cellery/products-cell:latest -n products-cell
cd hipstershop-cellery/cart-cell
cellery build cart-cell.bal wso2cellery/cart-cell:latest
cellery run wso2cellery/cart-cell:latest -n cart-cell
cd hipstershop-cellery/checkout-cell
cellery build checkout-cell.bal wso2cellery/checkout-cell:latest
cellery run wso2cellery/checkout-cell:latest -n checkout-cell -l cartCellDep:cart-cell -l productsCellDep:products-cell -d
cd hipstershop-cellery/front-end-cell
cellery build front-end-cell.bal wso2cellery/front-end-cell:latest
cellery run wso2cellery/front-end-cell:latest -n front-end-cell -l cartCellDep:cart-cell -l productsCellDep:products-cell -l adsCellDep:ads-cell -l checkoutCellDep:checkout-cell -d
Now all the application cells are deployed. Run the following command to see the status of the deployed cells.
cellery list instances
Run cellery view command to see the components of your cell. This will open a HTML page in a browser and you can visualize the components and dependent cells of the cell image.
cellery view wso2cellery/ads-cell:latest
cellery view wso2cellery/products-cell:latest
cellery view wso2cellery/cart-cell:latest
cellery view wso2cellery/checkout-cell:latest
cellery view wso2cellery/front-end-cell:latest
You would have already added the /etc/host
entries during the cellery installation as mentioned in local,
GCP and
existing kubernetes cluster.
You need to add the my-hipstershop.com
also for /etc/host
entry as shown below.
192.168.56.10 wso2-apim cellery-dashboard wso2sp-observability-api wso2-apim-gateway cellery-k8s-metrics idp.cellery-system pet-store.com hello-world.com my-hello-world.com my-hipstershop.com
Access url http://my-hipstershop.com/ from a browser.