Posts

Showing posts from March, 2023

Thundering Herd Problem - ASP Core Solution Architect

Image
  What is the Thundering herd problem? Lets describe it using a realistic problem to get better understanding. Suppose an exposed Weather-API that returns current temperature degree, called by web/mobile apps, and optimized for performance so, for simplicity it utilize caching capabilities so, when it is called, checks for caching and if there is "cache miss", proceed and call a third-party API and cache for later use. The problem happens when there are a multiple calls to Weather-API at the same time and there is a "cache miss" (e.g. data not found in cache) so, each request go and call third-party API and then if succeed, it will cache data.   The 3-party API is slow and not well-designed for this huge number of requests so, it will be down and typically Weather-API  goes down or out of functionality (e.g. due to coupling with third-party API and not a proper handling for exceptions). It is a real complicated problem especially when there are a multiple running ...

Fluent Notification Sender .Net Package

Image
  Most modern software projects have need to an essential feature of sending notifications to clients (e.g., user registration & confirmation, automated request process follow up, topic & news subscription and alerting system…).   Notifications can be in many flavors (Email, SMS, Realtime, and mobile push notification) beside send by multiple methods according to system or client preferences (e.g., sending both Email and SMS notification for specific events occurs in system). Each software project has a different requirement so, it can use a different provider vendor (e.g., send email by SMTP protocol or by SendGrid API, …etc.) to fulfil it. Sending notifications is expensive I/O operation and can affect application performance if it not coded will. Some project's requirements need to log or retry failed notifications .   So , Notification project as a component designed to deal with the above concerns. Design Specifications: Support multiple notifications metho...