Taming the Thread Zoo: Building Lock-Free, GC-Friendly Concurrency in Kotlin

Grab a chair, refill your caffeine reservoir, and let’s talk about that four-letter word we all pretend not to hate: lock. You know the drill: everything runs fine in staging, but the moment real traffic turns up, a single hot lock starts playing king-of-the-CPU-hill while your tail-latency graph draws modern art. At that point management... Continue reading Taming the Thread Zoo: Building Lock-Free, GC-Friendly Concurrency in Kotlin

Building a Sub-100 µs Matching Engine with Kotlin Coroutines

In the world of high-frequency trading (HFT), every microsecond counts. Small inefficiencies can quickly snowball into significant costs or missed opportunities. With Kotlin’s robust coroutine model, we can harness lightweight concurrency to power a matching engine that can respond within sub-100 microseconds. In this post, I’ll walk through the design considerations, coroutine architecture, and performance... Continue reading Building a Sub-100 µs Matching Engine with Kotlin Coroutines