Comparison

Real time or batch: how fast should your data move?

Moving everything to real time is expensive and complicates operations. Leaving everything in overnight batches means teams work with yesterday’s figures. The right pace is chosen flow by flow, based on what late data costs.

The short answer

Move to real time (events or API calls) the flows whose delays cost money or customers: stock shown online, an order to confirm, product availability, a delivery status. Keep in batch the large flows that can wait: accounting, reporting, master data loads, archiving. In between, a frequent incremental batch that only sends what has changed is often enough.

The differences, criterion by criterion

There are in fact three paces: the event, sent as soon as it happens; regular polling, which fetches what is new every few minutes; and the scheduled batch, overnight or hourly. The table contrasts the two extremes.

CriterionReal timeBatch
FreshnessFrom a few seconds to a few minutesThat of the last batch: often the day before
TriggerAn event (a sale, an order, a new hire) or a user requestA fixed time
Volume per exchangeOne object, or a fewThousands to millions of lines
Load on systemsSpread over the day, and limited to what changesConcentrated in a window, sometimes with a full re-read
When something failsMessages wait in a queue and resume when the system is back, if there is a brokerThe batch must be rerun, often in full, and the delay adds up
OperationsA broker or platform to monitor continuouslySimpler: scheduled jobs and their logs
Typical casesOnline stock, orders, availability, statuses, alertsAccounting, reporting, large master data, archiving

When to choose one or the other

Real time, when…

  • a customer sees the data: stock, price, availability, order tracking;
  • a decision is made on the data: a sales rep committing to a lead time, a customer balance to check;
  • several applications react to the same fact: a sale updates stock, loyalty and sales tracking;
  • the overnight batch is growing too large for its window.

Batch, when…

  • nobody needs the data before the next day: accounting, reporting, archiving;
  • volumes are huge and processing is heavy;
  • a partner can only exchange files, at a fixed time;
  • the flow is simple and stable, and real time would bring nothing measurable.

Signs a flow should move to real time

We often see them appear as business grows:

  • online orders are cancelled because the product was no longer in stock;
  • sales reps call the warehouse to check availability;
  • the overnight batch runs into store or office opening hours;
  • during sales or promotions, the delay grows at the worst moment;
  • the calculation is run more often, and the ERP slows down.

The two complement each other

The same data can follow two paths. On a Sage X3 project, the catalogue and price lists flow down to Salesforce through scheduled incremental reads, while a product’s availability is requested from the ERP live, when the sales rep needs it. In retail, sales come up from the tills continuously, while the overnight calculation remains useful for accounting and stock counts.

How we approach the question

For each flow, we ask three questions: what does late data cost, what volume moves, in which direction. Real time is kept for flows where it pays off; the others move to incremental updates or stay in batch. We start with the flow that pays off most, and measure the gain before going further.

Frequently asked questions

Does real time cost more than batch?

Often slightly more to set up and monitor, because a broker or platform has to run continuously. But it can also reduce load: sending only what changes avoids re-reading millions of lines every night. That is why it is kept for flows where delays are costly.

What is change data capture (CDC)?

It is a method that sends only the changes (a new sale, a stock line that moves) instead of copying all the data at a fixed time. It keeps data up to date within minutes without overloading the source system.

Read the article →

Is an event broker needed for real time?

Not always. An API call is enough when an application needs an immediate answer, for example a product’s availability. A broker becomes useful when several applications must receive the same event, or when no message may be lost if a recipient is down.

Read the article →

Can we move gradually from batch to real time?

Yes, and that is the right way to do it: one flow at a time, starting with the one whose delays cost the most. The existing batch stays in place for the rest, and acts as a safety net during the transition.

Can the ERP handle real-time exchanges?

Most ERPs expose web services or APIs, and their databases can be read incrementally. The key is not to overload them: read only what has changed, group writes together, and have websites read from a separate database rather than from the ERP.

Which of your flows deserve real time?

List your flows and what a delay costs on each one: we will tell you which to move to real time and which to leave in batch.