Data Mesh: Batch vs. Streaming and Lambda and Kappa Architectures, How to Choose the Right Data Processing Model
Learn how to choose between Batch, Microbatch, and Continuous Streaming, and understand how Lambda and Kappa architectures work within a Data Mesh to balance latency, accuracy, state management, and operational cost.
The indicator keeps the furthest percentage explored; marking the article complete is your choice.
When Two Calculation Paths Give Different Answers for the Same Sale
After introducing the event-driven products sales-order-events and payment-transaction-events at CommerceFlow, business stakeholders requested two analytical views over verified paid sales:
paid-sales (Consolidated Historical View): Used by Finance every morning and at month-end for accounting closes and multi-currency reconciliation.
paid-sales-live (Live Commercial View): Queried during promotional campaigns with a target latency of a few seconds.
To deliver both views quickly, an engineering team built two separate pipelines:
A nightly batch path in SQL on Amazon Athena that joined sales-orders and confirmed-payments, subtracting cancelled orders and refunded payments.
A real-time speed path in Python that added every incoming PaymentConfirmed event as it arrived, but forgot to subtract PaymentRefunded events and did not deduplicate network retries.
Worse still, to display "month-to-date sales up to this second" on a single executive chart, a view combined both tables using UNION ALL without defining a strict temporal cutoff boundary. Because the nightly batch job took 20 minutes after midnight to finish, every payment occurring between 00:00 and 00:20 UTC was included both in the historical batch table and in the real-time table, inflating daily revenue and triggering constant disputes with Finance.
At the opposite extreme, another team proposed eliminating every batch job in CommerceFlow and running 24/7 streaming clusters even for reports that are reviewed only once a month, quadrupling infrastructure costs without delivering any business benefit.
Choosing how to process data inside a Data Product—whether via Batch, Microbatch, Continuous Streaming, Lambda Architecture, or Kappa Architecture—is not a matter of following technology trends. It is an engineering tradeoff balancing latency, accuracy, state management, replayability, and operational cost.
Batch, Microbatch, and Continuous Streaming: Real Mechanical Differences
Before examining composite patterns like Lambda or Kappa, let us distinguish the three fundamental execution modes. Even when a one-minute microbatch and a continuous stream look similar on a dashboard, their execution mechanics differ substantially:
1. BATCH PROCESSING (Bounded dataset, scheduled hourly or daily)
[Accumulated Data 00:00 -> 24:00] ===(Single Bulk Execution)===> [Published Table]
2. MICROBATCH PROCESSING (Small discrete batches every few seconds or minutes)
[Batch t1 (2 min)] -> Run -> [Batch t2 (2 min)] -> Run -> [Updated View]
3. CONTINUOUS EVENT-BY-EVENT STREAMING (Unbounded stream with stateful operators)
e1 -> e2 -> e3 -> [Continuous Stateful Operator & Low Latency] -> [Immediate Emit]
Dimension
Batch Processing
Microbatch Processing
Continuous Streaming (Event-by-Event)
Data Nature
Finite, bounded dataset covering a closed time period.
Sequence of small bounded batches processed at short intervals (e.g., every 1–5 minutes).
Infinite, unbounded stream processed record by record as events arrive.
Typical Latency
Tens of minutes to hours or days.
High seconds to a few minutes.
Milliseconds to a few seconds.
State Management
Reads full tables or partitions; does not keep state in memory across runs.
Maintains checkpoints between successive micro-batches.
Maintains continuous local state (state store) backed by asynchronous fault-tolerant snapshots.
Cost & Resource Profile
High efficiency for large volumes: compute spins up, processes, and shuts down (e.g., daily Athena / Glue job).
Frequent or continuous compute with scheduling overhead per micro-batch.
Requires 24/7 active compute sized to absorb peak traffic spikes.
Operational Complexity
Low: straightforward to debug, retry, and audit over static files.
Medium: must handle cases where a micro-batch takes longer than its trigger interval.
High: requires handling out-of-order events, state growth, backpressure, and stateful upgrades.
The Three Notions of Time, Windows, and Late-Arriving Events
When processing information across independent domains like Sales and Payments, every event carries three distinct timestamps:
Event Time (occurred_at): The exact instant when the business fact occurred at the source (e.g., payment was confirmed at 13:59:55Z).
Ingestion Time (ingested_at): The instant when the event entered the streaming broker or bus (e.g., 13:59:58Z).
Processing Time (processed_at): The instant when the analytical engine executes the transformation (e.g., 14:02:10Z).
Stream Windows and the Late-Data Problem
To compute aggregations over an unbounded stream (such as "paid sales per hour"), we slice time into windows anchored on Event Time:
Tumbling Windows: Fixed-size, non-overlapping contiguous intervals (e.g., 13:00–14:00, 14:00–15:00). Every event belongs to exactly one window.
Sliding / Hopping Windows: Fixed-duration windows that advance in smaller steps (e.g., "sales over the trailing 15 minutes updated every 1 minute").
Session Windows: Dynamic windows grouped by user or entity activity that close after a specified inactivity gap (e.g., 30 minutes).
What happens if the 13:00–14:00 window closes at 14:00:00Z, but a PaymentConfirmed event with occurred_at = 13:59:55Z arrives at 14:02:10Z due to a network retry—or an order confirmed at 13:40:00Z receives a PaymentRefunded event at 15:10:00Z? A reliable processor must define whether it keeps window state open for a grace period (allowed lateness / watermark) or issues compensating updates to the materialized destination view when late refunds arrive.
Lambda and Kappa Architectures: What They Are and How They Fit in Data Mesh
Essential Clarification:Lambda Architecture (formulated by Nathan Marz for distributed data systems) is a conceptual data-processing pattern and has nothing to do with AWS Lambda (Amazon Web Services' serverless function service). Likewise, neither Lambda nor Kappa is a cloud toggle or a replacement for Data Mesh: they are internal processing topologies that a domain team may choose inside a Data Product when it needs to combine low latency with historical accuracy.
Lambda Architecture splits data processing into two parallel paths that feed a unified serving query layer:
+---> [1. Batch Layer] -------------------------+
| Recomputes accurate views over the |
| complete historical dataset (e.g., S3) |
[Incoming Event Stream / | v
Raw Domain Data] -------+ [3. Serving Layer]
| Combines Batch (< T_cutoff)
| + Speed (>= T_cutoff)
+---> [2. Speed Layer] -------------------------^
Processes only recent events not yet
covered by the latest completed batch
Primary Advantage: If the Speed Layer uses an approximation or suffers a transient bug, the next Batch Layer run recomputes history over the immutable master dataset and corrects any drift.
Real-World Costs and Risks:
The Dual-Codebase Problem: Forces the domain team to write, test, and maintain the same business logic twice (for example, in Athena SQL for the batch layer and in Python/Flink for the speed layer). Subtle differences in null handling, decimal rounding, or refund logic cause the two layers to diverge.
Double-Counting at the Seam: If the Serving Layer combines both views without an exact cutoff timestamp (T_cutoff), records near the boundary get counted twice.
2. Kappa Architecture: A Single Stream-Processing Path Over Replayable Events
Proposed by Jay Kreps to eliminate maintaining two separate codebases, Kappa Architecture removes the separate batch code path and processes both real-time updates and historical recomputations through a single stream-processing engine backed by an immutable event log with Event Replay capability:
Primary Advantage: There is only one implementation of the business transformation logic; live data and replayed historical data pass through the exact same code.
Boundaries and Requirements You Must Not Overlook:
Kappa does not eliminate streaming complexity: the engine still has to manage distributed keyed state, idempotent deduplication, and ordering.
Requires complete historical event retention: If your event broker retains only 24 hours of messages and does not archive events to tiered object storage (e.g., S3), you cannot replay six months of history when business rules change.
Practical Case in CommerceFlow: Choosing Processing Models for Three Real Needs
Let us apply these criteria to three concrete use cases across the commercial and finance domains in CommerceFlow:
Delivers near-real-time visibility for marketing campaigns without the operational overhead of millisecond continuous processors.
3. Live Payment Confirmations & Active Sales (paid-sales-live)
1 to 5 seconds.
Continuous Streaming (Kappa) with S3 historical archive.
Reacts immediately to OrderConfirmed, PaymentConfirmed, and PaymentRefunded using a single stateful codebase keyed by order_id.
SQL and Python Implementation: Preventing Double Counting and Reconciling State
First, let us see how the monthly historical batch aggregation is expressed in SQL, and then verify in Python how batch recomputation, a flawed Lambda union, and a stateful Kappa processor compare on the exact same event stream.
1. Monthly SQL Aggregation with Explicit Granularity and Currency Filtering
A frequent bug in analytical queries is summing total_amount across mixed currencies (USD, EUR) or including orders that were subsequently cancelled or refunded. The following SQL query explicitly defines its grain (one row per calendar month and ISO 4217 currency code) over the consolidated state:
-- Monthly historical batch aggregation of net paid sales by currencyWITH reconciled_orders AS (
SELECT
o.order_id,
DATE_TRUNC('month', CAST(o.created_at ASTIMESTAMP)) AS order_month,
o.currency,
o.order_status,
p.payment_status,
p.settled_amount
FROM sales_products.sales_orders o
INNERJOIN payments_products.confirmed_payments p
ON o.order_id = p.order_id
AND o.currency = p.currency
WHERE o.order_date >=DATE'2026-05-01'AND o.order_date <DATE'2026-06-01'
)
SELECTCAST(order_month ASDATE) AS month_start_date,
currency,
COUNT(DISTINCTCASEWHEN order_status IN ('CONFIRMED', 'PAID', 'SHIPPED')
AND payment_status ='CONFIRMED'THEN order_id
END) AS net_paid_orders_count,
COALESCE(SUM(CASEWHEN order_status IN ('CONFIRMED', 'PAID', 'SHIPPED')
AND payment_status ='CONFIRMED'THEN settled_amount
ELSEDECIMAL'0.00'END), DECIMAL'0.00') AS net_paid_revenue,
COALESCE(SUM(CASEWHEN payment_status ='REFUNDED'THEN settled_amount
ELSEDECIMAL'0.00'END), DECIMAL'0.00') AS refunded_amount_total
FROM reconciled_orders
WHERE currency IN ('USD', 'EUR')
GROUPBYCAST(order_month ASDATE),
currency
ORDERBY
month_start_date ASC,
currency ASC;
2. Executable Python Comparison: Batch vs. Flawed Lambda vs. Stateful Kappa
The following self-contained Python script processes an event sequence containing confirmations, a duplicate delivery, a cancellation, and a subsequent refund. It proves via assertions:
Why a naive Lambda union (with overlapping time windows and a speed layer that ignores refunds/duplicates) produces severely inflated figures.
How deterministic Batch recomputation over the complete history and a stateful incremental Kappa processor (with deduplication and state transitions by order_id) converge to the exact same net revenue.
from dataclasses import dataclass
from datetime import datetime, timezone
from typing importDict, List, Set@dataclass(frozen=True)classDomainEvent:
event_id: str
event_type: str# OrderConfirmed, OrderCancelled, PaymentConfirmed, PaymentRefunded
order_id: str
amount: float
currency: str
occurred_at: datetime
@dataclassclassOrderLifecycleState:
order_id: str
currency: str = "USD"
order_confirmed: bool = False
order_cancelled: bool = False
payment_confirmed: bool = False
payment_refunded: bool = False
settled_amount: float = 0.0 @propertydefnet_paid_amount(self) -> float:
if (
self.order_confirmed
andnotself.order_cancelled
andself.payment_confirmed
andnotself.payment_refunded
):
returnself.settled_amount
return0.0defapply_event_to_state(
state_map: Dict[str, OrderLifecycleState],
seen_events: Set[str],
event: DomainEvent,
) -> None:
"""Idempotently applies a domain event to the accumulated state per order_id."""if event.event_id in seen_events:
return
seen_events.add(event.event_id)
st = state_map.setdefault(
event.order_id, OrderLifecycleState(order_id=event.order_id, currency=event.currency)
)
st.currency = event.currency
if event.event_type == "OrderConfirmed":
st.order_confirmed = Trueelif event.event_type == "OrderCancelled":
st.order_cancelled = Trueelif event.event_type == "PaymentConfirmed":
st.payment_confirmed = True
st.settled_amount = event.amount
elif event.event_type == "PaymentRefunded":
st.payment_refunded = Truedefcompute_batch_total(events: List[DomainEvent], target_currency: str = "USD") -> float:
"""Batch recomputation over the complete bounded dataset."""
state_map: Dict[str, OrderLifecycleState] = {}
seen_events: Set[str] = set()
for ev insorted(events, key=lambda e: e.occurred_at):
apply_event_to_state(state_map, seen_events, ev)
returnround(
sum(s.net_paid_amount for s in state_map.values() if s.currency == target_currency),
2,
)
defcompute_kappa_streaming_total(events: List[DomainEvent], target_currency: str = "USD") -> float:
"""
Incremental Kappa processing in arrival order (including duplicates, out-of-order
events, and refunds), maintaining state keyed by order_id.
"""
state_map: Dict[str, OrderLifecycleState] = {}
seen_events: Set[str] = set()
for ev in events:
apply_event_to_state(state_map, seen_events, ev)
returnround(
sum(s.net_paid_amount for s in state_map.values() if s.currency == target_currency),
2,
)
defcompute_flawed_lambda_total(
all_events: List[DomainEvent],
batch_snapshot_until: datetime,
speed_layer_starts_at: datetime,
) -> float:
"""
Lambda anti-pattern:
1. Batch and Speed windows overlap (speed_layer_starts_at < batch_snapshot_until),
double-counting orders inside the overlap.
2. Speed layer sums PaymentConfirmed without subtracting PaymentRefunded or deduplicating.
"""
batch_events = [e for e in all_events if e.occurred_at <= batch_snapshot_until]
batch_total = compute_batch_total(batch_events, target_currency="USD")
speed_events = [e for e in all_events if e.occurred_at >= speed_layer_starts_at]
naive_speed_total = sum(
e.amount for e in speed_events if e.event_type == "PaymentConfirmed"and e.currency == "USD"
)
returnround(batch_total + naive_speed_total, 2)
if __name__ == "__main__":
# Stream of events ordered by arrival time
event_stream: List[DomainEvent] = [
# Order ORD-101: Confirmed and paid before batch cutoff (10:00Z) -> Valid $100.00
DomainEvent("ev-1", "OrderConfirmed", "ORD-101", 100.00, "USD",
datetime(2026, 5, 10, 9, 50, tzinfo=timezone.utc)),
DomainEvent("ev-2", "PaymentConfirmed", "ORD-101", 100.00, "USD",
datetime(2026, 5, 10, 9, 55, tzinfo=timezone.utc)),
# Order ORD-102: Paid at 10:10Z, but refunded at 10:25Z -> Net $0.00
DomainEvent("ev-3", "OrderConfirmed", "ORD-102", 200.00, "USD",
datetime(2026, 5, 10, 10, 9, tzinfo=timezone.utc)),
DomainEvent("ev-4", "PaymentConfirmed", "ORD-102", 200.00, "USD",
datetime(2026, 5, 10, 10, 10, tzinfo=timezone.utc)),
DomainEvent("ev-4", "PaymentConfirmed", "ORD-102", 200.00, "USD",
datetime(2026, 5, 10, 10, 10, tzinfo=timezone.utc)), # Network duplicate
DomainEvent("ev-5", "PaymentRefunded", "ORD-102", 200.00, "USD",
datetime(2026, 5, 10, 10, 25, tzinfo=timezone.utc)),
# Order ORD-103: PaymentConfirmed arrives before OrderConfirmed -> Valid $150.00
DomainEvent("ev-7", "PaymentConfirmed", "ORD-103", 150.00, "USD",
datetime(2026, 5, 10, 10, 31, tzinfo=timezone.utc)),
DomainEvent("ev-6", "OrderConfirmed", "ORD-103", 150.00, "USD",
datetime(2026, 5, 10, 10, 30, tzinfo=timezone.utc)),
# Order ORD-104: Paid but immediately cancelled -> Net $0.00
DomainEvent("ev-8", "OrderConfirmed", "ORD-104", 50.00, "USD",
datetime(2026, 5, 10, 10, 40, tzinfo=timezone.utc)),
DomainEvent("ev-9", "PaymentConfirmed", "ORD-104", 50.00, "USD",
datetime(2026, 5, 10, 10, 41, tzinfo=timezone.utc)),
DomainEvent("ev-10", "OrderCancelled", "ORD-104", 50.00, "USD",
datetime(2026, 5, 10, 10, 42, tzinfo=timezone.utc)),
]
expected_batch = compute_batch_total(event_stream, target_currency="USD")
observed_kappa = compute_kappa_streaming_total(event_stream, target_currency="USD")
# Only ORD-101 ($100) and ORD-103 ($150) remain active net paid sales = $250.00assert expected_batch == 250.00assert observed_kappa == 250.00# Demonstrate error when Lambda overlaps windows (09:50Z..10:00Z) and ignores refunds/duplicates
flawed_lambda = compute_flawed_lambda_total(
all_events=event_stream,
batch_snapshot_until=datetime(2026, 5, 10, 10, 0, tzinfo=timezone.utc),
speed_layer_starts_at=datetime(2026, 5, 10, 9, 50, tzinfo=timezone.utc),
)
assert flawed_lambda == 800.00# Over 3x inflated compared to the true $250.00print(f"Batch={expected_batch}, Kappa={observed_kappa}, Flawed Lambda={flawed_lambda}")
Evaluating Ecosystem Engines: Apache Flink, Apache Spark, and Apache Kafka
When a domain team chooses microbatch or stateful streaming, understanding the architectural strengths of each engine avoids mismatched expectations (remembering that concrete guarantees always depend on engine and sink configuration):
Apache Flink (and Amazon Managed Service for Apache Flink): A native event-by-event stateful stream processor. It excels when you need sub-second to low-second latency, fine-grained Event Time watermarks, complex windowing, and large local state stores backed by incremental checkpoints.
Apache Spark Structured Streaming (on AWS Glue Streaming or Amazon EMR): Runs a microbatch execution model by default on top of the same SQL/DataFrame engine used for Spark Batch. It is an ideal fit when a team already uses PySpark/SQL, target latency is tens of seconds to a few minutes, and you want to share transformation code between batch and incremental jobs.
Apache Kafka (and Amazon MSK): Serves as the replayable, partitioned event log that makes Kappa Architecture viable, allowing engines like Flink or Spark to rewind offsets and reprocess historical events when domain rules evolve.
Using AI Assistants to Select and Validate Processing Architectures
AI assistants can help evaluate cost-versus-latency tradeoffs and uncover semantic drift between batch and streaming layers before deploying complex infrastructure.
Prompt 1: Evaluating Batch, Microbatch, Lambda, and Kappa for a New Data Product
Context: I own a new Data Product in the Inventory domain of CommerceFlow.
Actual requirements:
- Purchasing managers review the stock-turnover report twice a day (08:00 and 16:00 UTC).
- Daily volume is 2 million inventory movements stored in S3 Parquet.
- A teammate proposes building a 24/7 Kappa Architecture with Apache Kafka and Apache Flink to update the table every 500 milliseconds.
Task: Evaluate this proposal by comparing Scheduled Batch, 15-minute Microbatch, and Continuous Streaming (Kappa) across 5 criteria: real latency value to the consumer, state management complexity, ease of historical backfill, cloud compute cost, and cognitive load on the domain team. Recommend the most appropriate architecture and justify why.
What a human must verify: Confirm with actual downstream consumers whether any automated operational system (such as live checkout cart blocking) depends on sub-second updates from this product or if usage is strictly twice-daily reporting.
Prompt 2: Detecting Semantic Drift Between Batch and Speed Layers in a Lambda Architecture
Context: We operate a Lambda Architecture where the Batch Layer calculates daily sales in SQL (Amazon Athena) and the Speed Layer calculates trailing-hour sales in Python over event streams. Every day there is a 3% to 6% discrepancy between the two layers.
Task: Provide a technical checklist of the 6 most common causes of divergence between a Batch Layer and a Speed Layer (covering Event Time vs. Processing Time, compensating events like refunds/cancellations, idempotent deduplication, binary floating-point vs. DECIMAL(12,2) rounding, and temporal cutoff overlap) and explain how to design an automated reconciliation query between the two layers.
What a human must verify: Check numerical types in the speed layer (avoiding binary float in Python for monetary amounts in favor of Decimal) and verify that the serving layer cutoff filter uses the exact same time attribute (occurred_at) in both layers.
Practical Exercises
Exercise 1: Diagnosing Double Counting in a Lambda Serving Layer
A team implements a Lambda Architecture for the paid-sales product. The daily batch job processes all sales with occurred_at < '2026-05-11 00:00:00Z', but the job takes 35 minutes to complete and publish its partition to S3 (finishing at 00:35:00Z). Meanwhile, the serving layer view executes:
SELECT order_id, settled_amount FROM paid_sales_batch
UNIONALLSELECT order_id, settled_amount FROM paid_sales_speed_last_2_hours;
Explain why this query double-counts sales occurring between 22:35:00Z and 00:00:00Z, and rewrite the query or cutoff design so that no order_id is ever counted twice or hidden while the batch job is running.
Exercise 2: Assessing Kappa Architecture Feasibility When Business Rules Change
The Sales domain uses a Kappa Architecture to maintain paid-sales-live. Its event broker is configured with a maximum retention period of 3 days, and no historical event archive exists in object storage. Six months after launch, Finance discovers that a promotional discount code was miscalculated since January and asks to recompute the past 6 months of paid-sales-live using the corrected formula.
Explain why the team cannot fulfill this request via a simple replay of its current event broker, and specify what architectural change their Kappa implementation needs to support full historical recomputation.
Exercise 3: Justifying Microbatch vs. Continuous Streaming
Compare two new requirements at CommerceFlow:
Case A: Refreshing an internal warehouse supervisor dashboard every 5 minutes with cumulative orders per fulfillment center.
Case B: Blocking a checkout attempt in under 800 milliseconds when the same payment card or account accumulates three payment declines and two shipping-address changes within a 30-second sliding window.
State which processing model (Batch, Microbatch, or Continuous Stateful Streaming) you would choose for Case A and Case B, justifying each decision.
Solutions to the Exercises
Solution to Exercise 1
Why double counting occurs: At 00:35:00Z, paid_sales_batch already contains all orders up to 00:00:00Z, while paid_sales_speed_last_2_hours contains orders from 22:35:00Z to 00:35:00Z. Using UNION ALL without filtering by the watermark of the latest completed batch causes every order between 22:35:00Z and 00:00:00Z to appear in both tables and be summed twice.
How to fix it: The batch pipeline must record its exact coverage timestamp (max_batch_event_time = TIMESTAMP '2026-05-11 00:00:00Z') in a metadata control table, the speed layer must retain at least 2 hours of recent data (covering the 35-minute batch runtime), and the serving layer must filter explicitly on the cutoff boundary:
WITH batch_watermark AS (
SELECTMAX(covered_until_utc) AS cutoff_time
FROM sales_products.batch_publication_metadata
WHERE product_name ='paid_sales_batch'
)
SELECT order_id, settled_amount
FROM paid_sales_batch
WHERE occurred_at <= (SELECT cutoff_time FROM batch_watermark)
UNIONALLSELECT order_id, settled_amount
FROM paid_sales_speed_last_2_hours
WHERE occurred_at > (SELECT cutoff_time FROM batch_watermark);
Solution to Exercise 2
Why replay fails: Kappa Architecture rebuilds views by re-reading the event log from the past. If the streaming broker deletes events after 3 days and raw events were never archived to durable storage, the events from the first 5 months and 27 days are permanently gone, making a 6-month replay impossible.
Required architectural change: Enable Tiered Storage on the streaming platform or continuously archive all immutable events to a historical port in Amazon S3 (e.g., date-partitioned Parquet/JSON), so a backfill processor can read historical months from S3 and seamlessly transition to the trailing 3 days on the live stream.
Solution to Exercise 3
Case A (Supervisor dashboard every 5 minutes) -> Microbatch (or 5-minute scheduled incremental query): A human warehouse supervisor does not react in milliseconds; running a 5-minute incremental microbatch easily meets the SLA at a fraction of the cost and operational complexity of continuous streaming.
Case B (Anti-fraud block in < 800 ms over a 30-second sliding window) -> Continuous Stateful Streaming: A 1- or 5-minute microbatch would finish long after the fraudulent checkout completed. This requirement genuinely justifies a continuous event-by-event stream processor (such as Apache Flink) maintaining per-account/card state over a 30-second sliding window and emitting block signals in milliseconds.
Key Takeaways and Decision Criteria
When selecting the processing model for a Data Product in your Data Mesh architecture, apply these decision rules:
Start from consumer value, not technology hype: If data drives daily decisions or accounting closes, Batch is simpler, cheaper, and easier to audit; if it requires refresh intervals of a few minutes, evaluate Microbatch; reserve Continuous Streaming for use cases where acting within seconds changes business outcomes.
Lambda and Kappa are internal product implementation choices: Whichever processing topology the owning domain chooses internally, externally the Data Product must still provide a clear contract, explicit ownership, and measurable SLOs.
If you choose Lambda, automate the cutoff boundary and parity tests: Ensure the serving layer never overlaps windows between the batch and speed paths, and run automated tests verifying that both paths apply identical rules for cancellations and refunds.
If you choose Kappa, guarantee historical retention and idempotency: A single streaming path eliminates dual-codebase drift, provided you archive the immutable event history so you can replay from the beginning whenever domain logic evolves.
A comprehensive hands-on capstone project to design, build, and verify an end-to-end Data Mesh architecture on AWS using S3, Parquet, Glue, Athena, Lake Formation, Terraform, YAML contracts, and Python validations.
Learn how to connect governed Data Products in a Data Mesh with Machine Learning systems, Feature Stores, MLOps, and generative AI RAG architectures while preventing data leakage, semantic errors, and permission breaches.
A practical and strategic guide to planning enterprise Data Mesh adoption: maturity assessment, pilot selection, team topologies, FinOps cost modeling, real outcome KPIs, and criteria to avoid over-engineering.