NULLBIT
NULLBIT
Blog
Author: ALFRED

Integration Patterns: How to Choose the Right One

Integration patterns explained for business leaders: messaging, publish-subscribe, batch, API calls and the anti-corruption layer, with a clear way to choose.

Integration Patterns: How to Choose the Right One

Integration Patterns: How to Choose the Right One

Integration-themed decorative title card

An integration pattern is a proven way to connect two or more systems, and the pattern you pick decides how fast data moves, what breaks when one system goes down, and how much each future change costs. Most teams get into trouble because they pick a tool first and a pattern never. A CRM gets wired to an ERP with a quick point-to-point script, then a billing system joins, then an AI model needs the same data, and within a year nobody can change one system without breaking three others. Choosing the pattern first, based on how fresh the data must be and how much coupling you can live with, avoids most of that. At Nullbit we build custom software and AI automation on top of exactly these decisions, so this guide stays practical: what each pattern does, when it fits, and where it bites.

Nullbit
nullbit.co
Make System Integrations Fit Your Business
Nullbit develops custom software tailored to your needs, helping connect digital solutions with the way your business works.
Custom Software Development

TL;DR

  • A pattern describes how systems talk (direction, timing, coupling); a tool or product only implements it.
  • Use synchronous API calls when someone needs the latest data right now, and messaging or publish-subscribe when systems should keep working independently.
  • Batch and ETL still win for large, scheduled data movement where minutes or hours of delay are fine.
  • An anti-corruption layer protects a new system from a legacy system’s data model during migration.
  • Pick on freshness, failure handling, data volume and how often the interface will change, then document the choice before building.

Table of Contents

What an integration pattern is, and what it isn’t

Salesforce’s architecture training describes integration patterns as proven ways to evaluate and solve integration problems without reinventing the wheel. A pattern shows how the overall solution works. It doesn’t tell you which product to install or which lines of code to write. The well-known Enterprise Integration Patterns catalog treats them as a technology-independent vocabulary with 65 named patterns for problems that recur in distributed applications.

That vocabulary matters for a business owner more than it first appears. When your engineers say “we’ll use a message queue” and your vendor says “we’ll expose a REST endpoint,” they are describing different patterns with different consequences for your operations, even if the two proposals have the same price. A pattern, a data format and a protocol are three separate choices. Harvard’s enterprise architecture office points out that they’re independent even when REST, JSON and HTTPS usually travel together. You can send JSON through a queue or XML over an API call.

SAP’s publishing arm makes the same split between patterns, which are architectural decisions about direction, timing, coupling and protocol, and tools, which implement them. It adds that the choice affects performance, scalability, maintainability and cost. The last word is the one finance cares about: a pattern that looks cheap in the first sprint can be the expensive one in year three.

The four basic styles

The Enterprise Integration Patterns guide groups the whole field into four integration styles. Everything more specific is a refinement of one of them.

File transfer. One system writes a file, another reads it. It’s old and unglamorous, and it’s still how plenty of banks, logistics partners and government bodies exchange data. It works when both sides agree on a format and a schedule, and it fails quietly when a file arrives late or half-written.

Shared database. Several applications read and write the same database. Data is always consistent because there is only one copy. The price is tight coupling: change a table and every application that touches it can break, so teams tend to stop changing the table.

Remote procedure invocation. One application calls a function in another and waits for the answer. Today that usually means a REST or gRPC API. You get the current answer immediately, and you also inherit the other system’s downtime: if it’s slow, you’re slow.

Messaging. Systems exchange data through messages on a channel, without both being available at the same moment. It handles unreliable networks and uneven load well and takes more design effort than a simple API call.

Salesforce Architects looks at the same space from the business side and sorts scenarios into data integration, process integration and virtual integration: synchronizing records, coordinating a business process across applications, and reading external data without copying it. That framing is useful when you’re the one writing the requirement, because you can usually say which of the three you need before you know anything about technology. A healthcare software leader weighing the same question will find the API strategy for healthcare SaaS a good companion read on how those three scenarios play out when the data is clinical.

Three business integration scenarios compared

Synchronous, asynchronous, batch and real-time

Most arguments about integration come down to timing, so settle that vocabulary first.

Synchronous means the caller waits. Harvard’s guidance says synchronous API or RPC access is the right choice when users need the most up-to-date data. A customer-facing checkout that must confirm stock before taking payment is the textbook case.

