<?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[Stories by Noa Leibovich on Medium]]></title>
        <description><![CDATA[Stories by Noa Leibovich on Medium]]></description>
        <link>https://medium.com/@noaleibo1?source=rss-3e72f0bdda47------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*McA3zTF5TIsv69UKDju6ow.png</url>
            <title>Stories by Noa Leibovich on Medium</title>
            <link>https://medium.com/@noaleibo1?source=rss-3e72f0bdda47------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:30:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@noaleibo1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Signs That You Need to Unify Your Microservices]]></title>
            <link>https://medium.com/better-programming/signs-that-you-need-to-unify-your-micro-services-a-case-study-da38f20d5c08?source=rss-3e72f0bdda47------2</link>
            <guid isPermaLink="false">https://medium.com/p/da38f20d5c08</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Noa Leibovich]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 09:06:29 GMT</pubDate>
            <atom:updated>2020-06-11T13:25:31.813Z</atom:updated>
            <content:encoded><![CDATA[<h4>A case study</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xZ4EjbpLFr40E7lh" /><figcaption>Photo by <a href="https://unsplash.com/@wylly_suhendra?utm_source=medium&amp;utm_medium=referral">Wylly Suhendra</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>.</figcaption></figure><p>This article discusses a specific case study I encountered while working for Here Mobility. It describes why we initially separated two of our services and why we decided to unify them. I believe it demonstrates when you should consider unifying two microservices, and I hope it will help others make good designs for future products.</p><p>This is the first in a series of articles. In the next one, I will share our plan for how we actually unified the services while continuing to serve customers.</p><h3>Background</h3><p>The product we worked on is called Mobility Dispatch. Mobility Dispatch helps taxi companies manage drivers, rides, and passengers easily. It enables the matching of riders and drivers through an intuitive admin panel, including real-time visibility and tracking of the fleet and ride statuses. The product includes a web application and a mobile application. For the purpose of this article, I’ll focus on the specific feature of ride creation. The user can create two types of rides: immediate rides (sent to drivers to start right away) and pre-booked rides (due in the future — we will refer to them as <em>prebooks</em><strong> </strong>from now on).</p><p>We decided to create separate services to manage rides and prebooks — a Rides service and a Calendar service, respectively. We made this decision due to the following product features and infrastructure circumstances:</p><ol><li>Active rides on a live map showed the current location of all vehicles to help the shift manager know where their fleet was at all times. This meant that there would be a lot of calls from the clients — the mobile applications reporting current locations and the web application polling updated locations. Hence, it made sense to have a dedicated service to handle the load.</li><li>Prebooks were presented on a prebooks-only table so the shift manager could see all future rides concentrated in one place. This tightened the sense that prebooks and rides were actually different logical entities.</li><li>A newly created prebook that contradicted an existing prebook sent a notification to the web user. Thus, we needed a constraints manager for prebooks. Rides did not need such a thing. This was another reinforcement of the concept that rides and prebooks were different logical entities.</li><li>The prebook concept was introduced after we were already supporting immediate rides and already had a live Rides service. The Rides service was an outmoded service working with a tailored state machine for immediate rides. We figured that having a clean service to support the new functionality would require less development time.</li></ol><h3>The Problem</h3><p>The separated services architecture served us for about a year. Throughout that year, we encountered several difficulties that made us question the design:</p><ol><li>Changes to the API required changes to both services’ codebase. If we added a call like getAllRidesByAWhiteVehicle,<em> </em>we needed to implement it in both services, which made adding new code cumbersome and time-consuming. This actually indicated that rides and prebooks were not alienated entities as we originally thought.</li><li>Back-and-forth network calls between both services. Although it seemed like there was a clear separation between the Rides service and Calendar service at the beginning, we encountered many situations where the services needed to communicate. The easiest example would be the auditing history of a ride.</li><li>Services have a similar codebase. The data models of a ride and a prebook were similar — both had similar ride constraints, such as the number of passengers, wheelchair options, etc. Also, both services worked with a state machine and a scheduler that could be implemented similarly.</li><li>The last straw: a new business logic. Our product handed requirements for editing an active ride so it became a prebook, and vice versa. This broke the assumption that rides and prebooks were alienated entities, and having them managed in separate services and saved in different databases did not make sense anymore.</li></ol><p>The first three problems above made us eager for a chance to unify the two services. Adding the new business logic was the opportunity we needed to refine our design because we could leverage the addition of new features to an infrastructure change.</p><p>I think this study case pinpoints some of the delicate nuances in microservice architecture. When adding new functionality, we should question whether our architecture still justifies itself. In this case, at the beginning, it seemed as though a ride and a prebook had the right to live as separate entities and therefore have separate services and databases. As more requirements and features arrived, it became clear that the separation of services caused cumbersomeness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da38f20d5c08" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/signs-that-you-need-to-unify-your-micro-services-a-case-study-da38f20d5c08">Signs That You Need to Unify Your Microservices</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>