Skip to content
Merged
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
20 changes: 20 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,26 @@ Do not use `gh cache delete --all`: it also removes the entries the current poli
Drogon's `LOG_*`; services without Drogon use spdlog. `std::cout`/`std::cerr` only for CLI and test output.
Adding a Conan dependency to an existing lock uses `conan lock create --lockfile=conan.lock
--lockfile-partial`, so the other pins stay.
- **Resilience and gRPC through libraries (S14):**
- Breaker, retry and bulkhead: Spring Boot uses Resilience4j (`resilience4j-spring-boot4` 2.4.0 with
`spring-boot-starter-aspectj`; annotations on a separate bean, limits in properties; per-tenant
bulkheads from the `BulkheadRegistry`); Quarkus uses SmallRye Fault Tolerance (annotations on a CDI bean;
per-tenant bulkheads with the programmatic `Guard`); .NET uses Polly v8 pipelines through
Microsoft.Extensions.Http.Resilience 10.10.0 with Polly.Extensions and Polly.RateLimiting pinned to 8.8.0
(the package only sets a floor), and System.Threading.RateLimiting's `PartitionedRateLimiter` for
per-tenant limits; Python uses tenacity (retry) and pybreaker (breaker, around awaited calls with
`calling()`), bulkheads on `asyncio.Semaphore`; Go keeps sony/gobreaker and cenkalti/backoff and uses
`golang.org/x/sync/semaphore` for bulkheads. C++ has no maintained library on ConanCenter, so its breaker
and bulkhead stay in the service, in Drogon coroutine handlers that never block an event-loop thread.
- Contract: a full bulkhead refuses at once with 429 (never queues); `/breaker-state` is `{name, state}`
with `closed|open|half-open`, plus whatever metrics the library exposes. Shared breaker settings:
5 failures open it, 10 s open, 2 trial successes close it (Polly lets one trial through).
- Spring gRPC 1.1.1 (managed by Boot 4.1.1): servers are `@GrpcService` beans hosted by
`spring-boot-starter-grpc-server` on `spring.grpc.server.port` (graceful shutdown, standard health and
reflection services); callers take channels from `GrpcChannelFactory`
(`spring.grpc.client.channel.<name>.target`). Never `ServerBuilder` or `ManagedChannelBuilder` by hand.
The protobuf plugin stays xolstice 0.6.1: the Boot-managed `io.github.ascopes` plugin fails under the
UBI image's packaged Maven. .NET callers use the gRPC client factory (`AddGrpcClient`).

## House test tools (prefer these; don't introduce alternatives)

Expand Down
2 changes: 1 addition & 1 deletion _docs/01-cloud-native-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,5 +302,5 @@ The code is in [`examples/01-cloud-native-principles/`](https://github.com/patte
and runs it; its `README.md` covers what it does and how to drive it.

---
*Verification status: verified — [`examples/01-cloud-native-principles/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/01-cloud-native-principles/) passes 13/13 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/01-cloud-native-principles/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/01-cloud-native-principles/) passes 13/13 checks in each of the six languages on Docker Engine (2026-10-13)
(health probes, config from environment, CRUD, readiness flip on dependency failure).*
2 changes: 1 addition & 1 deletion _docs/02-communications.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,5 +413,5 @@ The code is in [`examples/02-communications/`](https://github.com/patterncatalys
it; its `README.md` covers what it does and how to drive it.

---
*Verification status: verified — [`examples/02-communications/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/02-communications/) passes 10/10 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/02-communications/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/02-communications/) passes 10/10 checks in each of the six languages on Docker Engine (2026-10-13)
(REST create and validation (201, 422), cursor pagination, order confirmation and rejection driven by the gRPC stock reservation, a GraphQL orders query, and the order.placed Kafka topic).*
2 changes: 1 addition & 1 deletion _docs/03-composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,5 +274,5 @@ The code is in [`examples/03-composition/`](https://github.com/patterncatalyst/c
its `README.md` covers what it does and how to drive it.

---
*Verification status: verified — [`examples/03-composition/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/03-composition/) passes 8/8 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/03-composition/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/03-composition/) passes 8/8 checks in each of the six languages on Docker Engine (2026-10-13)
(GraphQL gateway fan-out to the REST order API and the gRPC stock service, selective stock-field resolution, DataLoader batching of stock lookups into one gRPC call, single-order lookup).*
2 changes: 1 addition & 1 deletion _docs/04-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,5 @@ The code is in [`examples/04-data/`](https://github.com/patterncatalyst/cloud-na
`README.md` covers what it does and how to drive it.

---
*Verification status: verified — [`examples/04-data/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/04-data/) passes 8/8 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/04-data/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/04-data/) passes 8/8 checks in each of the six languages on Docker Engine (2026-10-13)
(transactional write of order and outbox row, Debezium outbox connector running, relay of the outbox event to the order.placed Kafka topic with its payload).*
2 changes: 1 addition & 1 deletion _docs/05-event-driven.md
Original file line number Diff line number Diff line change
Expand Up @@ -1297,5 +1297,5 @@ it; its `README.md` covers what it does and how to drive it. The same example, w
the Strimzi operator, also runs on a Kubernetes cluster; Appendix R covers that deployment on minikube and Appendix S covers OpenShift Local.

