Which integration method should you use for a given scenario?
The integration decision tree is a tool which can be used to decide which integration patterns and technologies should be used to implement an integration. The decision tree references approved integration design patterns, template projects and standards which should be used to implement the integration.
The following decision tree should be used to determine how an integration should be implemented:
Integrations can be generally classified as either a Application integration, or a Data Integration.
Application Integrations deal with integrating live operational data in real-time between two or more applications. Examples of such integrations may be calling an API to retrieve some information from a 3rd party service, or publishing an event when an application changes state.
Data Integrations are typically batch-orientated and deal with data at rest. In other words, the process that created the data has already completed. Examples of this type of integration might be sending invoice or payment data to a finance system on a nightly schedule.
Integration style refers to the how two systems communicate with each other. For example does the calling system get an immediate response? Does the back-end system send notifications? Is information exchanged to a schedule, and if so how much data and how often?
Gregor Hopper, in his widely publicized 2003 book Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions, described 4 distinct integration options/styles: File Transfer, Shared Database, Remote Procedure Call (API), and Messaging. Whilst this book is now somewhat old and both technology and best practices have evolved since, these four methods of integration fundamentally still apply. For the purpose of integration at DWER the use of Shared Databases has been excluded as this is an integration anti-pattern promoting tight coupling between systems that should be avoided. File Transfer has been more generalized as ETL.
API
Direct Application Programming Interface (API) based integration is the most direct form of enabling two system to talk to each other. API integration is the extension of traditional Remote Procedure Call (RPC) based integration and applies the principle of encapsulation to integrating applications. If an application needs some information that is owned by another application, it asks that application directly. If one application needs to modify the data of another, then it does so by making a call to the other application. Each application can maintain the integrity of the data it owns. Furthermore, each application can alter its internal data without having every other application be affected.
API’s can be used to exchange data between systems, or to expose shared Business Processes or Functions. API’s can be classified into the following:
Private API’s - API’s developed internally by an organization for internal or external use.
Partner API’s - API’s developed by an organizations and focused on an organization’s set of development partners. By limiting an API to partners, companies can tightly control who uses an API and how it is used outside of their organization
SaaS API’s - API’s provided by companies like GitHub, Stripe, SendGrid etc. allowing an organization to access their hosted data or access a paid service
Platform API’s - API’s that extend the reach of SaaS providers by bringing together multiple parties within a marketplace such as supply chain management, customer relationship management (CRM), and enterprise resource planning (ERP).
customer-created
Event might inform any consumers that a customer was created and provide the newly created customers id. Conversely, a create-customer
Message might instruct a specific consumer to create a customer record and provide all customer information to perform the action on the remote system.The following integration technologies reflect approved integration technologies at DWER. Additional Technologies may be introduced as integration requirements evolve.
Managed API’s refers to an API’s exposed via an API Management tool, where API Management refers to the processes for distributing, controlling, and analyzing the APIs that connect applications and data across the enterprise. At DWER this is implemented using Azure API Management.
API Management
API Management (APIM) is the process of designing, publishing, documenting and analyzing APIs in a secure environment. API Management layers accelerate the deployment, monitoring, security, versioning, and sharing of APIs. They are often deployed as a reverse proxy, intercepting all incoming API request traffic and applying policies to determine if requests are authorized to be routed to the API. See Azure API Management for more information.
API’s may be generalised as either Proxy API’s or Microservices. Backend for Frontend API’s are not considered as part of the integrations landscape, however they may use Proxy and/or Microservice API’s hosted via API Management.
Proxy API
Proxy API’s are API’s that route directly to a 3rd Party service. The API’s are exposed via API Management, and appropriate security, throttling and rate limiting controls put in place to manage access tot he back-end service. This pattern is commonly used where front-end applications are fully aware of the back-end service, however access to that back-end service needs to be managed to ensure security, resiliency and costs are controlled.
An example of a Proxy API is DWER’s ArcGIS Api which manages public access to DWER’s internally hosted ArcGIS platform. Consuming applications know they are talking to ArcGIS and no abstraction of the interface and/or datamodel is made by the API Management layer.
Microservice API
Microservices are self-contained, independently deployable units of code that focus on doing one thing well. Microservices may be used to develop bespoke business capabilities, or to abstract consuming applications from the back-end data models, communications technology, or security considerations of a managed 3rd party service.
Microservices generally exhibit the following traits:
See the following resources for more information:
The decision tree is used to guide the choice of technology and patterns that should be used for an integration. The following describes how to use the tree:
If the integration is initiated by a user interaction, use Application Integration
Integration Type, else
If the integration is initiated by a scheduled or triggered process, use Data Integration
Integration Type
If the user/ system interaction requires an immediate response before continuing, use Real-Time Synchronous
Integration Style, else
If the user/ system interaction does not require an immediate response, but does require a response before processing can continue, or a callback feature is not readily available, use Real-Time Asynchronous
Integration Style, else
If the user/ system interaction does not require an immediate response for processing to continue, but does require an eventual response, and a callback feature is available or can be implemented, use Real-Time Asynchronous with Callback
Integration Style
If the user/ system interaction does not require an immediate response, and the integration is to be initiated by a triggered process on a per transaction basis, us Batch (unitary)
Integration Style
If the user/ system interaction requires an immediate response before continuing, use Real-Time Synchronous
Integration Style, else
If the user/ system interaction does not require an immediate response, but does require a response before processing can continue, use Real-Time Asynchronous
Integration Style, else
If the user/ system interaction does not require an immediate response, and the integration is to be initiated by a triggered process on a per transaction basis, us Batch (unitary)
Integration Style
If the user/ system interaction does not require an immediate response, and the integration is to be initiated by a scheduled process on a multi-transactional basis, us Batch (bulk)
Integration Style
API
Integration ApproachIf an acknowledgement of receipt of a request is required in order to provide context (id or uri) for polling purposes, use API
Integration Approach (most common), else
If no acknowledgement of receipt is required, or a polling for completion can be performed without specific context, use Messaging
Integration Approach
If an API is available which either accepts a callback uri in the payload, or can be configuring, use API
Integration Approach (normal case), else
If no API is available, use Messaging
Integration Approach. In this scenario Messaging is used to decouple the front-end host from back-end processing. Message handlers are used to implement synchronous request to the back-end, and to provide surrogate mechanism for invoking the callback
Events or Messaging
Integration ApproachETL
Integration ApproachIf access to a back-end service needs to be managed (e.g. to control costs, access etc.), or an internal service needs to be publicly accessible, and there is no need to abstract a back-end services REST API, nor a reason for any custom development, use API Management (Proxy API)
Integration Technology
If the API is to be developed by the organization (bespoke API), or a back-end service is to be abstracted to an enterprise service (e.g. an Address Validation API which abstracts the choice of Experian as the Address Validation service), and the API is to be reusable across the organization, use API Management (Microservice API)
Integration Technology
If the API is specific to a single system or business process, and either plugins, connectors or packages from reputable sources are available, or the back-end API can be called easily from the front-end, use Point-to-Point
Integration Technology
use iPaaS
Integration Technology
Service Bus
Integration TechnologyIf the integration is specific to a single system or business process, and either plugins, connectors or packages from reputable sources are available, or can be easily developed in the front-end, use Point-to-Point
Integration Technology
use iPaaS
Integration Technology
use ETL Tool
Integration Technology