All articles
11 min read

Integration Architecture Patterns: How to Choose the Right One

A tidy telephone exchange shelf with two jacks joined by one patch cord, a small bell and an empty wooden pigeonhole rack, with a single amber indicator lamp on the wall behind.

For a small or growing company, the right integration pattern is the simplest one that survives your next change. Connect two or three stable systems directly. Put an API layer in front of the systems you expect to grow. Use a queue or publish/subscribe (pub/sub) channel once several systems need to react to the same event, or once one slow system should not hold up the others. We build these connections for shops, CRMs and ERPs, and the mistakes we see come from picking a pattern by fashion instead of by the shape of the problem.

TL;DR

  • An integration pattern is a proven way to connect systems. The main families are file transfer, shared database, direct API calls (request/response) and messaging.
  • Point-to-point is fine for a handful of stable systems. It becomes expensive as every new system adds more connections.
  • Event-driven integration, built on pub/sub, decouples systems so one can fail or change without breaking the others. In exchange it is harder to debug.
  • Choose by asking five questions: how many systems, who needs an answer right now, how much volume, what happens when something fails, and who will maintain it.
  • Most real setups mix patterns. The skill is knowing where each one belongs.

What an integration architecture pattern is

An integration architecture pattern is a reusable answer to a recurring problem: two or more applications need to share data or trigger each other’s work, and you want it to keep working as the business changes. Salesforce’s architecture guide describes patterns as strategies for common integration scenarios, and sorts them into data integration, process integration and virtual integration. In plain terms:

  • Data integration keeps the same information in sync across systems, for example customer records in your shop and your CRM.
  • Process integration runs a business process across several applications, for example order, payment, shipping and invoice.
  • Virtual integration reads data from another system when needed instead of copying it.

The same guide says the right choice depends on what the systems can do, how much data moves, how failures are handled and whether steps must succeed or fail together. That list is a good start for your own decision, and we return to it below.

The four basic styles

The classic reference, Hohpe and Woolf’s Enterprise Integration Patterns, names four integration styles: file transfer, shared database, remote procedure invocation (one system calls another directly) and messaging. Their point is that you should not pick one style and use it everywhere. You pick the best style for each integration.

A similar list appears in an engineering write-up on distributed systems, which names shared database, file transfer, synchronous request-response and asynchronous events. It also notes that calling another service over HTTP couples you more tightly to it than sending a message does, because you must know a good deal about the service you are calling.

Style How it works Typical use Main risk
File transfer One system exports a file, another imports it Nightly exports, reporting, accounting handover Data is always a bit old
Shared database Several applications read and write the same tables Legacy systems under one roof Any schema change can break everyone
Request/response (API) One system calls another and waits for an answer Price lookups, payment confirmation, login If the callee is down, the caller is stuck
Messaging / events A system sends a message and moves on Order events, notifications, background jobs More moving parts, harder to trace

Point-to-point: simple until it isn’t

Point-to-point means system A talks directly to system B. A webshop sending orders straight to an ERP is the everyday example. It is quick to build, easy to debug and needs no extra infrastructure. For two or three systems with stable interfaces, it is often the correct answer, and we would not talk you out of it.

The trouble is arithmetic. Every new system may need a connection to every existing one, so the number of links grows much faster than the number of systems. Confluent’s microservices course makes the same point: each direct link is a form of coupling, and long chains of direct calls can lead to cascading failures, where one slow service drags down everything that depends on it.

A practical rule of thumb from one systems-design guide: point-to-point suits fewer than five systems or throwaway prototypes. Beyond that, you usually want a shared layer.

Hub-and-spoke and the API-led approach

To escape the tangle, many teams put something in the middle. There are two common shapes.

Hub-and-spoke (often an enterprise service bus, ESB) routes and transforms everything through one central component. Translation rules live in one place, which helps when you have 10 to 30 systems and a central integration team. The cost is that the hub becomes a single point of failure and a bottleneck for change: a mistake in one transformation can affect every flow that passes through it.

API-led integration wraps each system behind a clear, documented interface. Other systems call that interface and never touch the internals. The benefit is that you can replace the system behind the API, say a legacy ERP, without rewriting every consumer. For new work, REST-style APIs are the default most teams reach for. The weakness is the one all synchronous calls share: if the API is down, everything that calls it waits.

A related idea is the canonical data model, a single agreed format that all systems translate to and from. It cuts maintenance as systems multiply, but it takes real effort to design well at the start. Keep it small and cover only the data that actually crosses system boundaries.

Messaging: queues and pub/sub

Messaging removes the waiting. The sender puts a message on a channel and carries on; the receiver picks it up when ready. There are two shapes, and the difference matters.

Queues (point-to-point messaging)

In a queue, each message goes to exactly one consumer. IBM’s overview of message brokers gives the typical example: payroll and financial transactions, where each payment must be sent once. Queues are also a natural way to share work among several workers and to retry failed jobs. They do not broadcast: if three systems need to know about the same order, a plain queue is the wrong tool.

One caution applies to every queue. Think of it as a shock absorber for short bursts, not a hidden bottomless buffer that hides a permanent mismatch between how fast work arrives and how fast it is processed. If the backlog only ever grows, you have a capacity problem, not an integration problem.

Publish/subscribe

In pub/sub, a system publishes an event to a topic, and every subscriber gets its own copy. The publisher does not know or care how many consumers exist. Adding a new consumer, such as a analytics feed or a loyalty-points service, requires no change to the publisher.

Queue (point-to-point) Pub/sub
Who receives a message One consumer Every subscriber
Good for Jobs, tasks, payments Notifications, broadcasts, many reactions to one event
Adding a consumer Splits the work Adds another listener, publisher unchanged
Watch out for No fan-out Ordering and storage grow with subscribers