---
*Verification status: verified — [`examples/05-event-driven/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/05-event-driven/) passes 10/10 checks in each of the six languages on Docker Engine (2026-10-12) and on minikube (2026-10-11, Appendix R), and 10/10 in five languages on OpenShift Local 4.22.14 (2026-10-11, Appendix S)
*Verification status: verified — [`examples/05-event-driven/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/05-event-driven/) passes 10/10 checks in each of the six languages on Docker Engine (2026-10-13) and on minikube (2026-10-11, Appendix R), and 10/10 in five languages on OpenShift Local 4.22.14 (2026-10-11, Appendix S)
(event publication to order.placed, fan-out to two independent consumer groups (shipping and notification), and idempotent consumers under a redelivered duplicate event).*
2 changes: 1 addition & 1 deletion _docs/06-stream-processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,5 @@ The code is in [`examples/06-stream-processing/`](https://github.com/patterncata
runs it; its `README.md` covers what it does and how to drive it.

---
*Verification status: verified — [`examples/06-stream-processing/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/06-stream-processing/) passes 11/11 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/06-stream-processing/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/06-stream-processing/) passes 11/11 checks in each of the six languages on Docker Engine (2026-10-13)
(per-merchant revenue aggregation onto a derived Kafka topic, the stream-processor consumer group, consumer lag that builds while the processor is paused and drains on resume, and the burst appearing in the revenue stream).*
2 changes: 1 addition & 1 deletion _docs/09-api-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,5 +340,5 @@ breaking change failing the build and the additive change passing it is the enti
point of the registry.

---
*Verification status: verified — [`examples/09-api-registry/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/09-api-registry/) passes 8/8 checks on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/09-api-registry/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/09-api-registry/) passes 8/8 checks on Docker Engine (2026-10-13)
(schema registration, BACKWARD compatibility rule, rejection of a breaking change with 400, acceptance of an additive change, versioned retrieval).*
2 changes: 1 addition & 1 deletion _docs/11-observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,5 +443,5 @@ the rest. Seeing one request as one waterfall is the moment observability stops
being three disconnected tools.

