Skip to content

Commit bf701d9

Browse files
committed
remove demo story code since that's outdated
1 parent 4ad4e9e commit bf701d9

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/checkoutservice/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,3 @@ Setting orderid into Baggage
9393
bags, _ = bags.SetMember(orderIDMember)
9494
ctx = baggage.ContextWithBaggage(ctx, bags)
9595
```
96-
97-
## Demo Story code
98-
99-
In order to produce an effective demo story, this service includes additional functionality.
100-
This service will grow an internal cache with each request.
101-
Eventually, the cache size will grow large enough to cause an out of memory (OOM) error and crash the service.
102-
The cache size is exposed via an internal call, so the frontend can properly assign a problematic userid when a cache size threshold is reached.
103-
When an order is placed, an additional delay through `getDiscounts` may be introduced.
104-
In this function, if a random chance exists to call the `loadDiscountFromDatabase` function, which will introduce a synthetic delay based on cache size.
105-
The synthetic delay is manifested as a series of spans making mock database calls.
106-
User "20109", whom should only show up when cache size is high, will have a higher likelihood to exhibit the delay.

src/frontend/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,3 @@ The userid and requestid will be available to all downstream spans.
111111

112112
Baggage is propagated to downstream services, but by default it is not exported to your telemetry backend.
113113
A Span Processor that explicitly exports Baggage is required to export this data to a telemetry backend like Honeycomb.
114-
115-
## Demo Story code
116-
117-
In order to produce an effective demo story, this service includes additional functionality.
118-
The `ensureSessionID` function in `middleware.go` assigns user ids in a random fashion, which may be affected under other random condition, when the cache size from the checkout service exceeds a threshold.
119-
The application will enter a degraded state of performance when cache size climbs.
120-
The checkout service has code to continuously grow a cache, until memory is exhausted and the service crashes with an out of memory (OOM) error.

0 commit comments

Comments
 (0)