A monolithic application and its monolithic data platform both decomposing into domain-owned services and domain-owned data products
Figure 1.6: From monolith to mesh
Download .excalidraw source
·
Edit on excalidraw.com
Operational data and analytical data shown first as two separate technology layers joined by pipelines, then reorganized so each domain owns both planes for its own data
Figure 1.7: Operational vs. analytical data, reorganized by domain
Download .excalidraw source
·
Edit on excalidraw.com
The four data mesh principles (domain ownership, data as a product, self-serve data platform, federated computational governance) shown as interlocking pieces
Figure 1.8: The four principles of data mesh
Download .excalidraw source
·
Edit on excalidraw.com
A linear ETL/ELT data pipeline moving data from an operational source through a transformation step into an analytical destination
Figure 1.1: Data pipeline architecture
Download .excalidraw source
·
Edit on excalidraw.com
Multiple operational sources feeding a centralized, schema-on-write data warehouse owned by a central team
Figure 1.2: Data warehouse architecture
Download .excalidraw source
·
Edit on excalidraw.com
A data lake organized into raw, curated, and refined zones, accepting structured, semi-structured, and unstructured data
Figure 1.3: Data lake architecture
Download .excalidraw source
·
Edit on excalidraw.com
Multiple domain teams each owning a data product, connected by a shared self-serve platform instead of a central team
Figure 1.4: Data mesh: decentralized domain ownership
Download .excalidraw source
·
Edit on excalidraw.com
Timeline showing the progression from data pipelines to data warehouses to data lakes to data mesh, with the problem each pattern solved
Figure 1.5: The evolution from pipelines to mesh
Download .excalidraw source
·
Edit on excalidraw.com
The complete data mesh reference architecture running on a local Kubernetes cluster: domain services, the service mesh, and the self-serve platform tier underneath them
Figure 2.1: Full project example: a data mesh on Kubernetes
Download .excalidraw source
·
Edit on excalidraw.com
The four data mesh principles mapped to their corresponding Kubernetes primitives: namespaces, Deployments and CRDs, operators, and admission/mesh policy
Figure 2.2: From principles to Kubernetes pieces
Download .excalidraw source
·
Edit on excalidraw.com
Three horizontal planes: external clients, the service-mesh plane running the domain services, and the self-serve platform plane underneath, with protocols labeled on the flows between them
Figure 2.3: The three planes: clients, mesh, platform
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of a data product's architectural quantum: input and output ports, the code, data and infrastructure components inside, and a governance control port on top
Figure 3.1: The data product architectural quantum
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing every protocol's contract type feeding into Apicurio Registry, with OpenMetadata downstream building a lineage graph from the registry and the running data stores
Figure 4.1: Contracts, the registry, and the catalog across the mesh
Download .excalidraw source
·
Edit on excalidraw.com
Diagram contrasting the Avro runtime path (serialize, publish, fetch schema, deserialize) with the discovery path where services publish OpenAPI, Protobuf, GraphQL SDL and Avro contracts for a catalog to ingest
Figure 4.2: How a contract flows: runtime path vs. discovery path
Download .excalidraw source
·
Edit on excalidraw.com
Diagram marking each protocol's contract as either a runtime contract (Avro, filled dot) or a discovery contract (OpenAPI, Protobuf, GraphQL SDL, hollow dots), all registered in Apicurio, with OpenMetadata downstream ingesting contracts and data sources into a lineage graph
Figure 4.3: Runtime vs. discovery contracts, and the catalog gap
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of four protocols: REST, gRPC, GraphQL, and events, each matched to the job it fits best, its contract type, and the Quarkus extension that implements it
Figure 5.1: Four protocols, four contracts, each by fitness
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing operational data refined through events and entities into a published data product that analytics consumes
Figure 5.2: How analytical data is composed from operational events and entities
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of an ingestion layer sourcing analytical data from operational microservices via messaging events and Debezium-style change-data-capture
Figure 5.3: Ingestion, streaming, and CDC sourcing (conceptual; not built in this project)
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the Istio control plane installed cluster-wide via Helm, with the datamesh namespace left unlabeled for auto-injection and sidecar membership opted in per Deployment
Figure 6.1: Istio control-plane install and selective sidecar injection
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of meshed data-mesh services communicating over automatic mutual TLS between Istio sidecars, alongside unmeshed workloads such as Postgres and batch jobs that remain outside the mesh
Figure 6.2: mTLS between meshed services, and what stays outside the mesh
Download .excalidraw source
·
Edit on excalidraw.com
Diagram comparing the stock Kubernetes HPA scaling on CPU/memory with KEDA driving an HPA from external signals (Kafka lag, HTTP rate) and handling the zero-to-one activation the HPA cannot do on its own
Figure 7.1: the stock HPA vs. KEDA's two-tier scale-to-zero model
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the KEDA Kafka-lag scaler polling consumer-group lag on the order.placed topic and scaling notification-service from zero to N replicas once lag crosses the threshold, then back to zero after the cooldown period
Figure 7.2: Kafka consumer-group lag driving notification-service from zero
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the KEDA HTTP add-on's interceptor proxy buffering requests to graphql-gateway and reporting request-rate to the external scaler, which drives the HTTPScaledObject's zero-to-N activation
Figure 7.3: the KEDA HTTP add-on's interceptor and external scaler
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of demo-keda-http.sh driving a request burst through the interceptor proxy with the Host header set, polling graphql-gateway's replica count until it climbs off baseline within the 240-second scale-up budget
Figure 7.4: demo-keda-http.sh: burst load through the interceptor, polled against the scale-up budget
Download .excalidraw source
·
Edit on excalidraw.com
Reference architecture diagram showing the full datamesh stack: data products behind the Istio mesh, KEDA-driven autoscaling, and every signal flowing through the OpenTelemetry Collector into the Grafana LGTM stack and Kiali
Figure 8.1: the full reference architecture: mesh, scaling, and observability together
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the three observability signal types: metrics, traces, and logs, and what each one answers for a request crossing graphql-gateway, order-service, and inventory-service
Figure 8.2: metrics, traces, and logs: what each signal answers
Download .excalidraw source
·
Edit on excalidraw.com
Diagram of the four LGTM backends: Loki, Tempo, Mimir, Grafana, each running filesystem-backed and single-replica in the observability namespace, fed by one shared OpenTelemetry Collector
Figure 8.3: the LGTM stack: four backends, one Collector, one Grafana
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing each domain owning its own service, data, and contract boundary end to end, with no central team in the path
Figure 10.1: Domain ownership, value, pieces, and what's missing without it
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing a data product as discoverable, addressable, trustworthy, and self-describing, backed by a versioned contract and a schema registry
Figure 10.2: Data as a product, value, pieces, and what's missing without it
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing domains declaring their infrastructure needs, topics, databases, scaling policies, and the platform's operators fulfilling them automatically
Figure 10.3: Self-serve data platform, value, pieces, and what's missing without it
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing global rules, contract format, security, observability, enforced automatically at the platform boundary while domains keep independent ownership
Figure 10.4: Federated computational governance, value, pieces, and what's missing without it
Download .excalidraw source
·
Edit on excalidraw.com
Diagram showing the trust path from a contract defined once, through registration and wire-format verification, to runtime observability
Figure 10.5: The trusted supply chain, from contract to runtime, in one thread
Download .excalidraw source
·
Edit on excalidraw.com
Twelve Quarkus and JDK 25 capabilities in a six-by-two grid, each labeled with where it is demonstrated: Panache in order-service, gRPC in inventory-service, GraphQL in graphql-gateway, Reactive Messaging in order-service, WebSockets.Next in notification-service, Vert.x Uni and imperative in inventory-service, continuous testing in order-service, native image in demo-native.sh, JDK AOT cache in compare-quarkus-springboot.sh --aot, OIDC in review-service, JBang in demos/jbang, and Panama FFM in demo-panama.sh
Figure 11.1: The twelve capabilities and where each is demonstrated
Download .excalidraw source
·
Edit on excalidraw.com
Two persistence patterns side by side. Active record, used in this project: the REST resource calls Order.findById and order.persist on the entity, which talks to the database. Repository: the REST resource calls an injected OrderRepository that implements PanacheRepository of Order, which operates on the Order entity and the database. Both use the same Hibernate ORM and SQL.
Figure 11.2: Panache active record (this project) and the repository pattern
Download .excalidraw source
·
Edit on excalidraw.com
Two WebSocket stacks compared side by side. On the left, quarkus-websockets-next runs on Vert.x: a WebSocket annotation with a path, OnOpen and OnTextMessage methods that return values, Uni or Multi, an execution model derived from the method signature, an injectable OpenConnections registry, and a WebSocketClient. On the right, the legacy quarkus-websockets implements the Jakarta WebSocket API on Undertow: a ServerEndpoint class with a Session parameter and callback methods. A bottom band shows a Kafka Incoming consumer calling OpenConnections.listAll and sendText, with one consumer group per replica.
Figure 11.3: WebSockets.Next compared with the legacy Jakarta WebSocket extension
Download .excalidraw source
·
Edit on excalidraw.com
Two lanes. Imperative lane: StockDto get(sku) runs on a worker thread where blocking is fine. Reactive lane: Uni of CheckStockResponse checkStock(request) runs on the event loop and must not block; adding Blocking moves it to a worker thread. A note explains that a Uni is a lazy single asynchronous result that runs when subscribed, with onItem transform and onFailure retry operators.
Figure 11.4: The handler signature selects the thread
Download .excalidraw source
·
Edit on excalidraw.com
Three startup lanes. Plain JVM: load, link, interpret, then JIT warm-up. JVM with AOT cache on JDK 25: a training run with -XX:AOTCacheOutput writes app.aot, production runs with -XX:AOTCache, same jar, full JVM, JIT still active. Native image with GraalVM or Mandrel: a closed-world build that takes minutes, no JVM at runtime, reflection requires configuration. Rows compare build cost, startup, memory, compatibility, and peak throughput qualitatively.
Figure 11.5: Three ways to start a Java service
Download .excalidraw source
·
Edit on excalidraw.com
Native build pipeline. mvn package -Pnative for order-service runs the Quarkus build, where extensions run build steps, register reflection and resources, and initialize classes at build time. native-image then performs points-to analysis, takes a heap snapshot, and compiles reachable code into an order-service runner executable of 141 MB with no JVM and no JIT. native-image comes from a local GraalVM or Mandrel on PATH or GRAALVM_HOME, or from the Mandrel builder container with quarkus.native.container-build=true, which was used here; if neither is found the demo fails rather than building a JVM jar. At run time native mode gets no Dev Services: demo-native.sh sends GET /orders to the native binary, started with TZ=UTC and a JDBC_URL, which connects to a throwaway Postgres 18.6 container. Measured on 2026-10-06: Mandrel container build 136 s, 141 MB binary, started in 0.081 s.
Figure 11.6: How demo-native.sh builds and runs the native executable
Download .excalidraw source
·
Edit on excalidraw.com
AOT cache pipeline. mvn package produces target/quarkus-app/quarkus-run.jar. A training run with -XX:AOTCacheOutput=order-service.aot waits for the started log line, then sends SIGTERM; the cache is written when the JVM exits. order-service.aot holds classes loaded and linked (JEP 483) and method profiles (JEP 515) and is 103 MB. The production run uses -XX:AOTCache=order-service.aot with -XX:AOTMode=on and the same jar, JDK, and flags, and started in 0.992 s against 2.045 s on the plain JVM, with the full JVM and JIT active. Measured on Temurin 25.0.3 on 2026-10-05, single run. Rules the script enforces: the same JDK, classpath, and flags for training and production; AOTMode=on so that a stale cache stops startup instead of being ignored; and for Spring Boot, extracting the jar first with -Djarmode=tools extract because nested jars cannot be cached.
Figure 11.7: How the JDK AOT cache is trained and used
Download .excalidraw source
·
Edit on excalidraw.com
Token flow. Dev Services starts Keycloak with realm quarkus and users alice (admin and user) and bob (user). Step 1: the client posts to the token endpoint with the password grant and client quarkus-app. Step 2: Keycloak returns a JWT access token. Step 3: the client calls DELETE /reviews/{id} with an Authorization Bearer header. review-service verifies the signature against the Keycloak JWKS, the issuer, and the expiry, then applies RolesAllowed admin. Outcomes: no token returns 401, bob returns 403, alice returns 204 and a following GET returns 404.
Figure 11.8: How OIDC protects review-service
Download .excalidraw source
·
Edit on excalidraw.com
A single Java file with DEPS and JAVA 25 directives is run by jbang, which resolves dependencies from Maven Central, downloads a JDK if missing, and caches the build. Tools such as the Camel CLI install from pinned Maven coordinates. Uses in this project: HelloRoute.java, WsNotificationClient.java, and PanamaFfm.java.
Figure 11.9: JBang as environment tooling
Download .excalidraw source
·
Edit on excalidraw.com
Java calls Linker.nativeLinker, whose defaultLookup finds libc symbols. downcallHandle with a FunctionDescriptor produces a method handle for getpid and strlen. An Arena allocates an off-heap MemorySegment holding a C string and frees it when the arena closes. A contrast box notes that JNI needs C glue, headers, and a separate native build. A note mentions the enable-native-access flag.
Figure 11.10: Calling libc through the FFM API
Download .excalidraw source
·
Edit on excalidraw.com
Side-by-side startup diagram: order-service (Quarkus, built-time metaprogramming) and spring-boot-compare (Spring Boot 4.0.8, classpath scanning and reflection at startup) both booting against the same throwaway postgres:18 container under identical JVM flags, each measured via its own self-reported started log line rather than an aggregate health check, ending in the 2.05 s / 337 MB versus 4.02 s / 548 MB comparison
Figure 12.1: Same workload, same JVM, two startup paths measured identically
Download .excalidraw source
·
Edit on excalidraw.com
Three coordination shapes over the same shipping/order domain: decentralized Kafka choreography across order-service, payment-service, shipping-service and notification-service with no central caller; a Camel route in ai-rules-service explicitly sequencing classify then decide; and a declarative Quarkus Flow workflow document expressing the same two tasks
Figure 13.1: Choreography and two orchestration shapes, side by side
Download .excalidraw source
·
Edit on excalidraw.com
The classify-then-decide pipeline: an order flows into TriageService.classify, which calls Ollama's qwen2.5:3b model to produce category, priority, and riskSignal; those fields become an OrderTriageFact handed to a Drools KieSession, which fires order-triage.drl and returns one of FRAUD_HOLD, EXPEDITE, or ROUTE_TO_WAREHOUSE; a separate branch shows ai-mcp-service's in-process langchain4j agent failing to reach the order-status tool while the embedded MCP server reaches the same tool successfully
Figure 14.1: Ollama classifies, Drools decides, and where the in-process agent path breaks
Download .excalidraw source
·
Edit on excalidraw.com
order-service publishes an Avro event to the order.placed topic. A persistence consumer in the shared group notification-service, one replica per partition, writes the Notification row to Postgres. Each notification-service replica also runs its own push consumer in a per-replica group, so every replica receives every event and pushes it to the WebSocket clients connected to that replica through its in-JVM OpenConnections registry.
Figure A1.1: Scaling WebSocket push across replicas with Kafka fan-out
Download .excalidraw source
·
Edit on excalidraw.com
Three panels from left to right. Normal: a client holds a WebSocket to replica 2 while replicas 1, 2 and 3 each receive every event from Kafka through their own push consumer group. Replica 2 fails: its socket closes and the client waits with jittered exponential backoff, for example 1 s, 2 s, 4 s. Recover: the Service routes the reconnect to replica 1 or 3, which already receives every event, and the client re-fetches missed events through GET /notifications.
Figure A1.2: Replica failure and client reconnect
Download .excalidraw source
·
Edit on excalidraw.com
A grid of eight gotcha cards, each showing a symptom on top (an error message or a silent false pass) and a fix below it (a one-line config key or code change): postgres:18 rejecting a legacy Olson timezone id fixed by -Duser.timezone=UTC and TZ=UTC/PGTZ=UTC; Avro 1.12's ClassSecurityValidator throwing SecurityException fixed by org.apache.avro.SERIALIZABLE_PACKAGES on both producer and consumer JVMs; a gRPC port mismatch (9001 vs 9000) between order-service and inventory-service fixed by converging on canonical port 9000; a @QuarkusIntegrationTest's separate process not inheriting the test JVM's timezone fixed by quarkus.test.arg-line; import.sql silently not loading under %prod fixed by self-seeding over REST; a class-level @Consumes(APPLICATION_JSON) 415ing a bodyless GET fixed by an explicit @Consumes(WILDCARD), paired with RestAssured silently dropping a Content-Type header on a bodyless GET and masking the bug, fixed by switching the regression test to java.net.http.HttpClient; Avro serde autodetection falling back to silent JSON because two Apicurio artifacts share a package, fixed by pinning value.serializer explicitly; and a general caution card about a persisted postgres named volume surviving a Hibernate DDL change, fixed by docker compose down -v
Figure A2.1: Gotchas, their symptoms, and their fixes
Download .excalidraw source
·
Edit on excalidraw.com
A plan/execute/validate relay feeding a Quarkus/Camel development loop: a planning pass decomposes a task into bounded steps with checkable acceptance criteria; an execution pass writes code grounded in camel-mcp catalog and validation tools and quarkus-agent docs/dev-loop tools instead of guessing component URIs or extension APIs; a validation pass reads the diff and runs the build independently of the executor's own summary, looping failures back to execution up to a capped number of repair rounds, with a human gate before the plan is executed and before anything is published
Figure A3.1: A plan / execute / validate relay, grounded in MCP tooling
Download .excalidraw source
·
Edit on excalidraw.com
A four-tier test pyramid for the datamesh-reference-arch-quarkus project. Base tier: unit tests, @QuarkusTest classes compiled and run by maven-surefire-plugin under mvn test, no Docker required, Quarkus Dev Services not invoked. Second tier: integration tests, classes named *IT such as OrderPlacedAvroWireIT and InventoryCheckStockWireIT, run by maven-failsafe-plugin under mvn verify, each self-provisioning its own Testcontainers (Kafka, Apicurio Registry) or running as a packaged @QuarkusIntegrationTest process, no standing compose stack needed. Third tier: functional tests, the Newman/Postman collection in tooling/newman/datamesh.postman_collection.json exercising order-service, inventory-service, graphql-gateway, and review-service over real HTTP against a live stack. Top tier: load tests, hey driving HTTP traffic at order-service and ghz driving gRPC traffic at inventory-service's CheckStock RPC, both reading throughput and latency percentiles from their own summaries. Alongside the pyramid, a vertical strip shows scripts/run-all-tests.sh's phases in order: PREFLIGHT, UNIT+IT (mvn verify), TWIN (spring-boot-compare), STACK-UP, FUNCTIONAL, LOAD, REPORT, with a note that STACK-UP only happens after every mvn phase completes to avoid port collisions.
Figure A4.1: The test pyramid and the run-all-tests.sh phases
Download .excalidraw source
·
Edit on excalidraw.com
One JVM containing event-loop threads and a worker pool. Producers (Emitter or @Outgoing methods) hand messages to the Vert.x event bus, which supports send, publish and request-reply. Consumers (@Incoming or @ConsumeEvent methods) receive them on an event loop or a worker thread. Callouts: scales up with cores, no network hop or wire serialization, back-pressure through Mutiny. Limits: one JVM, not durable, no replay.
Figure A5.1: Vert.x in-memory messaging inside one JVM
Download .excalidraw source
·
Edit on excalidraw.com
Producers append to a topic with partitions P0 to P3. Consumer group A has replicas that each own some partitions. Consumer group B reads the same topic independently, which is fan-out. Retention and offsets allow replay. Apicurio Registry holds the schemas. Scale out by adding consumers up to the partition count; KEDA scales on consumer lag.
Figure A5.2: Kafka: partitions, consumer groups, and replay
Download .excalidraw source
·
Edit on excalidraw.com
A two-column comparison table, In-memory (Vert.x, one JVM) versus Kafka (cluster), with rows for scope, durability, ordering, how it scales, failure, and use in this project. A band at the bottom reads: Same @Incoming/@Outgoing code; only connector config changes.
Figure A5.3: In-memory vs. Kafka: same code, different connector
Download .excalidraw source
·
Edit on excalidraw.com
Three-column comparison of Kafka choreography, Camel orchestration, and Quarkus Flow across who owns the sequence, coupling, failure handling, debugging, and where logic lives.
Figure A6.1: Choreography vs. two shapes of orchestration, compared
Download .excalidraw source
·
Edit on excalidraw.com
The datamesh project on OpenShift Local: seven services, Kafka, Postgres and Apicurio under restricted-v2, with two edge-TLS Routes
Download .excalidraw source
·
Edit on excalidraw.com
Maven packages on the host; a binary S2I build on ubi10/openjdk-25 runs in the cluster and pushes an ImageStream tag the Deployment pulls
Download .excalidraw source
·
Edit on excalidraw.com
The platform tier around the core: Service Mesh 3, the Custom Metrics Autoscaler, OpenTelemetry with otel-lgtm, Ollama and the AI services, a native order-service, and OpenShift GitOps
Download .excalidraw source
·
Edit on excalidraw.com