Journal of Distributed Software Engineering, Architecture and Design
System Integration 101: Patterns and Best-Practices
<div class="cs-rating pd-rating" id="pd_rating_holder_1819065_post_38"></div>
<h4 class="wp-block-heading"><strong>The Importance of Integration Patterns</strong></h4>
<p class="wp-block-paragraph">In the intricate world of software development, the ability to efficiently connect and integrate different systems is vital. Integration patterns provide a roadmap for this process, offering standardized solutions to common integration challenges. This post delves into the essence of integration patterns, shedding light on their importance and how they facilitate seamless interactions between disparate systems in an ever-more connected digital landscape.</p>
<h4 class="wp-block-heading"><strong>Decoding the Essentials of Integration Patterns</strong></h4>
<p class="wp-block-paragraph">Integration patterns are architectural solutions that address specific problems in system integration. These patterns offer standardized methods to manage data exchange, consistency, and process orchestration across varied systems.</p>
<p class="wp-block-paragraph"><strong>1. Message Broker Pattern:</strong> Centralizes message processing, allowing different systems to communicate through a reliable intermediary. This pattern is key in scenarios where direct system-to-system communication is impractical or creates tight coupling.</p>
<p class="wp-block-paragraph"><strong>2. Publish-Subscribe Pattern:</strong> A publisher sends messages to a channel without knowing who the subscribers will be. Subscribers listen for messages of interest without knowing who the publisher is. This pattern is crucial for building scalable, event-driven architectures.</p>
<p class="wp-block-paragraph"><strong>3. Request-Reply Pattern:</strong> Ensures synchronous communication where a requester sends a message and waits for a reply. This pattern is common in service-oriented architectures where a response from a service is essential for the continuation of a process.</p>
<h4 class="wp-block-heading"><strong>Implementing Integration Patterns: Real-World Scenarios</strong></h4>
<p class="wp-block-paragraph">The practical application of integration patterns is vast and diverse, addressing various integration needs across industries.</p>
<p class="wp-block-paragraph"><strong>1. Message Broker in E-Commerce:</strong> An e-commerce platform uses a message broker to integrate its order management system with inventory and shipping services, ensuring smooth order processing and fulfillment.</p>
<p class="wp-block-paragraph"><strong>2. Publish-Subscribe in IoT:</strong> In an IoT ecosystem, sensors publish data to a central system. Various services subscribe to this data for monitoring, analytics, or triggering other processes, thereby enabling a responsive and intelligent IoT network.</p>
<p class="wp-block-paragraph"><strong>3. Request-Reply in Financial Services:</strong> A banking application uses the request-reply pattern to communicate with credit check services, where immediate responses are crucial for loan approval processes.</p>
<h4 class="wp-block-heading"><strong>Conclusion: The Pivotal Role of Integration Patterns in System Design</strong></h4>
<p class="wp-block-paragraph">Integration patterns, standing at the crossroads of system design and functionality, are more than just solutions—they are the cornerstone of modern system integration. Much like design patterns that address common challenges in software development, integration patterns are specialized design patterns tailored for the intricate realm of system integration. They are instrumental in enabling disparate systems to communicate effectively, ensuring data flows seamlessly across different platforms and applications.</p>
<p class="wp-block-paragraph">These patterns are fundamental not only because they solve recurring problems but also because they encapsulate best practices refined over years of technological evolution. They represent distilled wisdom for connecting and orchestrating complex systems, making them an indispensable part of any system architect’s toolkit.</p>
<p class="wp-block-paragraph">As we continue to forge ahead in an era marked by technological convergence, the importance of these patterns only magnifies. They are not just tools for integration but also catalysts for creating cohesive, efficient, and scalable systems. For developers and system architects, delving into integration patterns is not just an exploration of technical strategies; it’s an essential step towards mastering the art of building interconnected systems that are robust, flexible, and future-proof.</p>
<h2 class="wp-block-heading">List of Patterns</h2>
<figure class="wp-block-table"><table><thead><tr><th>ID</th><th>Name</th><th>Flow</th><th>When to use</th></tr></thead><tbody><tr><th colspan="4">Synchronous reads</th></tr><tr><td>1.1</td><td>Consistent Read (master)<br></td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/pattern-1-read-sync-no-cache.png?version=1&modificationDate=1694192510361&cacheVersion=1&api=v2&width=750&height=323"></td><td>Client wants to read the latest dataRequest volume is low (throughput)Request latency can be high (slow response is tolerated) Request size is small (fine-grained items)</td></tr><tr><td>1.2</td><td>Available Read<br>(operational data store)</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/pattern-1-read-sync-cached.png?version=1&modificationDate=1694192510299&cacheVersion=1&api=v2&width=750&height=295"></td><td>Client is okay to read slightly old data or the data is fairly static within the refresh periodRequest volume is high (throughput)Request latency must be low (slow response is not tolerated) Request size is small (fine-grained items)</td></tr><tr><td>1.3</td><td>Bulk-Read<br></td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/sync-call-cached-paginaged-read-for-bulk.png?version=1&modificationDate=1694192510244&cacheVersion=1&api=v2&width=750&height=553"></td><td>Client is okay to read slightly old data or the data is fairly static within the refresh periodRequest volume is high (throughput)Request latency must be low (slow response is not tolerated) Request size is small (fine-grained items) but client wants to get all or a large subset of the data using their query</td></tr><tr><th colspan="4">2. Asynchronous reads</th></tr><tr><td>2.1</td><td>Bulk Read – Consumer Adapter Request<br>Consumer Adapter Polling</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/time-based-polling-driven-download.png?version=1&modificationDate=1694192510188&cacheVersion=1&api=v2&width=750&height=303"></td><td>Scheduled bulk download is needed Consumer adapter cannot receive events and is okay to poll for new fileRequest size is Large and paginated reads are time-consuming or slow</td></tr><tr><td>2.2</td><td>Bulk Read – Consumer Adapter Request<br>Provider Events</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/periodic-csv-push.png?version=1&modificationDate=1694192510128&cacheVersion=1&api=v2&width=750&height=250"></td><td>Scheduled bulk download is needed Consumer adapter can receive events (internal app or webhook)Request size is Large and paginated reads are time-consuming or slow</td></tr><tr><td>2.3</td><td>Bulk Read – Consumer System Request<br>Consumer Adapter Polling </td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/client-requested-bulk-download.png?version=1&modificationDate=1694192510075&cacheVersion=1&api=v2&width=750&height=244"></td><td>On-demand client system user-driven request to get bulk downloadConsumer adapter can receive events (internal app or webhook)Request size is Large and paginated reads are time-consuming or slowThere is a staging area (file or database) is available to push to (e.g SFTP or Salesforce bulk publish)</td></tr><tr><td>2.4</td><td>Bulk Read – Consumer System Request<br>Provider Events</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/client-request-poll-and-download.png?version=1&modificationDate=1694192510022&cacheVersion=1&api=v2&width=750&height=311"></td><td>On-demand client system user-driven request to get bulk downloadConsumer adapter cannot receive events (external app with no webhook)Request size is Large and paginated reads are time-consuming or slowThere is a staging area (file or database) is available to push to (e.g SFTP or Salesforce bulk publish)</td></tr><tr><th colspan="4">3. Synchronous writes</th></tr><tr><td>3.1</td><td>Consistent Writes to master </td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/backend-write-summary.png?version=1&modificationDate=1694192509967&cacheVersion=1&api=v2&width=750&height=342"></td><td>Master system allows changing data directlyYou need to write one entity or a parent-child entity in a single transaction to the backendYou need to receive errors in create / update and can handle them You need an acknowledgement with ID from the backend to store and map</td></tr><tr><td>3.2</td><td>Consistent Write Requests to master (202)</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/async-202-write.png?version=1&modificationDate=1694192509911&cacheVersion=1&api=v2&width=750&height=402"></td><td>Master system does not allow changing data directly – must be via a change request & workflow in backendYou need to receive errors in create / update and can handle them You need an acknowledgement with ID from the backend to store and map</td></tr><tr><th colspan="4">4. Asynchronous writes</th></tr><tr><td>4.1</td><td>Buffered Writes</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/buffered-write.png?version=1&modificationDate=1694192509855&cacheVersion=1&api=v2&width=750&height=420"></td><td>Large volume of inbound write requests (e.g. Bulk uploads)Requests are one-way, i.e. client does not require a ID of the written or updated dataWrite contain Updates (data change) or Commands (jobs)Master system cannot handle high-volume of write requests or needs to be protected from internal or external clients</td></tr><tr><td>4.2</td><td>Shopping-cart </td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/shopping-cart-pattern.png?version=1&modificationDate=1694192509797&cacheVersion=1&api=v2&width=597&height=400"></td><td>Writes to master can be processed in batch or async mode through existing processShopping-cart or Draft request must be captured near the consumer system and only when the full request is available we can publish to master Rules at master to publish a full-record not partial items</td></tr><tr><td>4.3</td><td>Dual-copy Sync</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/delayed-write-tomaster.png?version=1&modificationDate=1694192509733&cacheVersion=1&api=v2&width=750&height=327"></td><td>A shallow copy of the data needs to be captured in a highly available system initially This copy is okay to be later synchronised in small sets or bulk to the backend via batch synchronization processes </td></tr><tr><th colspan="4">5. Events</th></tr><tr><td>5.1</td><td>External Inbound</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/external-webhook.png?version=1&modificationDate=1694192509610&cacheVersion=1&api=v2&width=666&height=400"></td><td>External system publishes an event which needs to be published to internal topic for consumers</td></tr><tr><td>5.2</td><td>External Outbound</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/external-notification.png?version=1&modificationDate=1694192509562&cacheVersion=1&api=v2&width=762&height=400"></td><td>External system subscribes to internal events </td></tr><tr><td>5.3</td><td>Internal Inbound</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/internal-notification.png?version=1&modificationDate=1694192509512&cacheVersion=1&api=v2&width=803&height=400"></td><td>Internal systems publishes an event which is broadcast on a topic</td></tr></tbody></table></figure>
<h2 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-Reads">Reads</h2>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-2.1.Real-timeConsistentRead">2.1. Real-time Consistent Read</h3>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Reads via synchronous endpoints that provide real-time consistent data from the master of the data</td></tr><tr><td>When to use?</td><td>When the client wants the latest copy of the data (wants “C” in “C.A.P”) and can handle issues with API with partition ( i.e. gives up availability in C.A.P)</td></tr><tr><td>Flow</td><td><img height="250" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/pattern-1-read-sync-no-cache.png?version=1&modificationDate=1694192510361&cacheVersion=1&api=v2&width=579&height=250"><strong>PlantUML</strong> Expand source</td></tr><tr><td>Who can consume this?</td><td></td></tr><tr><td>What does it not provide?</td><td></td></tr><tr><td>API endpoints</td><td></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl GET \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>--header </code><code>"cache-control: no-cache"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response</strong><code>- Response Headers:</code><br> <br><code>x-read-from-cache: </code><code>false</code><br><code>last-updated-cache-dttm: </code><code>null</code><br><code>time-since-last-update: </code><code>0</code></td></tr></tbody></table></figure>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-2.2.Real-timeCachedRead">2.2. Real-time Cached Read</h3>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Reads via synchronous endpoints that provide cached data from master of the data</td></tr><tr><td>Flow</td><td><img height="250" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/pattern-1-read-sync-cached.png?version=1&modificationDate=1694192510299&cacheVersion=1&api=v2&width=634&height=250"> <strong>PlantUM</strong> Expand source</td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl GET \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code><strong></strong></td></tr></tbody></table></figure>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-2.3.Real-timeCachedBulk-Read">2.3. Real-time Cached Bulk-Read</h3>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Reads via synchronous endpoints that provide cached data from master of the data</td></tr><tr><td>Flow</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/sync-call-cached-paginaged-read-for-bulk.png?version=1&modificationDate=1694192510244&cacheVersion=1&api=v2&width=541&height=400"> <strong>PlantUM</strong> Expand source</td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl GET \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code><strong></strong></td></tr></tbody></table></figure>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-2.4.AsynchronousBulkRead">2.4. Asynchronous Bulk Read</h3>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Reads via asynchronous mechanism </td></tr><tr><td>Flow</td><td><br>Sub-patternsUseCases<br>1Asynchronous Bulk Read – Consumer Adapter Request, Consumer Adapter PollingPeriodic bulk file download using polling to locate file and send<img height="250" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/time-based-polling-driven-download.png?version=1&modificationDate=1694192510188&cacheVersion=1&api=v2&width=617&height=250">2Asynchronous Bulk Read – Consumer Adapter Request, Provider EventsPeriodic bulk file download using events for notification<img height="250" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/periodic-csv-push.png?version=1&modificationDate=1694192510128&cacheVersion=1&api=v2&width=749&height=250"><br><br><br><br>3Asynchronous Bulk Read – Consumer System Request, Consumer Adapter PollingClient requested bulk download using events for notification.Client request is async and API consumer can publish to Client shared location<img height="250" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/client-requested-bulk-download.png?version=1&modificationDate=1694192510075&cacheVersion=1&api=v2&width=765&height=250">4Asynchronous Bulk Read – Consumer System Request, Provider EventsClient requested bulk download using polling.Client request is async and API consumer can publish to Client shared location<img height="250" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/client-request-poll-and-download.png?version=1&modificationDate=1694192510022&cacheVersion=1&api=v2&width=601&height=250"><br> Expand source</td></tr><tr><td>What is this good for?</td><td>When looking to get data via event-driven or bulk mechanisms </td></tr><tr><td>Who can consume this?</td><td>Clients that can invoke reads and handle asynchronous events related to a read </td></tr><tr><td>What does it not provide?</td><td>No bulk or large documents. For a large set the client needs to query the collection endpoint and iterateComplex queries only available in OData enabled endpoints with $expand directive </td></tr><tr><td>API endpoints</td><td>Get collectionSearch collectionGet by ID</td></tr></tbody></table></figure>
<h2 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-Writes"> Writes </h2>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-3.1.Real-timeConsistencySynchronousWritetomaster">3.1. Real-time Consistency Synchronous Write to master </h3>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Writes via synchronous endpoints that accept request, write to master system and acknowledge after database is consistent</td></tr><tr><td>Flow</td><td><strong>Pattern Summary</strong><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/backend-write-summary.png?version=1&modificationDate=1694192509967&cacheVersion=1&api=v2&width=876&height=400"><strong>Handling Parent-Child entities</strong><img width="850" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/data-change-pattern.png?version=1&modificationDate=1694192509669&cacheVersion=1&api=v2&width=850&height=781"><strong>PlantUM</strong> Expand source</td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code></td></tr></tbody></table></figure>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-3.2.Real-timeConsistencyAsynchronousWritetoMaster">3.2. Real-time Consistency Asynchronous Write to Master</h3>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Writes via asynchronous endpoints that accept request, acknowledge before backend database is consistent and eventually process</td></tr><tr><td>Flow</td><td><img width="850" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/async-202-write.png?version=1&modificationDate=1694192509911&cacheVersion=1&api=v2&width=850&height=456"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl GET \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code></td></tr></tbody></table></figure>
<h3 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-3.3.DelayedConsistencyAsynchronousWritetoMaster">3.3. Delayed Consistency Asynchronous Write to Master</h3>
<h4 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-3.3.1.Bufferedwrite">3.3.1. Buffered write</h4>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Buffered writes to enable high-volume to commands with delayed writes to master – queue or streams as write logs </td></tr><tr><td>Flow</td><td><img width="850" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/buffered-write.png?version=1&modificationDate=1694192509855&cacheVersion=1&api=v2&width=850&height=476"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code></td></tr></tbody></table></figure>
<h4 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-3.3.2.Shopping-cart/Draftcopy">3.3.2. Shopping-cart / Draft copy</h4>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Writes to a local database which returns temporary ID and submits to backend when client is done with changes</td></tr><tr><td>Flow</td><td><img width="750" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/shopping-cart-pattern.png?version=1&modificationDate=1694192509797&cacheVersion=1&api=v2&width=750&height=502"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code></td></tr></tbody></table></figure>
<h4 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-3.3.3.HighAvailableShallowCopy">3.3.3. High Available Shallow Copy</h4>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Description</td><td>Writes to a local database which returns temporary ID and eventually synchronises with backend </td></tr><tr><td>Flow</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/delayed-write-tomaster.png?version=1&modificationDate=1694192509733&cacheVersion=1&api=v2&width=915&height=400"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//my/api/url</code><strong>Response<br></strong><code>- Response Headers:x-read-from-cache: </code><code>true</code><br><code>last-updated-cache-dttm: mm-dd-yyyyThh:mm:ssU</code><br><code>time-since-last-update: 12h</code></td></tr></tbody></table></figure>
<h2 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-Events">Events </h2>
<h4 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-ExternalPublish">External Publish</h4>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr><tr><td>Description</td><td>When External System events must be captured for internal systems</td></tr><tr><td>Flow</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/external-webhook.png?version=1&modificationDate=1694192509610&cacheVersion=1&api=v2&width=666&height=400"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//internal.webhook</code><strong>Response<br></strong> </td></tr></thead></table></figure>
<h4 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-ExternalSubscribe">External Subscribe</h4>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr><tr><td>Description</td><td>When External System events must be captured for internal systems</td></tr><tr><td>Flow</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/external-notification.png?version=1&modificationDate=1694192509562&cacheVersion=1&api=v2&width=762&height=400"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//internal.webhook</code><strong>Response<br></strong> </td></tr></thead></table></figure>
<h4 class="wp-block-heading" id="CBOIntegrationArchitectureBootcamp-InternalPub/Sub">Internal Pub/Sub</h4>
<figure class="wp-block-table"><table><thead><tr><th></th><th></th></tr><tr><td>Description</td><td>When External System events must be captured for internal systems</td></tr><tr><td>Flow</td><td><img height="400" src="https://dttau-hub.atlassian.net/wiki/download/thumbnails/38044722/internal-notification.png?version=1&modificationDate=1694192509512&cacheVersion=1&api=v2&width=803&height=400"></td></tr><tr><td>Usage</td><td><strong>Request</strong><code>curl POST \</code><br><code> </code><code>--header </code><code>"Content-Type: application/json"</code> <code>\</code><br><code> </code><code>http:</code><code>//internal.webhook</code><strong>Response<br></strong> </td></tr></thead></table></figure>
The Importance of Integration Patterns
In the intricate world of software development, the ability to efficiently connect and integrate different systems is vital. Integration patterns provide a roadmap for this process, offering standardized solutions to common integration challenges. This post delves into the essence of integration patterns, shedding light on their importance and how they facilitate seamless interactions between disparate systems in an ever-more connected digital landscape.
Decoding the Essentials of Integration Patterns
Integration patterns are architectural solutions that address specific problems in system integration. These patterns offer standardized methods to manage data exchange, consistency, and process orchestration across varied systems.
1. Message Broker Pattern: Centralizes message processing, allowing different systems to communicate through a reliable intermediary. This pattern is key in scenarios where direct system-to-system communication is impractical or creates tight coupling.
2. Publish-Subscribe Pattern: A publisher sends messages to a channel without knowing who the subscribers will be. Subscribers listen for messages of interest without knowing who the publisher is. This pattern is crucial for building scalable, event-driven architectures.
3. Request-Reply Pattern: Ensures synchronous communication where a requester sends a message and waits for a reply. This pattern is common in service-oriented architectures where a response from a service is essential for the continuation of a process.
The practical application of integration patterns is vast and diverse, addressing various integration needs across industries.
1. Message Broker in E-Commerce: An e-commerce platform uses a message broker to integrate its order management system with inventory and shipping services, ensuring smooth order processing and fulfillment.
2. Publish-Subscribe in IoT: In an IoT ecosystem, sensors publish data to a central system. Various services subscribe to this data for monitoring, analytics, or triggering other processes, thereby enabling a responsive and intelligent IoT network.
3. Request-Reply in Financial Services: A banking application uses the request-reply pattern to communicate with credit check services, where immediate responses are crucial for loan approval processes.
Conclusion: The Pivotal Role of Integration Patterns in System Design
Integration patterns, standing at the crossroads of system design and functionality, are more than just solutions—they are the cornerstone of modern system integration. Much like design patterns that address common challenges in software development, integration patterns are specialized design patterns tailored for the intricate realm of system integration. They are instrumental in enabling disparate systems to communicate effectively, ensuring data flows seamlessly across different platforms and applications.
These patterns are fundamental not only because they solve recurring problems but also because they encapsulate best practices refined over years of technological evolution. They represent distilled wisdom for connecting and orchestrating complex systems, making them an indispensable part of any system architect’s toolkit.
As we continue to forge ahead in an era marked by technological convergence, the importance of these patterns only magnifies. They are not just tools for integration but also catalysts for creating cohesive, efficient, and scalable systems. For developers and system architects, delving into integration patterns is not just an exploration of technical strategies; it’s an essential step towards mastering the art of building interconnected systems that are robust, flexible, and future-proof.
List of Patterns
ID
Name
Flow
When to use
Synchronous reads
1.1
Consistent Read (master)
Client wants to read the latest dataRequest volume is low (throughput)Request latency can be high (slow response is tolerated) Request size is small (fine-grained items)
1.2
Available Read (operational data store)
Client is okay to read slightly old data or the data is fairly static within the refresh periodRequest volume is high (throughput)Request latency must be low (slow response is not tolerated) Request size is small (fine-grained items)
1.3
Bulk-Read
Client is okay to read slightly old data or the data is fairly static within the refresh periodRequest volume is high (throughput)Request latency must be low (slow response is not tolerated) Request size is small (fine-grained items) but client wants to get all or a large subset of the data using their query
Scheduled bulk download is needed Consumer adapter cannot receive events and is okay to poll for new fileRequest size is Large and paginated reads are time-consuming or slow
Scheduled bulk download is needed Consumer adapter can receive events (internal app or webhook)Request size is Large and paginated reads are time-consuming or slow
2.3
Bulk Read – Consumer System Request Consumer Adapter Polling
On-demand client system user-driven request to get bulk downloadConsumer adapter can receive events (internal app or webhook)Request size is Large and paginated reads are time-consuming or slowThere is a staging area (file or database) is available to push to (e.g SFTP or Salesforce bulk publish)
2.4
Bulk Read – Consumer System Request Provider Events
On-demand client system user-driven request to get bulk downloadConsumer adapter cannot receive events (external app with no webhook)Request size is Large and paginated reads are time-consuming or slowThere is a staging area (file or database) is available to push to (e.g SFTP or Salesforce bulk publish)
3. Synchronous writes
3.1
Consistent Writes to master
Master system allows changing data directlyYou need to write one entity or a parent-child entity in a single transaction to the backendYou need to receive errors in create / update and can handle them You need an acknowledgement with ID from the backend to store and map
3.2
Consistent Write Requests to master (202)
Master system does not allow changing data directly – must be via a change request & workflow in backendYou need to receive errors in create / update and can handle them You need an acknowledgement with ID from the backend to store and map
4. Asynchronous writes
4.1
Buffered Writes
Large volume of inbound write requests (e.g. Bulk uploads)Requests are one-way, i.e. client does not require a ID of the written or updated dataWrite contain Updates (data change) or Commands (jobs)Master system cannot handle high-volume of write requests or needs to be protected from internal or external clients
4.2
Shopping-cart
Writes to master can be processed in batch or async mode through existing processShopping-cart or Draft request must be captured near the consumer system and only when the full request is available we can publish to master Rules at master to publish a full-record not partial items
4.3
Dual-copy Sync
A shallow copy of the data needs to be captured in a highly available system initially This copy is okay to be later synchronised in small sets or bulk to the backend via batch synchronization processes
5. Events
5.1
External Inbound
External system publishes an event which needs to be published to internal topic for consumers
5.2
External Outbound
External system subscribes to internal events
5.3
Internal Inbound
Internal systems publishes an event which is broadcast on a topic
Reads
2.1. Real-time Consistent Read
Description
Reads via synchronous endpoints that provide real-time consistent data from the master of the data
When to use?
When the client wants the latest copy of the data (wants “C” in “C.A.P”) and can handle issues with API with partition ( i.e. gives up availability in C.A.P)
Sub-patternsUseCases 1Asynchronous Bulk Read – Consumer Adapter Request, Consumer Adapter PollingPeriodic bulk file download using polling to locate file and send2Asynchronous Bulk Read – Consumer Adapter Request, Provider EventsPeriodic bulk file download using events for notification
3Asynchronous Bulk Read – Consumer System Request, Consumer Adapter PollingClient requested bulk download using events for notification.Client request is async and API consumer can publish to Client shared location4Asynchronous Bulk Read – Consumer System Request, Provider EventsClient requested bulk download using polling.Client request is async and API consumer can publish to Client shared location Expand source
What is this good for?
When looking to get data via event-driven or bulk mechanisms
Who can consume this?
Clients that can invoke reads and handle asynchronous events related to a read
What does it not provide?
No bulk or large documents. For a large set the client needs to query the collection endpoint and iterateComplex queries only available in OData enabled endpoints with $expand directive
API endpoints
Get collectionSearch collectionGet by ID
Writes
3.1. Real-time Consistency Synchronous Write to master
Description
Writes via synchronous endpoints that accept request, write to master system and acknowledge after database is consistent
Alok brings experience in engineering and architecting distributed software systems from over 20 years across industry and consulting. His posts focus on Systems Integration, API design, Microservices and Event driven systems, Modern Enterprise Architecture and other related topics
View all posts by alokmishra