Design your Interface Structure

Identify the Interface Structure

Contents


Types of Interface Structure [top]

There are two types of interface structure: Simple and Complex.

Simple Interface

Use a single channel to connect one source to one target.

Complex Interface

Use a channel pipeline to connect a single source to multiple targets. This consists of a single “source channel” that reads the from the message source, and then feeds multiple “destination channels” (one for each target).

Identify the Structure to Use [top]

Identifying the type is quite simple, just answer two questions and choose from the structures.

Questions:

  1. How many Sources are you messages coming from?
  2. How many Targets are your messages going to?

Structures:

Sources Targets Interface Type Channel Structure
1 1 Simple Single channel
1 Many Complex Channel pipeline
Many 1 Multiple simple interfaces Multiple single channels (one per source)
Many Many Multiple complex interfaces Multiple channel pipelines (one per source)

Advantages of Simple versus Complex Interface Structure [top]

Simple:

  • Simplicity

Complex:

  • Flexibility
  • Copy a single message source to multiple message targets
    Note: You could also use multiple Simple Interfaces, but this would need a multiple duplicate message sources, one for each interface.
  • Stop transmitting to all target systems by stopping the Pipeline Source channel
    Note: If you were using multiple Simple Interfaces you would need to stop every interface
  • You can continue reading and queueing messages while one or more target interfaces are stopped
    Note: This is not possible with Simple Interfaces, as any stopped interfaces will not be reading messages

The last point is actually a valid reason to consider a Complex Structure for a simple interface.