Mainframe Path Start learning free
Expert11 min readLesson 1 of 3

Integration styles and how to choose

There are five main ways to connect mainframe systems with the rest of the enterprise: synchronous APIs, MQ messaging, event streaming, file transfer and data replication. Each suits a different need, and good architecture picks per use case instead of forcing one style everywhere.

Why integration is an architecture decision

Most large enterprises run their core records on z/OS and their channels, analytics and newer services elsewhere. Every connection between them sets how tightly the systems depend on each other, how failures spread, what it costs and how hard it is to change later. Choosing an integration style is therefore one of the most lasting decisions in a hybrid estate.

The five styles

StyleTypical mainframe technologyInteractionBest for
Synchronous APIz/OS Connect, CICS web services, DB2 REST servicesRequest and immediate replyA user waiting for an answer: balance, quote, authorisation
MessagingIBM MQAsynchronous, assured, once-only with syncpointCommands that must not be lost: payments, orders
Event streamingApache Kafka (or similar) fed from MQ, CDC or applicationsPublish once, many consumers, replayable logNotifying many systems that something happened
File transferManaged file transfer products, FTP/SFTP, Connect:DirectBulk, scheduledLarge volumes: statements, settlement files, partner exchange
Data replicationChange data capture (CDC) from DB2, IMS or VSAM logsContinuous copy of data changesRead-heavy copies for analytics or cloud apps

These are complementary. A single business process often uses several: a mobile app calls an API to make a payment, the payment is sent to the clearing system over MQ, an event announces it to fraud and notification services, and the day's totals go to the data warehouse by replication or file.

Coupling

From tight to loose coupling
Synchronous APIBoth sides up together
MQ messagingTime-decoupled, one consumer
Event streamingProducer unaware of consumers
Replication / filesData-level, no shared calls

Synchronous APIs are simple to understand but make the caller's availability depend on the mainframe's, and vice versa when traffic surges. Messaging separates them in time. Event streaming goes further: the producer does not know who consumes, and new consumers can be added without touching it. Replication separates them almost completely, at the price of data that is slightly behind.

Choosing: questions to ask

  1. Is someone waiting for the answer right now? If yes, a synchronous API is likely, possibly backed by messaging behind it.
  2. Must the request survive outages and be processed exactly once? Use MQ with persistent messages under syncpoint.
  3. Do several systems need to know something happened? Publish an event rather than calling each one.
  4. Is it large volume on a schedule? File transfer is often still the cheapest and simplest.
  5. Does another platform need to query the data heavily? Replicate it, rather than calling the mainframe for every read.

Events and the mainframe

Kafka is not a z/OS-native product in most estates, but mainframe data reaches it in several ways: an MQ-to-Kafka connector, a change data capture tool reading DB2 or IMS logs and publishing changes, or an application that emits events directly. Unlike MQ queues, a Kafka topic keeps events for a retention period so consumers can replay them. That makes it a good backbone for distributing facts, but not a replacement for MQ when a command must be processed exactly once by one system under a shared transaction.

Common problems

Common mistakes

One style for everything

Making every integration a REST API creates fragile chains of synchronous calls. Choose per use case using wait, assurance, fan-out and volume.

Treating Kafka as a drop-in for MQ

Streaming and queuing have different delivery and transaction models. Use MQ where one owner must act exactly once under syncpoint.

Calling the mainframe for every read

High-volume read traffic for data that changes rarely costs processor time and adds latency. Cache or replicate it close to the consumer.

What you will see at work

Key terms

Check your understanding.
Take this lesson's quiz and save your progress. Free.

Take the lesson quiz
Security and performance across tiers →