Parottasalna

AI, Backend Engineering & Architecture Guides

  • Learning Notes #42 – Optimistic Lock and Pessimistic Lock | Postgres Locks

    Category:

    Today, I learnt about concurrency control on database from application level. Two widely used strategies to manage concurrency are optimistic locking and pessimistic locking. In this blog, i jot down notes on these two locking mechanism for my future reference. Pessimistic Locking Pessimistic locking assumes that conflicts will occur and proactively prevents them by…

  • Learning Notes #41 – Shared Lock and Exclusive Locks | Postgres

    Category:

    Today, I learnt about various locking mechanism to prevent double update. In this blog, i make notes on Shared Lock and Exclusive Lock for my future self. What Are Locks in Databases? Locks are mechanisms used by a DBMS to control access to data. They ensure that transactions are executed in a way that…

  • POTD #16 – Count Pairs whose sum is less than target | Geeks For Geeks

    Category:

    Problem Statement Geeks For Geeks : https://www.geeksforgeeks.org/problems/count-pairs-whose-sum-is-less-than-target/1 Given an array arr[] and an integer target. You have to find the number of pairs in the array whose sum is strictly less than the target. My Approach Sorted the array and used two pointer approach to find the possible pairs.

  • Learning Notes #40 – SAGA Pattern | Cloud Patterns

    Category:

    Today, I learnt about SAGA Pattern, followed by Compensation Pattern, Orchestration Pattern, Choreography Pattern and Two Phase Commit. SAGA is a combination of all the above. In this blog, i jot down notes on SAGA, for my future self. Modern software applications often require the coordination of multiple distributed services to perform complex business…

  • Learning Notes #39 – Compensation Pattern | Cloud Pattern

    Category:

    Today i learnt about compensation pattern, where it rollback a transactions when it face some failures. In this blog i jot down notes on compensating pattern and how it relates with SAGA pattern. Distributed systems often involve multiple services working together to perform a business operation. Ensuring data consistency and reliability across these services…