Runnable Examples
Twenty-one runnable examples demonstrating cloud-native patterns in six language stacks — each with automated verification.
Examples
Each example lives in examples/NN-slug/ and ships with a language-agnostic
verify.sh that tests the running system end-to-end. Choose a language
implementation, start the stack, and run the verifier.
cd examples/01-cloud-native-principles/python
docker compose up -d --build --wait # start the stack
cd ..
./verify.sh # run the automated checks
See Prerequisites & Setup for install instructions.
Foundations & the system
| # | Example | Demonstrates | Python | Spring Boot | Quarkus | .NET | C++ | Go | Infra |
|---|---|---|---|---|---|---|---|---|---|
| 01 | Cloud-Native Principles | 12-factor config, liveness vs readiness probes | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 02 | Communications | REST, gRPC, GraphQL, and Kafka in one service | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 03 | Composition | GraphQL gateway fan-out to REST + gRPC backends | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 04 | Data Patterns | Transactional outbox + Debezium CDC | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 05 | Event-Driven | Kafka event fan-out, commit-after-side-effect | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 06 | Stream Processing | Windowed aggregation, changelog-backed state | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
The operational platform
| # | Example | Demonstrates | Python | Spring Boot | Quarkus | .NET | C++ | Go | Infra |
|---|---|---|---|---|---|---|---|---|---|
| 09 | API Registry | Apicurio schema registry, compatibility rules | n/a | n/a | n/a | n/a | n/a | n/a | Docker |
| 11 | Observability | Traces, metrics, logs with OTel + LGTM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
Security
| # | Example | Demonstrates | Python | Spring Boot | Quarkus | .NET | C++ | Go | Infra |
|---|---|---|---|---|---|---|---|---|---|
| 12 | Security Patterns | Sidecar identity trust, JWT subject propagation, valet key, per-tenant bulkhead, conftest policy-as-code | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
Deep-dive appendices
| # | Example | Demonstrates | Python | Spring Boot | Quarkus | .NET | C++ | Go | Infra |
|---|---|---|---|---|---|---|---|---|---|
| 16 | WebSockets at Scale | WebSocket scale-out with Redis pub/sub backplane | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 17 | Saga State & Compensation | DB-backed saga orchestrator with compensation | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 18 | API Error Handling | Unified error contract across REST and gRPC | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 19 | DDD & Hexagonal | Ports and adapters, domain isolation | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 21 | Graceful Shutdown | SIGTERM handling, readiness flip, in-flight drain | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 22 | L7 Routing | Header-based routing, weighted traffic splitting, rule-driven routing | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 24 | Monolith to Microservices | Content-based routing, strangler fig, decorator | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 25 | Caching Patterns | Cache-aside, read/write-through, TTL, pub/sub refresh | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 26 | Failure Modes | Timeout, retry, circuit breaker, bulkhead, fallback | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 27 | Feature Flags | OpenFeature + flagd, targeting rules, rollout | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Docker |
| 28 | Newman API Testing | Postman collection runner, schema validation, CI | n/a | n/a | n/a | n/a | n/a | n/a | Docker |
| 30 | Blazor Server + SignalR | Real-time dashboard with SignalR circuit and Redis backplane | — | — | — | ✓ | — | — | Docker |
Legend: ✓ = available, — = not applicable (language-specific example), n/a = language-agnostic (no application code)
Directory structure
examples/
_infra/ # shared composable infrastructure (Postgres, Kafka, LGTM, Redis, ...)
NN-slug/
verify.sh # language-agnostic automated checks
README.md # how to run + what to observe
db/init/ # shared SQL schema (where applicable)
python/
compose.yaml # starts infra + Python services
Containerfile / services # FastAPI application code
spring-boot/
compose.yaml
Containerfile / services # Spring Boot 4.1.1 (JDK 25) application code
quarkus/
compose.yaml
Containerfile / services # Quarkus 3.40.1 LTS (JDK 25) application code
dotnet/
compose.yaml
Containerfile.<svc> / services # ASP.NET Core (.NET 10.0.12) application code
cpp/
compose.yaml
Containerfile / services # Drogon application code
go/
compose.yaml
Containerfile / services # net/http application code
Every language implementation exposes the same HTTP API on the same ports
with the same container names, so a single verify.sh validates all of them.
Source code
All examples are in the
examples/
directory of the GitHub repository.