Asynchronous means the sender hands off a message and carries on. The same Harvard advisory describes brokered messaging as a way to mediate one-to-one, one-to-many and many-to-one exchanges, useful for asynchronous communication, unreliable networks and high-volume fan-in and fan-out. An order is accepted in a second and the warehouse, invoicing and email systems pick it up on their own time.

Batch moves data in scheduled chunks. Harvard describes ETL as direct database connections extended with batching, transformation and scheduling. If finance needs yesterday’s numbers in the reporting warehouse by 7 a.m., a nightly batch is cheaper and easier to reason about than a live stream. Our own write-up on ETL versus ELT covers how to pick between the two common batch shapes.

Streaming moves data continuously, which suits real-time monitoring and response. If a batch is a nightly truck, streaming is a conveyor belt. When the source is a database that already holds the changes, change data capture can feed the conveyor without touching application code.

Need Usual pattern What you accept
Latest value, user waiting Synchronous API call Your uptime depends on theirs
Many systems react to one event Publish-subscribe via a broker Harder testing, extra latency
Large scheduled data movement Batch / ETL Data is as old as the last run
Live monitoring or alerts Streaming More infrastructure to run
Protect a new system from an old model Anti-corruption layer One more component to operate

Publish-subscribe: one event, many listeners

In publish-subscribe, a sender publishes a message to a channel and the channel delivers a copy to every subscriber. The Enterprise Integration Patterns JMS example uses a customer address-change channel: the application that changes an address publishes it, and billing, shipping and marketing each subscribe. The publisher never needs to know who is listening.

That’s the whole appeal. Adding a fourth consumer, say an AI model that scores churn risk from address changes and other customer events, means adding a subscription. Nobody edits the publisher. Carnegie Mellon’s Software Engineering Institute describes this in its report on integrability: components are added by adding subscriptions.

The same report is honest about the costs, and you should plan for them. The broker adds latency, and asynchronous behavior makes outcomes less deterministic, which complicates testing and race-condition control. In plain terms: when a customer says “I changed my address and still got the parcel at the old one,” you need to trace which subscriber was slow, and that requires logging and monitoring designed in from the start. Budget for it. Teams that treat the broker as a magic pipe end up with events nobody can trace.

Use publish-subscribe when many systems need to react to the same business event and the reaction doesn’t need to finish before the user moves on. Skip it for a single consumer that needs an immediate answer; a plain API call is simpler.

Publish-subscribe: one event, many listeners

Anti-corruption layer: keeping an old model out of your new system

When you replace or surround a legacy system, the temptation is to let the new code speak the old system’s language: its odd field names, its status codes, its idea of what a “customer” is. Within a year the new system has inherited every quirk. An anti-corruption layer is a translation layer that prevents that. Microsoft’s architecture guidance defines it as a facade or adapter between subsystems that translates requests and semantics, so each side keeps its own data model and design.

It earns its keep in staged migrations. AWS’s prescriptive guidance describes using it to translate a monolith’s domain model into the semantics of a migrated microservice, so existing callers can be redirected without being changed. You move one capability at a time and the rest of the business doesn’t notice. The layer can live inside an application or run as an independent service, depending on how long the two models will coexist.

It isn’t free. The same AWS page lists operational overhead, a possible single point of failure, added latency and scaling bottlenecks, and recommends retries, circuit breakers, alerting and appropriate scaling to deal with them. Put it where the translation is genuinely complex and the migration will last months, not for connecting two clean modern APIs.

How to choose: five questions in order

The research from Salesforce Architects says to weigh system capabilities, data volume, failure handling and transactionality. The Enterprise Integration Patterns guide adds coupling, simplicity, specialized technology, data-format evolution and timeliness, and asks whether the systems exchange data or invoke functionality. Put into an order you can use in a meeting:

  1. How fresh must the data be? If a person or a payment waits on the answer, go synchronous. If “within the hour” is fine, batch is probably enough. Harvard’s advisory notes that for frequent transactional changes, APIs or messaging avoid repeated bulk resynchronization, which is the point where a nightly batch stops being the cheap option.
  2. What happens when the other system is down? If the answer is “we must keep taking orders,” you need messaging or a queue between them. If the answer is “we stop,” a synchronous call is honest and simpler.
  3. How much data, how often? Thousands of records a night suggest batch. Thousands of events a minute suggest streaming or a broker.
  4. Who else will want this data next year? One consumer today and an AI initiative tomorrow is the argument for publishing events instead of wiring point to point.
  5. How different are the two data models? Close enough to map field by field: a direct integration. Fundamentally different, or one side is a legacy system you’re retiring: add a translation layer.

