# Integration Styles

**In short:** Applications can be connected in four basic ways: exchanging files, sharing a database, calling each other's procedures remotely, or sending messages. Each style has its own strengths and weaknesses, so you choose per integration point.

## Explanation

Integration means making separate applications work together. Four basic styles exist for this.

**File Transfer.** Each application writes files containing data that others need. It also reads files that other applications wrote. Producer and consumer must agree on the file name, the location and the file format.

**Shared Database.** Applications keep the data they want to share in one common database. They all use the same schema (the structure of the data) in a single physical database. Because the data is not copied, nothing has to be transferred between applications.

**Remote Procedure Invocation.** Each application exposes some of its procedures so other applications can call them remotely. This is real-time and synchronous. The caller is blocked until the called procedure finishes.

**Messaging.** Each application connects to a common messaging system. Applications exchange data and trigger behavior by sending messages. Messaging works asynchronously. It needs an event-driven programming model, and the messaging system adds some overhead.

All four styles solve essentially the same problem. Each has distinct advantages and disadvantages. So the choice is made for each integration opportunity, not once for the whole landscape.

Related articles: File Transfer, Shared Database, Remote Procedure Call and Messaging.

## Example

A shop runs an order system, a warehouse system and a reporting tool.

- The order system writes a file of new orders for the reporting tool. Both sides agree on file name, folder and layout.
- The order system needs a stock answer right away. It calls a stock procedure on the warehouse system and waits for the result.
- The warehouse system announces shipped parcels by sending messages through a common messaging system. Other applications pick them up when they are ready.

The shop uses three styles, each chosen for one integration point.

## Trade-offs

- **File Transfer:** producer and consumer must agree on name, location and format.
- **Shared Database:** no data is duplicated, so nothing needs transferring.
- **Remote Procedure Invocation:** the call is real-time, but the caller is blocked while it runs.
- **Messaging:** the exchange is asynchronous, but it needs an event-driven programming model and adds overhead.
- **Bulk data replication:** ETL (extract, transform, load) tools are much more efficient than messaging for this job.

No style wins everywhere. Pick the best one for each integration opportunity.

The four basic integration styles between applications

```mermaid
flowchart TB
  subgraph FT[File Transfer]
    A1[App A] -->|writes file| F[(File)] -->|reads file| B1[App B]
  end
  subgraph SD[Shared Database]
    A2[App A] --> D[(Common database)]
    B2[App B] --> D
  end
  subgraph RPC[Remote Procedure Invocation]
    A3[App A] -->|remote call, waits| B3[App B]
  end
  subgraph MSG[Messaging]
    A4[App A] -->|message| M{{Messaging system}} -->|message| B4[App B]
  end
```

## Checks

- Each integration point names the integration style used and why it was chosen over the others.
- Where File Transfer is used, the file name, location and format are agreed and documented.
- Where Remote Procedure Invocation is used, the document acknowledges that callers are blocked during the call.
- Where Messaging is used, the event-driven programming model and the added overhead are accepted explicitly.

## Related

- [File Transfer](https://arc.fuet.ch/concepts/integration/file-transfer.md)
- [Shared Database](https://arc.fuet.ch/concepts/integration/shared-database.md)
- [Remote Procedure Call](https://arc.fuet.ch/concepts/integration/remote-procedure-call.md)
- [Messaging](https://arc.fuet.ch/concepts/integration/messaging.md)
- [Integration](https://arc.fuet.ch/concepts/integration/integration.md)
- [Synchronous vs. Asynchronous Communication](https://arc.fuet.ch/concepts/integration/synchronous-vs-asynchronous-communication.md)
- [Enterprise Integration Patterns](https://arc.fuet.ch/concepts/integration/messaging-pattern-language.md)
- [Integration Pattern vs. Middleware Technology](https://arc.fuet.ch/concepts/integration/integration-patterns-vs-middleware-technology.md)

## Sources

- [Introduction to Integration Styles - Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/patterns/messaging/IntegrationStylesIntro.html) — enterpriseintegrationpatterns.com, accessed 2026-11-09
- [Introduction - Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/patterns/messaging/Introduction.html) — enterpriseintegrationpatterns.com, accessed 2026-11-09
