<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[MicroServices Integration Patterns - Medium]]></title>
        <description><![CDATA[MicroServices Integration SAGA Pattern - Medium]]></description>
        <link>https://medium.com/microservices-integration-patterns?source=rss----7873a424f042---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>MicroServices Integration Patterns - Medium</title>
            <link>https://medium.com/microservices-integration-patterns?source=rss----7873a424f042---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 19:17:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/microservices-integration-patterns" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Microservice Integration Patterns]]></title>
            <link>https://medium.com/microservices-integration-patterns/microservice-integration-patterns-d88917862436?source=rss----7873a424f042---4</link>
            <guid isPermaLink="false">https://medium.com/p/d88917862436</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Dilek Karadaş Mataracı]]></dc:creator>
            <pubDate>Tue, 10 Dec 2019 08:40:29 GMT</pubDate>
            <atom:updated>2019-12-10T08:40:28.977Z</atom:updated>
            <content:encoded><![CDATA[<h3>SAGA PATTERN AND METHODS OF IMPLEMENTATION</h3><p>Since the application of MicroService architectures is expanding day to day, it is becoming much more important to ensure successful integrations between these micro services.</p><p>There are some issues to consider while designing these integration patterns:</p><ol><li>Partial error handling : MicroServices are single responsibility units but business transactions require more than one of these units. If one unit(it is called a local transaction) fails, the system must be designed to do its rollback actions(it is called compensation transaction) accordingly.</li><li>Manage the situations where we need to collect data from multiple services: Micro services only have their entity data; when we need data from multiple entities, we need to have proper integration principles.</li><li>Testing requirements of the system design: Some patterns are more appropriate for testing purposes while some others don’t.</li><li>Also the organization(the company) structure is a key point : Agile/Waterfall working principles of the organization is also a key point for the architectural design.</li></ol><p>MicroService Architecture depends on Database per Service principle. On the top of that principle there is<em> SAGA pattern</em> that can be applied to ensure integrity of distributed transactions because Database per Service principle results in a context that we need to synchronize these databases.</p><p>SAGA Pattern depends on consecutive local transactions. It can be applied in two ways:</p><h3>Choreography based SAGA pattern:</h3><p>In this method, each local transaction publishes an event when its job is done. The other local transaction that receives this event performs the appropriate behavior. The work is finished when all the local transactions are done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/53/0*vjoWi3nwcr4yasAa" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lPAiZ2LyFXns18jv.jpeg" /></figure><p>Choreography based SAGA pattern</p><p>In choreography based SAGA , the process is managed by local transactions itself. This conforms the principle of intelligent endpoints and dummy communication channels.</p><p>The benefits of this method are as follows:<br>1. Easy to implement<br>2. Appropriate if the number of local transactions is small.<br>3. Loosely coupled endpoints.<br>4. Suitable for agile organizations.</p><p>There are some drawbacks of the method:</p><ol><li>It gets very complicated when the number of the local transactions increase.</li><li>Cyclic dependency may occur between services.</li></ol><h3>Orchestration based SAGA pattern:</h3><p>In this method, there is an intelligent endpoint(a separate service that performs orchestration) that coordinates the whole process. It manages which service will perform when. If one of the local transactions fails for some reason, the Orchestrator is also responsible for rollback of the previously performed transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/53/0*rei07XHK2vPMeZPZ" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/0*Ume8lq6aTx_uY1Y7.jpeg" /></figure><p>Orchestration based SAGA Pattern</p><p>The benefit of this method are:</p><ol><li>Easy to implement</li><li>Easy to understand and maintain</li><li>Complexity is not an issue when local transactions’ count dramatically increase</li></ol><p>And the drawbacks are:</p><ol><li>This method creates a situation that the communication channel becomes intelligent and the endpoints become dummy.</li><li>All the business logic is implemented inside the orchestrator. So the orchestrator becomes the monolith.</li></ol><p>Which method to consider is determined by the needs of the system and the organization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d88917862436" width="1" height="1" alt=""><hr><p><a href="https://medium.com/microservices-integration-patterns/microservice-integration-patterns-d88917862436">Microservice Integration Patterns</a> was originally published in <a href="https://medium.com/microservices-integration-patterns">MicroServices Integration Patterns</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>