---
*Verification status: verified — [`examples/11-observability/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/11-observability/) passes 10/10 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/11-observability/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/11-observability/) passes 10/10 checks in each of the six languages on Docker Engine (2026-10-13)
(trace propagation, metric export, structured log correlation, LGTM stack integration).*
4 changes: 2 additions & 2 deletions _docs/12-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,5 +753,5 @@ step pre-merge. A request without identity being refused, and an unsigned image
being blocked twice, is the layered model working.

---
*Verification status: verified — [`examples/12-security/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/12-security/) passes 16/16 checks in each of the six languages on Docker Engine (2026-10-12)
(sidecar identity trust (403 without X-Forwarded-Client-Cert, health-check bypass), propagation of the JWT subject claim, valet-key mint, verify and tamper rejection, per-tenant bulkhead state, and conftest Rego policy evaluation of a good and a bad manifest. JWT signature validation, RBAC enforcement and rate limiting are not covered).*
*Verification status: verified — [`examples/12-security/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/12-security/) passes 18/18 checks in each of the six languages on Docker Engine (2026-10-13)
(sidecar identity trust (403 without X-Forwarded-Client-Cert, health-check bypass), propagation of the JWT subject claim, valet-key mint, verify and tamper rejection, per-tenant bulkhead state, a full tenant pool refusing the overflow with 429 while another tenant is still served, and conftest Rego policy evaluation of a good and a bad manifest. JWT signature validation, RBAC enforcement and rate limiting are not covered).*
2 changes: 1 addition & 1 deletion _docs/16-appendix-c-websockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,5 +555,5 @@ Deployment down by one and confirm the dropped clients reconnect with backoff an
resume from their last sequence rather than losing the stream.

---
*Verification status: verified — [`examples/16-websockets/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/16-websockets/) passes 6/6 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/16-websockets/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/16-websockets/) passes 6/6 checks in each of the six languages on Docker Engine (2026-10-13)
(WebSocket connect, cross-pod delivery and broadcast over the Redis pub/sub backplane, monotonic sequence numbers).*
2 changes: 1 addition & 1 deletion _docs/17-appendix-d-sagas.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,5 @@ inverses over only the completed steps, plus a clean resume, shows the saga
works.

---
*Verification status: verified — [`examples/17-sagas/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/17-sagas/) passes 11/11 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/17-sagas/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/17-sagas/) passes 11/11 checks in each of the six languages on Docker Engine (2026-10-13)
(orchestrated saga happy path, compensation in reverse order on failure, skipped compensation for steps that never completed, resume of a RUNNING saga after an orchestrator restart).*
2 changes: 1 addition & 1 deletion _docs/18-appendix-e-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,5 +853,5 @@ load. A flat downstream-call line under rising pressure is the retry budget and
doing their job; a climbing one means a control is missing.

---
*Verification status: verified — [`examples/18-errors/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/18-errors/) passes 13/13 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/18-errors/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/18-errors/) passes 13/13 checks in each of the six languages on Docker Engine (2026-10-13)
(RFC 9457 problem details over REST for validation (422), stock conflict (409) and upstream unavailable (503), with error codes, traceId, retryable and retryAfter fields).*
2 changes: 1 addition & 1 deletion _docs/19-appendix-f-ddd-hexagonal.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,5 +354,5 @@ new adapter file appears. A clean domain import list plus a no-domain-change dif
you bolt on a protocol is hexagonal architecture holding.

---
*Verification status: verified — [`examples/19-ddd-hexagonal/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/19-ddd-hexagonal/) passes 17/17 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/19-ddd-hexagonal/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/19-ddd-hexagonal/) passes 17/17 checks in each of the six languages on Docker Engine (2026-10-13)
(source scans proving the domain layer imports no framework or persistence types, REST and CLI adapters driving the same use case, input validation, OrderPlaced event emission).*
2 changes: 1 addition & 1 deletion _docs/21-appendix-h-shutdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,5 @@ A clean rollout under live load, not a green integration test, is evidence that
works.

---
*Verification status: verified — [`examples/21-graceful-shutdown/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/21-graceful-shutdown/) passes 17/17 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/21-graceful-shutdown/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/21-graceful-shutdown/) passes 17/17 checks in each of the six languages on Docker Engine (2026-10-13)
(one SIGTERM, readiness flip to 503, the drain log lines, exit code 0 inside the grace period, a `docker stop` timing check, restart recovery, and orders persisting across the restart. In-flight request draining is not checked by the script).*
2 changes: 1 addition & 1 deletion _docs/22-appendix-i-l7-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,5 +681,5 @@ track the config and a ruleset that can move routing without a code change are t
this appendix working.