The EIP site describes asynchronous messaging as valuable for loose coupling when distributed communication has latency and partial failures, with pitfalls of its own. Take that as the rule of thumb: start synchronous for simple, user-facing reads, and move to messaging at the exact point where one system’s outage must no longer stop another.

Two mistakes recur. The first is picking one pattern for everything. A healthy architecture mixes them: APIs for lookups, events for notifications, batch for reporting. The second is skipping the written record. A one-page decision note stating the pattern, the reason and the failure behavior saves weeks when someone new joins. Our guide to system integration best practices and the piece on API-first architecture go deeper on how to document and govern those interfaces, and API lifecycle management covers versioning once they’re live. If you’re unsure whether the design you inherited holds up, a software architecture review scaled to the risk is the cheapest place to find out.

Integration patterns and AI

AI changes the pattern conversation in one specific way: models are hungry consumers of data from many systems, and they’re more useful when that data is current. An event-based design gives a decision-support model fresh inputs without rewriting the sources, and a well-defined API gives it a safe way to act. The Model Context Protocol is a newer standard for connecting AI assistants to business tools, and we offer MCP development for teams that want their systems reachable that way. For the planning side, see our AI integration strategy guide and the walkthrough on implementing an AI workflow.

The point for a decision maker: if the integration layer underneath is a tangle of point-to-point scripts, an AI project inherits every weakness. Fix the pattern first and the AI work gets cheaper.

Where Nullbit fits

Nullbit builds custom software, cloud infrastructure and AI automation, and our approach is to treat AI as part of the core solution rather than an add-on, which means the integration design is decided together with the automation that depends on it. A proof-of-concept is the lowest-risk way to test an integration pattern on real data: proof-of-concept development starts from €5,000 one-off. Smaller, targeted automations start from €3,000 one-off on the AI automation page, and complete automated ecosystems are scoped individually.

For larger work, Agile Engagement (time and materials) runs from €5,000 to €40,000 per month, and a turnkey Fixed-Price Project runs from €5,000 to €60,000 one-off, both listed on the cooperation page. If the platform is bigger than a single integration, smaller custom solutions start from €15,000 one-off on the software development page.

Nullbit

A relevant example of integration at work is our case study on real-time diabetes data in one secure record.

Perspective

We’d rather settle the pattern on a whiteboard than discover it in production. Most integration pain we hear described comes from a decision nobody made on purpose: two systems were connected the fast way, and the fast way became the architecture.

Our view is that integration is business design before it’s engineering. Ask what must be true when a system is down, how stale a number may be, and who will want this data next. The answers pick the pattern. The technology is then a detail, and because we work technology-agnostic, we can choose the tool that fits the pattern instead of bending the pattern to a favorite tool.

It’s also why we build AI into the core of a solution. Decision-support and automation depend on clean, timely data flows, and those flows are integration patterns. Get them right once and every later automation, report or assistant gets cheaper to add.

Matija

FAQ

What does an integration pattern mean?

It’s a reusable design for connecting systems, covering direction, timing, coupling and data exchange. It describes the approach, not a specific product or code. Examples include request-reply API calls, message queues, publish-subscribe and batch file or database transfers.

Are integration patterns the same as integration tools?

No. A pattern is the architectural decision, and a tool is software that implements it. The same tool can implement several patterns, and the same pattern can be built with several tools, which is why choosing the pattern first keeps your options open.

When should I use publish-subscribe instead of an API call?

Use publish-subscribe when several systems must react to one event and none of them needs to finish before the sender moves on. Use an API call when one system needs an immediate answer from another. Plan for extra logging if you choose publish-subscribe, because asynchronous flows are harder to trace and test.

When is an anti-corruption layer worth building?

It pays off when you’re moving off a legacy system in stages, or when two systems model the same business concept very differently. It keeps the new system’s design clean and lets existing callers keep working. It adds a component to operate, so it isn’t needed for two systems whose data maps cleanly.

Can one company use several integration patterns at once?

Yes, and most do. A typical mix is synchronous APIs for lookups, events for notifications between systems and a nightly batch for reporting. What matters is that each interface has a stated reason for its pattern.

Sources

Tags
integration patterns
Stay ahead of the competition

Exclusive insights that drive change.

Get access to proven methodologies for digital growth, AI tool implementation, and AI product development.

  • Weekly digital strategy analyses
  • Advanced insights into AI trends and technology solutions

Your privacy is a priority. You can unsubscribe at any time.