Your data platform is your AI strategy
Most AI projects that disappoint were never really AI problems. They were data problems that showed up late. Here are five lessons from building high-volume, multi-tenant data platforms, and what each one means for the AI you want to put on top.
Why start with data?
Ask a team why their AI pilot stalled and the answers are rarely about the model. The numbers in the answer did not match the finance report. Yesterday's data was not there yet. Two customers' records got mixed up. Nobody could explain where a figure came from.
Those are data platform failures. A language model is very good at turning trustworthy data into a clear answer. It cannot make untrustworthy data trustworthy. So when we plan an AI feature, we look first at the data it will stand on.
The lessons below come from building event and reporting platforms for messaging providers, where every message produces a stream of events, every business customer expects its own accurate reports, and volumes reach tens of thousands of events per second. The same lessons apply to banking, logistics, IoT and anywhere else that runs on events.
Lesson 1: Order events by when they happened, not when they arrived
One message sent to one person creates several records: the send itself, a delivery report from the network, a billing record and one or more callbacks to the customer's systems. They come from different systems, through different queues, and they do not arrive in order. A delivery report can arrive before the send is recorded. A billing record can turn up minutes later.
If you process events in arrival order, a late "sent" can overwrite an earlier "delivered", and your report now says the message is still in flight. The fix is to merge everything about one interaction into one record, using the time each event actually happened, and to only ever move a status forward.
- Give every interaction a stable key that every source can supply.
- Let each kind of event update only its own fields. A billing record should never touch delivery status.
- Keep enough state to handle events that arrive late, for as long as the business says corrections can happen.
What it means for AI: an assistant that answers "how many messages failed yesterday?" is only as right as this merge. One record per interaction is what makes the answer a simple query rather than a guess.
Lesson 2: Design for corrections from day one
Statuses change after you have already counted them. A message counted as "pending" at 10:00 is "delivered" at 10:02. If your daily summary simply adds rows, it now counts that message twice, once in each status.
The answer is to treat a change as two events: take the old version out, then put the new one in. Analytical databases such as ClickHouse handle this well, so summaries stay exact while detail keeps changing. It is also worth keeping an audit of every correction, because the first time a customer disputes a bill, someone will ask what changed and when.
If a number can change, decide up front how a change flows through every summary that includes it.
Lesson 3: Split hot and cold, and let one store answer each question
Most questions are about the last few weeks. A smaller number reach back months or years. Serving both from one store either makes recent queries slow or makes history expensive.
A pattern that works well is a fast analytical store for recent detail, for example 30 to 60 days, plus a lakehouse on object storage, such as Apache Hudi or Iceberg on S3, that keeps every record indefinitely and can be queried with an engine like Trino. Daily summaries are small enough to keep forever in the fast store.
The important rule is that each query is answered by one store. Joining fresh data from one system with history from another on every request sounds flexible, but it is where slow queries and mismatched numbers come from.
| Layer | Holds | Answers |
|---|---|---|
| Hot store | Recent detail, all daily summaries | Dashboards, online reports, AI questions about recent activity |
| Lakehouse | Every raw, cleaned and merged record | Long-range analysis, audits, rebuilding anything downstream |
Lesson 4: Make tenancy and residency part of the structure
When one platform serves many business customers, keeping their data apart cannot depend on every query remembering a filter. It has to be built in:
- Identity from a trusted source. The customer a request belongs to should come from the authenticated connection or a signed token, never from a field the caller fills in.
- Separation at every step. Ingestion, processing, storage and reports each enforce the boundary, so a mistake in one layer is caught by the next.
- Residency by design. If some customers' data must stay in one region, route it there at ingestion and only replicate within an approved group of regions.
This is also why the choice of streaming backbone matters. For one platform that needed active-active operation across two regions, we chose Apache Pulsar over Kafka because it can geo-replicate individual topics, so only the data that is allowed to cross a region boundary does.
What it means for AI: retrieval and AI-generated reports inherit whatever boundaries the platform enforces. If tenancy is structural, an AI feature cannot leak one customer's data into another's answer by accident.
Lesson 5: Prove nothing is lost, with counts
"We don't lose data" is easy to say. It is only believable with evidence. Two design choices make it achievable: accept an event only once it is safely written, and make every store idempotent, so receiving the same event twice leaves exactly one record.
Then test it the hard way. Run a known volume through the whole pipeline and compare three numbers: events accepted, rows stored, and distinct interactions. They should match exactly. Then do it again while deliberately killing stream processors and message brokers mid-run. If the counts still match, you have a platform you can put AI on.
What this means for planning AI
Once data arrives in order, corrections flow through correctly, history is cheap to keep, tenants are separated by design and counts are provably complete, AI features become small projects. Plain-English questions over live data, alerts when something changes, forecasts and agents that act on current state are all built on the same foundation.
Without that foundation, every AI project turns into a data clean-up first. That is why we say your data platform is your AI strategy. Before you choose a model, it is worth asking which of these five lessons your current platform already gets right.