Posts

Image
Designing the Microservices over Space-Based Architecture - Immediate Solution for Database Bottleneck Issues in Monolith Migration Projects Being an early adopter and promoter of Microservices, like many other technological enthusiasts who jumped on this bandwagon, I also finally ended up in database bottleneck issues within no time. The primary reason was that most of the projects were monolith migrations, and it became necessary to maintain the single database in its original state for the initial release. And the end result — even though web servers displayed a massive performance boost, bottleneck eventually relocated to the database layer. The migration did work wonders for the read-only microservices connected to the respective read-only database replications. Naturally the microservices should be designed with their own databases by carefully designing the bounded context. But in reality, architects were compelled to redesign monolith application into microservices within a lim

Building Simple Web API Service Adapters in .NET

Image
No doubt that the introduction of REST API revolutionized the technology landscape in a short span of time. It triggered the metamorphosis in the information exchange systems, especially the transition from Web Services to Web APIs in the software development. In the .NET world, WCF still got its place considering the support for multiple transport protocols, encodings, transactions, message security and exchange patterns. But Web API is an open source light-weight HTTP only framework which supports wide variety of media types with a broad range of clients including browsers, mobiles, tablets, IoT devices etc. But for those early migrators of Web APIs, a major hindrance was the extra hardship on parsing and reading the xml or json response manually. No need to ask the component creators how much they might have missed the Web API equivalent of WSDL proxy creation in .NET projects. Life was so easier with that ‘Add Web Reference’ proxy creation tool within the Visual Studio IDE or the c

SQL Hierarchical Queries without Recursion and Cursors (The life before CTE in SQL Server)

Image
…And Why We Need That Now! (A Modern Use Case) Remember those old times when we had to write scripts to find the ancestors or descendants of a particular node in a hierarchical tree structure stored within the RDBMS table. Recall that scripting circus we went through using cursors and/or recursive functions, which possibly triggered various side effects and performance issues. In our case, as high traffic was expected in the application, we were totally against the use of cursors or recursions in our project back then. Still, we couldn’t find any online or offline solutions or any sort of suggestions from others for a better alternative. However, I had an intuition that it could be possible and decided to give it a try anyway. Eventually created a simple and elegant solution using a ‘while’ loop and a temporary table with identity column, which saved us a lot of time, effort and of course some extra CPU cycles. After the introduction of Common Type Expression (CTE) which was released w