Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[demo] rename demo services #6438

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions content/en/docs/demo/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,70 +12,70 @@ generator which uses [Locust](https://locust.io/) to fake user traffic.
```mermaid
graph TD
subgraph Service Diagram
accountingservice(Accounting Service):::dotnet
adservice(Ad Service):::java
accounting(Accounting):::dotnet
ad(Ad):::java
cache[(Cache<br/>&#40Valkey&#41)]
cartservice(Cart Service):::dotnet
checkoutservice(Checkout Service):::golang
currencyservice(Currency Service):::cpp
emailservice(Email Service):::ruby
cart(Cart):::dotnet
checkout(Checkout):::golang
currency(Currency):::cpp
email(Email):::ruby
flagd(Flagd):::golang
flagdui(Flagd-ui):::typescript
frauddetectionservice(Fraud Detection Service):::kotlin
flagd-ui(Flagd-ui):::typescript
fraud-detection(Fraud Detection):::kotlin
frontend(Frontend):::typescript
frontendproxy(Frontend Proxy <br/>&#40Envoy&#41):::cpp
imageprovider(Image Provider <br/>&#40nginx&#41):::cpp
loadgenerator([Load Generator]):::python
paymentservice(Payment Service):::javascript
productcatalogservice(Product Catalog Service):::golang
quoteservice(Quote Service):::php
recommendationservice(Recommendation Service):::python
shippingservice(Shipping Service):::rust
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

adservice ---->|gRPC| flagd
ad ---->|gRPC| flagd

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

checkoutservice -->|gRPC| shippingservice
checkoutservice -->|gRPC| paymentservice
checkoutservice --->|HTTP| emailservice
checkoutservice -->|gRPC| currencyservice
checkoutservice -->|gRPC| productcatalogservice
checkout -->|gRPC| shipping
checkout -->|gRPC| payment
checkout --->|HTTP| email
checkout -->|gRPC| currency
checkout -->|gRPC| product-catalog

frauddetectionservice -->|gRPC| flagd
fraud-detection -->|gRPC| flagd

frontend -->|gRPC| adservice
frontend -->|gRPC| cartservice
frontend -->|gRPC| checkoutservice
frontend ---->|gRPC| currencyservice
frontend ---->|gRPC| recommendationservice
frontend -->|gRPC| productcatalogservice
frontend -->|gRPC| ad
frontend -->|gRPC| cart
frontend -->|gRPC| checkout
frontend ---->|gRPC| currency
frontend ---->|gRPC| recommendation
frontend -->|gRPC| product-catalog

frontendproxy -->|gRPC| flagd
frontendproxy -->|HTTP| frontend
frontendproxy -->|HTTP| flagdui
frontendproxy -->|HTTP| imageprovider
frontend-proxy -->|gRPC| flagd
frontend-proxy -->|HTTP| frontend
frontend-proxy -->|HTTP| flagd-ui
frontend-proxy -->|HTTP| image-provider

Internet -->|HTTP| frontendproxy
Internet -->|HTTP| frontend-proxy

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

paymentservice -->|gRPC| flagd
payment -->|gRPC| flagd

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

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

shippingservice -->|HTTP| quoteservice
shipping -->|HTTP| quote

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

classDef dotnet fill:#178600,color:white;
Expand Down
28 changes: 14 additions & 14 deletions content/en/docs/demo/feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ aliases:
- feature_flags
- services/feature-flag
- services/featureflagservice
cSpell:ignore: loadgenerator OLJCESPC7Z
cSpell:ignore: OLJCESPC7Z
---

The demo provides several feature flags that you can use to simulate different
Expand All @@ -31,19 +31,19 @@ user interface:

## Implemented feature flags

| Feature Flag | Service(s) | Description |
| ----------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------- |
| `adServiceFailure` | Ad Service | Generate an error for `GetAds` 1/10th of the time |
| `adServiceManualGc` | Ad Service | Trigger full manual garbage collections in the ad service |
| `adServiceHighCpu` | Ad Service | Trigger high cpu load in the ad service. If you want to demo cpu throttling, set cpu resource limits |
| `cartServiceFailure` | Cart Service | Generate an error whenever `EmptyCart` is called |
| `productCatalogFailure` | Product Catalog | Generate an error for `GetProduct` requests with product ID: `OLJCESPC7Z` |
| `recommendationServiceCacheFailure` | Recommendation | Create a memory leak due to an exponentially growing cache. 1.4x growth, 50% of requests trigger growth. |
| `paymentServiceFailure` | Payment Service | Generate an error when calling the `charge` method. |
| `paymentServiceUnreachable` | Checkout Service | Use a bad address when calling the PaymentService to make it seem like the PaymentService is unavailable. |
| `loadgeneratorFloodHomepage` | Loadgenerator | Start flooding the homepage with a huge amount of requests, configurable by changing flagd JSON on state. |
| `kafkaQueueProblems` | Kafka | Overloads Kafka queue while simultaneously introducing a consumer side delay leading to a lag spike. |
| `imageSlowLoad` | Frontend | Utilizes envoy fault injection, produces a delay in loading of product images in the frontend. |
| Feature Flag | Service(s) | Description |
| ----------------------------------- | --------------- | --------------------------------------------------------------------------------------------------------- |
| `adServiceFailure` | Ad | Generate an error for `GetAds` 1/10th of the time |
| `adServiceManualGc` | Ad | Trigger full manual garbage collections in the ad service |
| `adServiceHighCpu` | Ad | Trigger high cpu load in the ad service. If you want to demo cpu throttling, set cpu resource limits |
| `cartServiceFailure` | Cart | Generate an error whenever `EmptyCart` is called |
| `productCatalogFailure` | Product Catalog | Generate an error for `GetProduct` requests with product ID: `OLJCESPC7Z` |
| `recommendationServiceCacheFailure` | Recommendation | Create a memory leak due to an exponentially growing cache. 1.4x growth, 50% of requests trigger growth. |
| `paymentServiceFailure` | Payment | Generate an error when calling the `charge` method. |
| `paymentServiceUnreachable` | Checkout | Use a bad address when calling the PaymentService to make it seem like the PaymentService is unavailable. |
| `loadgeneratorFloodHomepage` | Load Generator | Start flooding the homepage with a huge amount of requests, configurable by changing flagd JSON on state. |
| `kafkaQueueProblems` | Kafka | Overloads Kafka queue while simultaneously introducing a consumer side delay leading to a lag spike. |
| `imageSlowLoad` | Frontend | Utilizes envoy fault injection, produces a delay in loading of product images in the frontend. |

## Feature Flag Architecture

Expand Down
20 changes: 10 additions & 10 deletions content/en/docs/demo/kubernetes-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ LoadBalancer) with optionally deployed ingress resources.

### Expose services using kubectl port-forward

To expose the frontendproxy service use the following command (replace
To expose the frontend-proxy service use the following command (replace
`my-otel-demo` with your Helm chart release name accordingly):

```shell
kubectl port-forward svc/my-otel-demo-frontendproxy 8080:8080
kubectl port-forward svc/my-otel-demo-frontend-proxy 8080:8080
```

{{% alert title="Note" color="info" %}}
Expand All @@ -97,7 +97,7 @@ done.

{{% /alert %}}

With the frontendproxy port-forward set up, you can access:
With the frontend-proxy port-forward set up, you can access:

- Web store: <http://localhost:8080/>
- Grafana: <http://localhost:8080/grafana/>
Expand All @@ -121,16 +121,16 @@ the proper support before using these configuration options.

{{% /alert %}}

Each demo component (ie: frontendproxy) offers a way to have its Kubernetes
Each demo component (ie: frontend-proxy) offers a way to have its Kubernetes
service type configured. By default, these will not be created, but you can
enable and configure them through the `ingress` property of each component.

To configure the frontendproxy component to use an ingress resource you would
To configure the frontend-proxy component to use an ingress resource you would
specify the following in your values file:

```yaml
components:
frontendProxy:
frontend-proxy:
ingress:
enabled: true
annotations: {}
Expand All @@ -147,16 +147,16 @@ the documentation from your ingress controller for more information.

#### Configure service types

Each demo component (ie: frontendproxy) offers a way to have its Kubernetes
Each demo component (ie: frontend-proxy) offers a way to have its Kubernetes
service type configured. By default, these will be `ClusterIP` but you can
change each one using the `service.type` property of each component.

To configure the frontendproxy component to use a LoadBalancer service type you
To configure the frontend-proxy component to use a LoadBalancer service type you
would specify the following in your values file:

```yaml
components:
frontendProxy:
frontend-proxy:
service:
type: LoadBalancer
```
Expand All @@ -165,7 +165,7 @@ components:

In order for spans from the browser to be properly collected, you will also need
to specify the location where the OpenTelemetry Collector is exposed. The
frontendproxy defines a route for the collector with a path prefix of
frontend-proxy defines a route for the collector with a path prefix of
`/otlp-http`. You can configure the collector endpoint by setting the following
environment variable on the frontend component:

Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/demo/requirements/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ problems in distributed applications.
A PHP service should be added to the main application as an 'admin service'. A
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A PHP service should be added to the main application as an 'admin service'. A
A PHP service should be added to the main application as an admin service. A

Database should be added to enable CRUD functionality on the Product Catalog.

The 'shippingservice' should be reimplemented in Rust.
The 'shipping' service should be reimplemented in Rust.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The 'shipping' service should be reimplemented in Rust.
The shipping service should be reimplemented in Rust.


The 'currencyservice' should be reimplemented in C++.
The 'currency' service should be reimplemented in C++.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The 'currency' service should be reimplemented in C++.
The currency service should be reimplemented in C++.


The 'emailservice' should be reimplemented in Ruby.
The 'email' service should be reimplemented in Ruby.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The 'email' service should be reimplemented in Ruby.
The email service should be reimplemented in Ruby.


For future iterations, the 'frontend' service can be extended with a mobile
application written in Swift.
Expand Down
10 changes: 5 additions & 5 deletions content/en/docs/demo/scenarios/recommendation-cache/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ work, and viewing the details allows us to get a better idea of what's going on.
We can see in our waterfall view that the `app.cache_hit` attribute is set to
`false`, and that the `app.products.count` value is extremely high.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`false`, and that the `app.products.count` value is extremely high.
false, and that the `app.products.count` value is extremely high.


Returning to the search UI, filter to `recommendationservice` in the Service
dropdown, and search for `app.cache_hit=true` in the Tags box. Notice that
requests tend to be faster when the cache is hit. Now search for
`app.cache_hit=false` and compare the latency. You should notice some changes in
the visualization at the top of the trace list.
Returning to the search UI, filter to `recommendation` in the Service dropdown,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Returning to the search UI, filter to `recommendation` in the Service dropdown,
Returning to the search UI, select "recommendation" in the Service dropdown,

and search for `app.cache_hit=true` in the Tags box. Notice that requests tend
to be faster when the cache is hit. Now search for `app.cache_hit=false` and
compare the latency. You should notice some changes in the visualization at the
top of the trace list.

Now, since this is a contrived scenario, we know where to find the underlying
bug in our code. However, in a real-world scenario, we may need to perform
Expand Down
35 changes: 17 additions & 18 deletions content/en/docs/demo/services/_index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
---
title: Services
aliases: [service_table, service-table]
cSpell:ignore: loadgenerator
---

To visualize request flows, see the [Service Diagram](../architecture/).

| Service | Language | Description |
| ----------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [accountingservice](accounting/) | .NET | Processes incoming orders and count the sum of all orders (mock/). |
| [adservice](ad/) | Java | Provides text ads based on given context words. |
| [cartservice](cart/) | .NET | Stores the items in the user's shopping cart in Redis and retrieves it. |
| [checkoutservice](checkout/) | Go | Retrieves user cart, prepares order and orchestrates the payment, shipping and the email notification. |
| [currencyservice](currency/) | C++ | Converts one money amount to another currency. Uses real values fetched from European Central Bank. It's the highest QPS service. |
| [emailservice](email/) | Ruby | Sends users an order confirmation email (mock/). |
| [frauddetectionservice](fraud-detection/) | Kotlin | Analyzes incoming orders and detects fraud attempts (mock/). |
| [frontend](frontend/) | TypeScript | Exposes an HTTP server to serve the website. Does not require sign up / login and generates session IDs for all users automatically. |
| [loadgenerator](load-generator/) | Python/Locust | Continuously sends requests imitating realistic user shopping flows to the frontend. |
| [paymentservice](payment/) | JavaScript | Charges the given credit card info (mock/) with the given amount and returns a transaction ID. |
| [productcatalogservice](product-catalog/) | Go | Provides the list of products from a JSON file and ability to search products and get individual products. |
| [quoteservice](quote/) | PHP | Calculates the shipping costs, based on the number of items to be shipped. |
| [recommendationservice](recommendation/) | Python | Recommends other products based on what's given in the cart. |
| [shippingservice](shipping/) | Rust | Gives shipping cost estimates based on the shopping cart. Ships items to the given address (mock/). |
| [react-native-app](react-native-app/) | TypeScript | React Native mobile application that provides a UI on top of the shopping services. |
| Service | Language | Description |
| ------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [accounting](accounting/) | .NET | Processes incoming orders and count the sum of all orders (mock/). |
| [ad](ad/) | Java | Provides text ads based on given context words. |
| [cart](cart/) | .NET | Stores the items in the user's shopping cart in Valkey and retrieves it. |
| [checkout](checkout/) | Go | Retrieves user cart, prepares order and orchestrates the payment, shipping and the email notification. |
| [currency](currency/) | C++ | Converts one money amount to another currency. Uses real values fetched from European Central Bank. It's the highest QPS service. |
| [email](email/) | Ruby | Sends users an order confirmation email (mock/). |
| [fraud-detection](fraud-detection/) | Kotlin | Analyzes incoming orders and detects fraud attempts (mock/). |
| [frontend](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](load-generator/) | Python/Locust | Continuously sends requests imitating realistic user shopping flows to the frontend. |
| [payment](payment/) | JavaScript | Charges the given credit card info (mock/) with the given amount and returns a transaction ID. |
| [product-catalog](product-catalog/) | Go | Provides the list of products from a JSON file and ability to search products and get individual products. |
| [quote](quote/) | PHP | Calculates the shipping costs, based on the number of items to be shipped. |
| [recommendation](recommendation/) | Python | Recommends other products based on what's given in the cart. |
| [shipping](shipping/) | Rust | Gives shipping cost estimates based on the shopping cart. Ships items to the given address (mock/). |
| [react-native-app](react-native-app/) | TypeScript | React Native mobile application that provides a UI on top of the shopping services. |
2 changes: 1 addition & 1 deletion content/en/docs/demo/services/accounting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Accounting Service
linkTitle: Accounting
aliases: [accountingservice]
aliases: [accounting]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aliases are "forever". This must not be renamed:

Suggested change
aliases: [accounting]
aliases: [accountingservice]

Please revert the changes to aliases fields in this and other pages.

---

This service calculates the total amount of sold products. This is only mocked
Expand Down
Loading
Loading