---
*Verification status: verified — [`examples/22-l7-routing/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/22-l7-routing/) passes 15/15 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/22-l7-routing/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/22-l7-routing/) passes 15/15 checks in each of the six languages on Docker Engine (2026-10-13)
(Envoy weighted traffic split, header-based routing override, in-app rule-driven routing, and changing routing rules without a redeploy. Canary promotion and circuit breaking are not covered).*
2 changes: 1 addition & 1 deletion _docs/24-appendix-k-monolith-to-microservices.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,5 +586,5 @@ write *and* that an `order.placed` event landed on Kafka. Same client-visible AP
underneath, legacy untouched — that is the decorator doing its job.

---
*Verification status: verified — [`examples/24-monolith-to-microservices/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/24-monolith-to-microservices/) passes 19/19 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/24-monolith-to-microservices/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/24-monolith-to-microservices/) passes 19/19 checks in each of the six languages on Docker Engine (2026-10-13)
(strangler fig router with per-tenant routing, reversible cutover, a decorating collaborator adding caching and Kafka event emission, and an untouched legacy service).*
2 changes: 1 addition & 1 deletion _docs/25-appendix-l-caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -1225,5 +1225,5 @@ the new value with no DB round trip; for write-around, write then read and confi
miss (the DB log shows the `SELECT`) while the second is a hit.

---
*Verification status: verified — [`examples/25-caching/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/25-caching/) passes 29/29 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/25-caching/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/25-caching/) passes 29/29 checks in each of the six languages on Docker Engine (2026-10-13)
(cache-aside with invalidation on update, read-through, write-through, write-around, write-back with 202 and a flush retry across a Postgres outage, refresh-ahead, hot-set tracking, and degradation with Redis stopped and restarted).*
4 changes: 2 additions & 2 deletions _docs/26-appendix-m-failure-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -772,5 +772,5 @@ This appendix touches difficult operational territory; if you are diagnosing a l
Google SRE cascading-failures chapter is the fastest way to a shared vocabulary with your team.

---
*Verification status: verified — [`examples/26-failure-modes/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/26-failure-modes/) passes 20/20 checks in each of the six languages on Docker Engine (2026-10-12)
(timeout, retry exhaustion, circuit breaker closed, open and recovered with fallback, deadline-budget propagation, bulkhead limit).*
*Verification status: verified — [`examples/26-failure-modes/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/26-failure-modes/) passes 22/22 checks in each of the six languages on Docker Engine (2026-10-13)
(timeout, retry exhaustion, circuit breaker closed, open and recovered with fallback, deadline-budget propagation, bulkhead limit, a full bulkhead refusing the overflow with 429 and admitting again).*
2 changes: 1 addition & 1 deletion _docs/27-appendix-n-feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,5 +417,5 @@ lookup is on a critical path without a default, which is the one feature-flag mi
ship.

---
*Verification status: verified — [`examples/27-feature-flags/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/27-feature-flags/) passes 14/14 checks in each of the six languages on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/27-feature-flags/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/27-feature-flags/) passes 14/14 checks in each of the six languages on Docker Engine (2026-10-13)
(plan-based targeting rules, sticky assignment and percentage rollout, kill switch, simple boolean flag, flag listing, and safe defaults while flagd is down).*
2 changes: 1 addition & 1 deletion _docs/28-appendix-o-newman.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,5 +276,5 @@ service and fails against one that wrongly accepts it. A suite that goes red on
break, and only then, is the whole value of this appendix.

---
*Verification status: verified — [`examples/28-newman/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/28-newman/) passes 11/11 checks on Docker Engine (2026-10-12)
*Verification status: verified — [`examples/28-newman/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/28-newman/) passes 11/11 checks on Docker Engine (2026-10-13)
(a Newman collection run with status-code and state assertions (201, 422, 404, 204, cancel) and JUnit XML export).*
Loading
Loading