Skip to main content
Back to insights

Choose APIs, Events or Batch by Operational Need

Teams sometimes choose a familiar integration pattern before agreeing on response time, ownership and failure handling. The result can be fast data delivery that the operation did not need, or slow data where speed matters.

  • Architecture
  • Integration

Arinao Tshamano3 October 20263 min read

Teams sometimes choose a familiar integration pattern before agreeing on response time, ownership and failure handling. The result can be fast data delivery that the operation did not need, or slow data where speed matters. A user waiting for a price confirmation has a different need from a reporting team receiving yesterday's totals. An API call, event and batch transfer can all move the same fields, but each creates a different dependency and recovery path. Treat the timing of the business decision as an input to the choice.

What good engineering looks like

Does the user need an immediate answer, must several systems react to a fact, or can the work run in a controlled window? Answer this for a named workflow and an accountable team. Identify the information needed at the moment of decision, the system that can settle a dispute, and the route for correcting dependent copies. The technical design should make those business rules visible to the people who operate and support the handoff.

  • Use a request-response API when the caller needs a direct answer and can tolerate that dependency.

  • Use an event when a completed business fact has independent consumers and delayed handling is acceptable.

  • Use a batch or file exchange when a defined window, volume or partner constraint makes it the simpler controlled boundary.

  • A named owner for a rejected, delayed or repeated item.

  • Evidence that the receiving system applied the intended business state.

A practical starting point

  1. Choose one real case and write down its trigger, expected outcome and responsible team.

  2. Record the acceptable wait, expected volume, ownership of retry, and consequence of a missed update.

  3. Test the chosen pattern with a slow responder and a failed transfer. If the user cannot tell whether the task succeeded, improve the workflow before choosing a faster transport.

  4. Record what the test exposed, who will resolve each open question and how the fix will be checked.

Keep the first design small enough to review with the people who run the process. Test an exception alongside the normal case. A successful transport test shows that data moved; it does not by itself prove that the receiving team can make the right decision or recover from a partial failure.

The decision to make

Most enterprises need more than one pattern. Decide per handoff and document the operating responsibilities of each. Decide what level of timing, traceability and recovery this workflow actually needs. Document assumptions that remain untested and revisit the choice when a partner, process or business rule changes. The point is a dependable operating decision, not simply a working interface.

Explore Algoza's related services: https://algoza.co.za/services/integration

Apply the thinking

Working through a related technology decision?

Share the operational context, current systems, constraints, and decision you need to make.

Discuss a requirement