The last row comes from a queues-versus-topics comparison, which notes that topics give true decoupling but make ordering guarantees harder and storage grow with the number of subscribers.

Event-driven integration

Event-driven integration is pub/sub applied across a business. Systems emit events (“order placed”, “invoice paid”, “stock low”) and others react. SAP’s Swiss resource page describes the moving parts: producers send events in real time, and an event broker acts like a central switch that manages channels, guarantees delivery and decouples producers from consumers, often with filtering, storing and replaying of events.

That last feature is what makes event-driven setups forgiving. If a downstream system is offline for an hour, the events wait and are processed when it returns, instead of being lost or blocking the sender. It also lets you connect a legacy system gradually, publishing its changes as events while new services grow around it.

Gregor Hohpe adds a useful correction: the loose coupling comes from the publish-subscribe channel, not from events themselves. If consumers all depend on the exact shape of an event, you have only moved the coupling. Design events as stable contracts and change them carefully.

What you pay for it

Event-driven systems are not free. In one practical guide to event-driven communication, the author points out that you never know exactly who received an event, that debugging turns into detective work, and that schema changes need coordination across all consumers. Plan for this from day one:

  • Give every event a unique ID and a timestamp so you can trace it.
  • Make consumers idempotent, meaning processing the same event twice does no harm. Duplicates happen.
  • Set up a dead-letter queue, a holding area for messages that repeatedly fail, and someone who looks at it.
  • Version your event formats.

The Enterprise Integration Patterns introduction is candid about the other drawbacks of asynchronous messaging: a more complex programming model, sequencing issues and overhead for bulk data. Those are reasons to apply it where it pays off, not everywhere.

Comparing the patterns

One comparison of interoperability styles rates them on coupling, interaction type, complexity and scalability. Summarized for a small team, it looks like this, based on that comparison:

Pattern Coupling Interaction Build complexity Scalability
Point-to-point Very high Synchronous Low Complex as systems grow
ESB / hub Low, via the bus Any High Complex
API gateway Medium Mostly synchronous Medium Good
Message broker / events Low, via events Asynchronous High Excellent

The pattern: the more independence you want between systems, the more infrastructure and discipline you take on. That trade is the whole subject.

Examples for a typical small business

Pattern names are abstract, so here are three situations we meet often in Swiss SMEs and startups.

Webshop to ERP. Orders must reach the ERP, and stock levels must come back. With one shop and one ERP, a direct API connection is reasonable. If you later add a marketplace and a second warehouse, put an integration layer between them before you add the third direct link. The ERP side has its own options; ERP integration approaches explains how the main ones differ.

Order placed, five things happen. Confirmation email, invoice, warehouse pick, CRM update, loyalty points. Here pub/sub fits: the shop publishes “order placed” once, and each downstream system subscribes. Adding a sixth reaction later does not touch the shop.

Payment confirmation at checkout. The customer is waiting, so you need an answer now. This is a synchronous request/response call, even if everything else around it is asynchronous. Pairing the two styles is normal: event-driven integration should coexist with API-driven integration, not replace it.

How to choose: five questions

Use these in order. Stop at the first answer that settles it.

  1. How many systems, now and in two years? Under five and stable: point-to-point is fine. Ten to thirty with a central team: a hub or API layer. Many more, with teams owning their own services: an event backbone, according to the systems-design guidance cited above.
  2. Does the caller need an answer immediately? If yes, and the chain of dependencies is shallow, call synchronously. If not, send a message.
  3. How spiky is the load? Queues and events absorb bursts, such as a campaign day or month-end run, that would overwhelm a direct call.
  4. What happens when a system is down? If the business cannot afford lost or delayed data, use messaging with retries and replay. If a short failure is acceptable, direct calls are simpler.
  5. Who will run it? Event-driven setups need monitoring and someone who understands them. A pattern your team cannot operate is the wrong pattern, however elegant.

And a sixth, unwritten rule: do not design for 30 systems when you have three. Build the simplest version that has a clean seam where the next pattern can be introduced.

Where a senior engineer changes the outcome

Integration projects usually go wrong at the edges: a requirement changes midway, the person who understood the ERP leaves, or a quick connection hardens into a dependency nobody dares touch. Ampersand is a small Zurich studio, and on every project senior engineers stay involved from the first consultation to handover, so the person who chooses the pattern is the person who sees it through.

We build system integrations and API connections for shops, CRMs and ERPs, and we handle replatforming and migration of legacy systems. Our pricing page lists integration work as a single connection or a full integration suite, and a Run & monitor plan at 750 CHF per month for keeping integrations healthy after launch. If you are unsure which pattern fits, our advisory and audit work is built for exactly that question. See the integration and migration options on our pricing page, or start from ampersand.ch.

FAQ

What is the difference between pub/sub and point-to-point?

In point-to-point messaging, each message is consumed by one receiver, as in a payment instruction that must be executed once. In pub/sub, a message published to a topic is delivered to every subscribed application. Use the first for tasks and the second for broadcasts where several systems react to the same event.

Is event-driven integration always better than APIs?

No. It suits real-time reactions, load spikes and several consumers per event. Anything where the caller must wait for an answer, such as a payment confirmation, still belongs on a synchronous API. Most healthy architectures use both.

When is point-to-point enough?

When you connect a small number of stable systems, roughly fewer than five, or build a prototype you expect to replace. Keep the connections documented and behind a clear interface so you can introduce a shared layer later without a rewrite.

Which pattern should a startup begin with?

Start with direct API calls between your few core systems, and add a queue where work can be done in the background, such as emails or invoice generation. Introduce pub/sub when a second or third system needs to react to the same event.

Sources

Talk to us

Have a project this touches on?

A free 10-minute call is the fastest way to find out whether we are the right studio for it.

Book a free 10-min call