<?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 Srihari Sankar Sahu on Medium]]></title>
        <description><![CDATA[Stories by Srihari Sankar Sahu on Medium]]></description>
        <link>https://medium.com/@srihari-sahu?source=rss-f3af02d208a2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*g1medHk0L2d3xlhpsMwe7g.jpeg</url>
            <title>Stories by Srihari Sankar Sahu on Medium</title>
            <link>https://medium.com/@srihari-sahu?source=rss-f3af02d208a2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:41:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@srihari-sahu/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[We are using REST BUT…]]></title>
            <link>https://srihari-sahu.medium.com/we-are-using-rest-but-f789f06e4a60?source=rss-f3af02d208a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f789f06e4a60</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-design-patterns]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Srihari Sankar Sahu]]></dc:creator>
            <pubDate>Sun, 23 May 2021 05:03:25 GMT</pubDate>
            <atom:updated>2021-05-24T04:43:03.921Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last many years of interviewing and working with lots of systems engineers, I have seen the software architecture style REST being abused and misunderstood a lot. Let me explain what I mean by “abuse”.</p><blockquote>We are following REST principles by having a separate HTTP endpoint for every action</blockquote><blockquote>Our API Specifications are if you want to:<br>a) place an order, use <a href="https://www.example.com/order/create">https://www.example.com/order/create</a><br>b) update an order, use <a href="https://www.example.com/order/udpdate">https://www.example.com/order/udpdate</a><br>c) delete an order, use <a href="https://www.example.com/order/delete">https://www.example.com/order/delete</a><br>d) get an order in detail, use <a href="https://www.example.com/order/detail">https://www.example.com/order/detail</a></blockquote><blockquote>We do follow REST principles but have to support non AJAX user interfaces and thus have to use only HTTP GET and HTTP POST. So, we have an innovative way of using REST</blockquote><blockquote>Our API usage is very simple like:<br>a) for placing an order, use <a href="https://www.example.com/order?action=create">https://www.example.com/order?action=create</a><br>b) for updating an order, use <a href="https://www.example.com/order?action=update">https://www.example.com/order?action=update</a><br>c) for deleting an order, use <a href="https://www.example.com/order?action=delete">https://www.example.com/order?action=delete</a><br>d) for getting an order detail, use <a href="https://www.example.com/order?action=details">https://www.example.com/order?action=details</a></blockquote><p>We follow REST principles but do not have resources as the endpoint’s termination because most of the operations are actions….<br>e.g. <a href="https://www.example.com/create?item=order">https://www.example.com/create?item=order</a>, <a href="https://www.example.com/create?item=shipment">https://www.example.com/create?item=shipment</a>,<br><a href="https://www.example.com/create?item=address&amp;type=billing">https://www.example.com/create?item=address&amp;type=billing</a></p><p>We follow REST principles but cannot use HTTP GET and/or HTTP DELETE method due to security clearances…<br>e.g. <a href="https://www.example.com/getOrderList,">https://www.example.com/getOrderList,</a> <a href="https://www.example.com/getOrderById">https://www.example.com/getOrderById</a>, <a href="https://www.example.com/getOrderByCustomer">https://www.example.com/getOrderByCustomer</a>,<br><a href="https://www.example.com/deleteOrderById">https://www.example.com/deleteOrderById</a>, <a href="https://www.example.com/deleteOrderByCustomerId">https://www.example.com/deleteOrderByCustomerId</a></p><p>As an architectural principle, when REST was introduced by Roy Fielding to the world in 2000; I believe he would not have thought about his paper and the principles being adopted so much around the world and abused after 20 years of the original paper’s publication. As a principle using HTTP 1.1 and it’s provisions for making the API easy to use and more conventional — which should have resulted in having uniformity of information access; we are still living in the world of RMI/SOAP wherein every API specification has a very different meaning for the user and the publisher.</p><p>I do not really get the purpose of having a design principle of <strong>convention over configuration </strong>where every one is simply interested in custom configuration over convention. With the world moving from HTTP/2 to HTTP/3; I believe the minimum expectation from the engineering community of being able to understand Architectural styles using HTTP/1.1 becomes basic knowledge.</p><p>If you want to use REST, there should really be 1 end point per resource, eg. order in all our previous examples and it should be such:<br>a) If you want to place an order, use <a href="https://www.example.com/orders">https://www.example.com/orders</a> with HTTP POST<br>b) If you want to update an order, use <a href="https://www.example.com/orders">https://www.example.com/orders</a> with HTTP PUT<br>c) If you want to delete an order, use <a href="https://www.example.com/orders">https://www.example.com/orders</a> with HTTP DELETE<br>d) If you want to retrieve all orders, use <a href="https://www.example.com/orders">https://www.example.com/orders</a> with HTTP GET<br>e) If you want to act on any particular order, use <a href="https://www.example.com/order/%7Border_id%7D">https://www.example.com/order/{order_id}</a> and the HTTP verb would let the server know of the action required.</p><p>If you are here to learn how to design better REST APIs, I would request you to first look at your business objects and identify resources in the system. The next step would be to head over to <a href="https://martinfowler.com/articles/richardsonMaturityModel.html">https://martinfowler.com/articles/richardsonMaturityModel.html</a> and understand what the purpose behind REST is. If you are a books person, please checkout <a href="https://www.oreilly.com/library/view/rest-in-practice/9781449383312/">https://www.oreilly.com/library/view/rest-in-practice/9781449383312/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f789f06e4a60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving a Monolith to Micro Service]]></title>
            <link>https://srihari-sahu.medium.com/moving-a-monolith-to-micro-service-a05982d848f6?source=rss-f3af02d208a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a05982d848f6</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[monolithic-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Srihari Sankar Sahu]]></dc:creator>
            <pubDate>Fri, 14 May 2021 12:57:14 GMT</pubDate>
            <atom:updated>2021-05-14T12:57:14.923Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Beginning</h3><p>Creating a web based application has it’s own challenges but the ones that need to be scaled up to almost infinite audience needs to be designed from ground up to be scaleable — or so I thought till I was left with the <a href="https://en.wikipedia.org/wiki/Baton_(conducting)">Baton</a> for a product created 20 years ago which needed to be modernised fast with the minimum cost and minimum go to market time.</p><p>So there I was trying to understand, how to renew an ageing product and trying to see how it has been adapting to the evolving world around it. Numerous discussions with various stake holders including Customers, Project Managers, Architects and Developers all led to the same conclusion — the product has not required to be scaled on a global level as we never had more than 120 licensed corporate customers. It’s not a B2C product and thus scaling costs were born by the organisations where the product was deployed and managed. Product maintenance costs were still additional revenue stream for our organisation.</p><p>The change that the organisation wanted was to move away from the current business model into a SaaS based business model with revenue stream recognition via monthly subscription costs in the B2B space — the only targeted consumer space where our product made sense and some money.</p><h3>The Preparation</h3><p>Going over the critical paths in the workflows and the in-demand or most used features of the product; the team was able to identify the core parts of the system which were essential to be moved out of the ageing product in order to at least have the core systems functional in the rewritten product. We had a prototype of separated standalone code that could work as a disparate system component within 3 months of the kick-off. Now we needed to figure out how to move a behemoth into more manageable chunks and create a distributed system.</p><p>The major challenge here was to change the mindset. We were still thinking about just breaking things apart into smaller chunks — but not about making the chunks integrate together and work as a distributed system. Disparate, Smaller chunks of sub-systems but integrated together to work as a single distributed system. That’s something I would like to change the next time I am doing this again.</p><p>So, the plan was to have a singular database system and a single DAO layer which would be able to easily scale up on-demand. Interfaced with this single DAO layer would be the various middle-ware sub-systems that interact with each other via message passing over HTTP. We also wanted to rewrite the Integrated UI layer as a SPA which would be easily convertible to mobile applications — if needed.</p><h3>The Design</h3><p>We split the sub-systems based on functionality and converted the monolith’s modules into individual micro-services. This was a mistake and I would request people doing this today; to think really hard whether you want to really just convert the modules into micro-services.</p><p>This are the micro-services that we planned first:</p><ol><li>Authentication &amp; Authorisation</li><li>Order type 1 processor</li><li>Order type 2 processor</li><li>Order type 3 processor</li><li>Configurable Content system</li><li>User Preferences system</li><li>Batch processor system</li><li>Administrator system</li></ol><p>We ended up with the following:</p><ol><li>Authentication &amp; Authorisation service</li><li>User Preferences, Customer Preferences and Feature enabling service</li><li>Data Validation and Ingestion service</li><li>Order Orchestrator service</li><li>Workflow service</li><li>Batch Processor service</li><li>Data processor service</li><li>Business data analytics service</li><li>Business data Audit Service</li><li>Microservice monitoring service</li><li>Log data analysis + system data analysis service</li><li>Configuration management service</li><li>API Gateway service</li><li>Developer Portal service</li><li>Metering and billing service</li></ol><h3>The Learnings</h3><p>What we had not planned for was scaling a distributed system is really a different ball game compared to scaling a monolith. We had to learn the hard way that performance testing, BDD and TDD are all required to save time, money and effort. Also, when modernising a similar application, please consider the additional effort that would be required to manage containers and multiple clusters of micro services. The IT Operations team needs to be skilled to manage the individual service clusters. Also, the monitoring and management of distributed system is more complex compared to a single cluster of monolithic applications.</p><p>Hope to have helped you design better Micro Service based distributed systems when you start with an ageing monolith. I would really like to hear your experience and improve this article to be helpful for others — hence please comment. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a05982d848f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>