Parottasalna

AI, Backend Engineering & Architecture Guides

  • Learning Notes #30 – Queue Based Loading | Cloud Patterns

    Category:

    Today, i learnt about Queue Based Loading pattern, which helps to manage intermittent peak load to a service via queues. Basically decoupling Tasks from Services. In this blog i jot down notes on this pattern for my future self. In today’s digital landscape, applications are expected to handle large-scale operations efficiently. Whether it’s processing…

  • Learning Notes #29 – Two Phase Commit Protocol | ACID in Distributed Systems

    Category:

    Today, i learnt about compensating transaction pattern which leads to two phase commit protocol which helps in maintaining the Atomicity of a distributed transactions. Distributed transactions are hard. In this blog, i jot down notes on Two Phase Commit protocol for better understanding. The Two-Phase Commit (2PC) protocol is a distributed algorithm used to…

  • Learning Notes #28 – Unlogged Table in Postgres

    Category:

    Today, As part of daily reading, i came across https://raphaeldelio.com/2024/07/14/can-postgres-replace-redis-as-a-cache/ where they discussing about postgres as a cache ! and comparing it with redis !! I was surprised at the title so gave a read through. Then i came across a concept of UNLOGGED table which act as a fast retrieval as cache. In…

  • POTD #13 – Subarrays with sum K | Geeks For Geeks

    Category:

    Problem Statement Geeks For Geeks: https://www.geeksforgeeks.org/problems/subarrays-with-sum-k/1 Given an unsorted array of integers, find the number of continuous subarrays having sum exactly equal to a given number k. My Approach 1 (Brute Force) Initially i tried to solve it via bruteforce, but got timedout. My Approach 2 (Optimal) After some time, searched for an approach,…

  • Learning Notes #27 – Rate Limit Requests

    Category:

    Today, i learnt about Rate Limiting Using Redis which is very strange for me. In many blogs, they mentioned implementing redis as a rate limiter, and the code is written in server side. Shouldn’t be offloaded to the gateway ? Many such questions arised. In the mean time, i re-learned the rate limit concept.…