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
21 changes: 21 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,27 @@ Do not use `gh cache delete --all`: it also removes the entries the current poli
images `ubi9/dotnet-100:9.8-1791421718` and `ubi9/dotnet-100-aspnet:9.8-1791363520`, held on
ubi9 because Red Hat publishes no ubi10 .NET image; every NuGet package pinned exactly); Python (FastAPI, **aiokafka**, **faust-streaming** for
stateful processing, grpcio).
- **Idiomatic framework features (S13; do not hand-roll what the framework provides):**
- Schema: `db/init` owns every schema. Hibernate runs `validate`; EF Core has no migrations and no
`EnsureCreated`. HTTP responses are DTOs, never serialized entities.
- Quarkus: Hibernate ORM with Panache (JSONB via `@JdbcTypeCode(SqlTypes.JSON)` plus
`quarkus.hibernate-orm.mapping.format.global=ignore`); SmallRye Health on `/healthz` and `/readyz`;
`quarkus.shutdown.delay` for draining; REST Client, never `java.net.http`; `@RestPath`/`@RestQuery`/`@RestHeader`
with `<parameters>true</parameters>` in the compiler plugin (a REST client is not registered without it);
`@ServerExceptionMapper`.
- Spring Boot: Spring Data JPA (`open-in-view=false`); Actuator health groups on `/healthz` and `/readyz`;
`server.shutdown=graceful` plus a `SmartLifecycle` drain bean; `ProblemDetail`; Spring Kafka JSON serdes;
`RestClient`; Spring Cache for read-through only.
- .NET: EF Core `DbContext`; `AddHealthChecks` + `MapHealthChecks`; `IHostedLifecycleService` for draining;
`BackgroundService` for consumers and workers; IConfiguration/Options; typed `AddHttpClient`;
`AddProblemDetails`; `ILogger`; HybridCache for read-through only.
- Python: uv with `pyproject.toml` and a committed `uv.lock`; pydantic-settings for configuration.
- Caching (25): the framework cache serves read-through only; the other strategies keep explicit Redis
clients so they can report `"source"` and survive a Redis outage.
- Go: `any`, not `interface{}` (generated `*.pb.go` files excepted). C++ logging: Drogon services use
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.

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

Expand Down
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-10)
*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)
(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 @@ -273,5 +273,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-10)
*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)
(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-10)
*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)
(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 @@ -1295,5 +1295,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-10) 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-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)
(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-10)
*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)
(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-10)
*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)
(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 @@ -442,5 +442,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-10)
*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)
(trace propagation, metric export, structured log correlation, LGTM stack integration).*
2 changes: 1 addition & 1 deletion _docs/12-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -726,5 +726,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-10)
*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).*
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-10)
*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)
(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-10)
*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)
(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-10)
*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)
(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-10)
*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)
(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-10)
*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)
(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-10)
*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)
(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-10)
*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)
(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-10)
*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)
(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).*
2 changes: 1 addition & 1 deletion _docs/26-appendix-m-failure-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,5 +750,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-10)
*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).*
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-10)
*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)
(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-10)
*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)
(a Newman collection run with status-code and state assertions (201, 422, 404, 204, cancel) and JUnit XML export).*
2 changes: 1 addition & 1 deletion _docs/30-appendix-q-blazor-signalr.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ The code is in [`examples/30-blazor-signalr/`](https://github.com/patterncatalys
runs it; its `README.md` covers what it does and how to drive it.

---
*Verification status: verified — [`examples/30-blazor-signalr/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/30-blazor-signalr/) passes 10/10 checks on Docker Engine (2026-10-10): health, order placement and listing, the dashboard page, the SignalR negotiate endpoint, a second dashboard instance, Redis backplane delivery in both directions between the two instances (a SignalR client on one receives an order posted to the other), orders listed across instances, and backplane delivery to a restarted instance (the script asserts the container's start time changed and it returned healthy). Blazor circuit reconnection is the framework default and is not covered by the script.*
*Verification status: verified — [`examples/30-blazor-signalr/`](https://github.com/patterncatalyst/cloud-native-design-patterns/tree/main/examples/30-blazor-signalr/) passes 10/10 checks on Docker Engine (2026-10-12): health, order placement and listing, the dashboard page, the SignalR negotiate endpoint, a second dashboard instance, Redis backplane delivery in both directions between the two instances (a SignalR client on one receives an order posted to the other), orders listed across instances, and backplane delivery to a restarted instance (the script asserts the container's start time changed and it returned healthy). Blazor circuit reconnection is the framework default and is not covered by the script.*
Loading
Loading