Skip to main content

Posts

Well Architected Monoliths

Source: Whit Richardson/Alamy Stock Photo The story of the monolith application or architecture begins with the rise of the web in the late 1990s and early 2000s. During this time, most web applications were developed as monoliths, which means that all the code and functionality were bundled together in a single application. This approach made it easier to develop and deploy applications, as everything was in one place. However, as applications grew in size and complexity, this monolithic approach began to cause the following problems. Harder to make changes, deploy new features and maintain the application Slow Deployment, for any small change, the entire application needs to be deployed You can’t scale one or more modules/components of an application independently, however, one has to scale the entire application Slow Time-to-market, as being a monolith application feature delivery may take more time Difficult for large and geographically distributed teams to work together Despite ha...
Recent posts

Let's understand Action and Func delegates in C#

Introduction In this article, we are going to discuss Action and Func delegates in C# and how we use them. As we already know, a Delegate in C# is a type-safe method pointer and we are using it to handle the callback or an event. Actions and Funcs are just delegates but are pre-defined in System Namespace so that we don’t need to define the custom delegates manually. Syntax Both Action and Func delegates can have multiple input parameters. A Func delegate returns a value while an Action does not, this is the only difference between them. C# provides 17 overloads of Action delegate in the System Namespace, one of them is: public delegate void Action<in T>(T obj); This Action delegate would only accept one argument of type T. However, it can support up to 16 arguments of type T. Similarly, there are total of 17 overloads of Func delegate defined in the System Namespace, one of them is: public delegate TResult Func<out TResult...

How to design your first Solution Architecture Diagram?

Problem Statement  An e-commerce Startup in India, ContosoBuy is building an Order Management system and wants to deploy its Order processing APIs in the cloud. ContosoBuy is looking for a Cloud-based API hosting solution that is highly available, scalable, reliable, and cost-effective.    APIs should be able to handle the demand during festival sales and seasonal offers, traffic can spike as more and more people start placing orders. APIs should be secured against common web-hacking techniques such as SQL injection and security vulnerabilities such as cross-site scripting. The API deployment infrastructure needs to be secured too It is important for the database supporting the API to be highly available and capable of handling failures in a graceful manner. ContosoBuy also needs to store clickstream data for personalized marketing so that it can keep the customer engaged and informed thus increasing customer retention. Approach a Solution Designing a solution archit...

Does your Software system lack modularity and scalability?

Are you experiencing these Design issues? Your application code is so rigid to accommodate new changes! making it difficult to modify the system as a whole If you make changes to one part of the system it can have unexpected and far-reaching consequences in other parts of the system! You are unable to write Unit tests or if you can but those are not enough to cover the complete component functionality! You are not able to reuse the common code base across your code base due to tight coupling! If you are facing all or any such issues in your day-to-day life then this is the right place to find the solution to your problem. Lack of modularity and loose-coupling can lead to software that is difficult to understand, maintain, and extend, and can limit its potential for reuse and scalability.  An answer is: Component-Based Software Design Breaking down the Softwa...

Get your hands dirty with .Net 6 Periodic Timer!

Introduction .Net provides lots of types of Timer classes that you, as a developer, probably have come across in your day-to-day work. Below is the list:  System.Web.UI.Timer System.Windows.Forms.Timer System.Timers.Timer System.Threading.Timer System.Windows.Threading.DispatcherTimer .NET 6 introduces one more timer class, called PeriodicTimer . It doesn't rely on callbacks and instead waits asynchronously for timer ticks. So, if you don't want to use the callbacks as it has their own flaws PeriodicTimer  is a good alternative. You can create the new PeriodicTimer instance by passing the one argument, Period the time interval in milliseconds between invocations How to use Periodic Timer You can call the WaitForNextTickAsync  method in an infinite for or while loop to wait asynchronously between ticks. Example Let's write a small console application with two methods having their own ...