Category: Uncategorized
-
POTD #17 – Sum Pair closest to target | Geeks For Geeks
Problem Statement Geeks For Geeks : https://www.geeksforgeeks.org/problems/pair-in-array-whose-sum-is-closest-to-x1124/1 Given an array arr[] and a number target, find a pair of elements (a, b) in arr[], where a<=b whose sum is closest to target.Note: Return the pair in sorted order and if there are multiple such pairs return the pair with maximum absolute difference. If no such pair exists…
-
Learning Notes #44 – Initial Steps on Distributed Tracing and Observability
Few days back, i read a blog post on Jaegar https://medium.com/@achanandhi.m/why-we-need-jaeger-8ba21278b5c9 by Achanandhi M, which made to look on to distributed tracing. I was in need of this tracing for my current project inside a single service. I want to have some trace_id to be passed over the classes for isolating each request from other…
-
Learning Notes #43 – Avoiding Insurmountable Queue Backlogs | AWS | Cloud Pattern
Today i got a chance to read about https://aws.amazon.com/builders-library/avoiding-insurmountable-queue-backlogs/where they mention how to deal with backlog messages in the queue. Its a nice read. I will recommend you to read the same. In this blog i jot down notes from aws blog for future reference. 1. Understanding Queue Behavior: While queues enhance system durability and…
-
Learning Notes #42 – Optimistic Lock and Pessimistic Lock | Postgres Locks
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 locking…
-
Learning Notes #41 – Shared Lock and Exclusive Locks | Postgres
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 maintains…