Hi, I’m Karan, a boy interested in farming.
I work as a software engineer and this channel is dedicated to teaching real-world systems engineering concepts that are often missing from traditional tutorials.
Here I try covering:
1. Advanced C++
2. Multithreading & lock-free programming
3. Backend system design
4. Trading systems & exchange architecture
5. Distributed systems
6. Linux & performance engineering
7. Scalability & low latency architecture
The goal of this channel is to bridge the gap between:
“writing code” and “building production-grade systems.”
If you want to understand how high-performance backend systems are designed in the real world, make sure to subscribe.
Feel free to connect: topmate.io/karan_kumar_rajput
Karan IITgn
Announcement:
WatchDog Thread Implementation Live on youtube, today at 10 PM.
Happy Learning!
3 days ago | [YT] | 1
View 0 replies
Karan IITgn
Office Time & Study:
A lot of the time, our code is compiling in the background, we’re waiting for test results, a build to finish, or something else to complete.
And what do most of us do during these waiting periods?
We pick up our phones and start scrolling YouTube Shorts or Instagram Reels.
Before we realize it, 20–30 minutes are gone.
If your goal is to genuinely learn something new, I’d suggest doing these two simple things:
1. Remove Instagram from your phone.
2. Avoid scrolling YouTube Shorts.
These are easy ways to consume time without much real learning or long-term gain.
Instead, during your office/study time, try keeping your phone away from you. On your computer, create a separate window for learning.
Whenever you have a few free minutes, use that window to:
1. Search for a topic you want to understand.
2. Read about it.
3. Write small experiments.
4. Try different coding approaches.
5. Break things and figure out why they broke.
Those small pockets of time can add up to hours of focused learning every week.
So, let’s start this exercise.
Over the next week, let’s learn and experiment with the following topics:
1. new/delete vs malloc/free
2. Memory fragmentation
3. Smart pointers (unique_ptr, shared_ptr, weak_ptr)
4. Custom deleters
5. Cyclic reference issues
6. Placement new
7. Memory pools/Object pools
9. Arena allocation
10. Stack allocation optimizations
11. Cache-friendly allocation
Don't just read about these topics.
Write code. Experiment. Measure. Break things. Understand what is actually happening underneath.
Let's use those otherwise-wasted 10–15 minute gaps to become significantly better engineers.
**Let’s start**
Happy Learning
1 week ago | [YT] | 1
View 2 replies
Karan IITgn
If you are serious about becoming a strong C++ developer, these are some of the books I would highly recommend reading. Based on my experience, I suggest following the exact order mentioned below:
1. Effective C++: 55 Specific Ways To Improve Your Programs And Designs by Scott Meyers : amzn.to/4xQN2IU
2. More Effective C++: 35 New Ways to Improve Your Programs and Designs By Scott Meyers: amzn.to/4eI4Pcx
3. EFFECTIVE MODERN C++: By Scott Meyers: amzn.to/43XyWb6
4. C++ Concurrency in Action by Anthony William: amzn.to/4oNTrAB
5. Asynchronous Programming with C++: Build blazing-fast software with multithreading and asynchronous programming for ultimate efficiency: amzn.to/4w9iBfx
6. The clean Coder: amzn.to/4oPeyCI
For anyone targeting Quant roles or looking to understand market microstructure and the mathematical foundations behind financial markets:
amzn.to/4uW2CjM
Disclaimer: The concepts can be highly math-intensive, so be prepared to spend time building strong intuition.
If you are looking to improve your mindset, habits, and overall approach towards life, these are some self-help books I would strongly suggest reading:
1. Ikigai: The Japanese secret to a long and happy life: amzn.to/3SrUavj
2. Eat That Frog!: 21 Great Ways to Stop Procrastinating and Get More Done in Less Time: amzn.to/4eLowQM
3. THE ONE THING (HB): The Suprisingly Simple Truth Behind Extraordinary Results: amzn.to/43SOKvQ
4. Small Wins Every Day: 100 Powerful Ways to Transform Your Life and Health: amzn.to/4eKEKcS
Some Other Books which are my favourites:
1. Geeta(Spritual Book, source of my energy): amzn.to/4w9Ya1W
2. Rashmirathi : Jnanpith Award Winner, 1972 by Ramdhari Singh Dinkar: amzn.to/4aUaISV
All the resources listed above are personally used or read by me, and I only recommend what I genuinely find valuable.
NOTE: Some of the links shared above are affiliate links, and I may earn a small commission if you purchase through them, don't worry, you won't be charged extra.
1 week ago | [YT] | 0
View 1 reply
Karan IITgn
Live Today at 9:30 PM IST: Market Data Feed Handler
Today, we’ll dive into the fundamentals of Market Data Feed Handling and understand how exchanges deliver data and how we can design a low-latency system around it.
We’ll cover:
1. How does an exchange deliver market data?
2. Why is UDP preferred over TCP for market data?
3. Unicast vs Broadcast vs Multicast
4. How does Market Data Feed Recovery work?
5. What is NUMA and why does it matter in low-latency systems?
6. How can we reduce latency on the critical path?
7. We’ll focus not just on what happens, but also on why these design decisions are made in real-world trading systems.
📅 Today
⏰ 9:30 PM IST
Join the live session and bring your questions!
1 week ago | [YT] | 0
View 3 replies
Karan IITgn
Hope you also love the clutter 🙂
1 week ago | [YT] | 0
View 0 replies
Karan IITgn
As part of multithreading series, soon you will see complete case studies around below topics:
C++ Concurrency, Classic Problems & Real Implementations:
01 — Producer-Consumer Problem
02 — Reader-Writer Problem
03 — Dining Philosophers Problem
04 — Sleeping Barber Problem
05 — Barrier Synchronization
06 — Deadlock & Deadlock Prevention
07 — Thread Pool Implementation
08 — Thread-Safe Queue
09 — Bounded Blocking Queue
10 — Lock-Free Queue
Stay Tuned and if you haven't subscribed, don't forget to!
1 week ago | [YT] | 0
View 0 replies
Karan IITgn
I've been researching how a large-scale brokerage platform like Zerodha could architect and manage its backend systems, and it's been fascinating to explore the engineering challenges involved.
I'll be recording and sharing the complete breakdown and my learnings.
2 weeks ago (edited) | [YT] | 1
View 1 reply
Karan IITgn
When designing a latency-sensitive application, choosing the right locking mechanism can have a significant impact on performance.
At different points in a system, we may use different synchronization mechanisms depending on how frequently contention occurs, how long the critical section is, and how much latency we can tolerate.
In this post, let’s understand the fundamental difference between a Spinlock and a Mutex by comparing them across a few important parameters.
Spin Lock:
========
A Spin Lock is a synchronization mechanism where a thread continuously checks (spins) in a loop until the lock becomes available. Instead of sleeping, the thread remains active and keeps consuming CPU cycles while waiting. This approach is useful when the expected wait time is very short and low latency is critical.
Mutex:
=====
A Mutex is a synchronization mechanism where a thread goes into a blocked or sleeping state if the lock is already acquired by another thread. Instead of continuously checking, the operating system suspends the thread and wakes it up once the lock becomes available. This approach saves CPU resources and is better suited when the waiting time can be longer.
Comparison:
=========
Latency:
Spin Lock usually provides lower latency because the thread keeps checking continuously, while Mutex may introduce additional waiting time.
Context Switch Overhead:
===================
Mutex can cause expensive context switches as the thread gets blocked and rescheduled by the operating system, whereas Spin Lock avoids this overhead.
Power Consumption:
===============
Spin Lock consumes more power since the CPU keeps running in a busy loop, while Mutex is more power efficient because blocked threads are put to sleep.
Locking Strategy (Busy Waiting vs Sleep):
==============================
Spin Lock uses busy waiting, continuously checking until the lock becomes available, whereas Mutex blocks the thread and wakes it only when the resource is free.
Kernel Involvement:
==============
Mutex generally requires kernel/OS involvement for thread scheduling and wake-up operations, while Spin Lock mostly operates in user space without immediate kernel intervention.
CPU Usage:
=========
Spin Lock continuously occupies CPU cycles during waiting, whereas Mutex releases CPU resources by suspending the waiting thread.
2 weeks ago | [YT] | 1
View 0 replies
Karan IITgn
If you are serious about becoming a strong C++ developer, these are some of the books I would highly recommend reading. Based on my experience, I suggest following the exact order mentioned below:
1. Effective C++: 55 Specific Ways To Improve Your Programs And Designs by Scott Meyers : amzn.to/4xQN2IU
2. More Effective C++: 35 New Ways to Improve Your Programs and Designs By Scott Meyers: amzn.to/4eI4Pcx
3. EFFECTIVE MODERN C++: By Scott Meyers: amzn.to/43XyWb6
4. C++ Concurrency in Action by Anthony William: amzn.to/4oNTrAB
5. Asynchronous Programming with C++: Build blazing-fast software with multithreading and asynchronous programming for ultimate efficiency: amzn.to/4w9iBfx
6. The clean Coder: amzn.to/4oPeyCI
For anyone targeting Quant roles or looking to understand market microstructure and the mathematical foundations behind financial markets:
amzn.to/4uW2CjM
Disclaimer: The concepts can be highly math-intensive, so be prepared to spend time building strong intuition.
If you are looking to improve your mindset, habits, and overall approach towards life, these are some self-help books I would strongly suggest reading:
1. Ikigai: The Japanese secret to a long and happy life: amzn.to/3SrUavj
2. Eat That Frog!: 21 Great Ways to Stop Procrastinating and Get More Done in Less Time: amzn.to/4eLowQM
3. THE ONE THING (HB): The Suprisingly Simple Truth Behind Extraordinary Results: amzn.to/43SOKvQ
4. Small Wins Every Day: 100 Powerful Ways to Transform Your Life and Health: amzn.to/4eKEKcS
Some Other Books which are my favourites:
1. Geeta(Spritual Book, source of my energy): amzn.to/4w9Ya1W
2. Rashmirathi : Jnanpith Award Winner, 1972 by Ramdhari Singh Dinkar: amzn.to/4aUaISV
All the resources listed above are personally used or read by me, and I only recommend what I genuinely find valuable.
NOTE: Some of the links shared above are affiliate links, and I may earn a small commission if you purchase through them, don't worry, you won't be charged extra.
2 weeks ago (edited) | [YT] | 4
View 3 replies
Karan IITgn
I had been away from YouTube for quite some time, and could not upload any video, recently I found many interesting problems around deep-diving into system engineering, don't forget to try them.
Problems:
1. Thread-safe queue
2. Blocking queue
3. Thread pool
4. Priority thread pool
5. Future/promise framework
6. Producer-consumer pipeline
7. Lock-free stack
8. Lock-free SPSC queue
9. MPSC ring buffer
10. Memory pool
11. Hazard-pointer memory reclamation
12. Epoch-based reclamation
13. Deadlock detector
14. Thread watchdog
15. Actor framework
16. Concurrent event bus
17. Market-data distribution system
18. Low-latency order-management system
19. Concurrent matching engine
20. End-to-end trading-system concurrency architecture
These problems can help you strengthen your C++, concurrency, low-latency, and system-design skills.
2 weeks ago | [YT] | 5
View 0 replies
Load more