What Breaks First: System Design Interviews for Senior and Staff Backend Engineers
Most system design preparation stops the moment the first diagram works. At Senior and Staff level, that is where the interview starts. Every solid candidate can put an API server, a database, and a cache on the board for the happy path. What separates a pass from a strong pass is what happens next: whether you notice the race condition, the hot cache shard, the...
Java Thread Performance Vs. Virtual Threads Part 2
Image generated by DALL-E In previous posts, here and here, I did a very simple performance benchmark between Java’s Thread vs. Java’s Virtual Threads and Kotlin’s coroutines. My fiend Hossein asked me about benchmarking with tasks that have heavy memory and performance usage to have a better insights. Here I am trying to change the benchmark test, so instead of just sleeping for a few...
Overengineering
You might have heard the term “Overengineering” frequently, and many people advise avoiding it during software development. But what is overengineering? How does it creep into software development, and how can we prevent it? Overengineering When developing software from scratch, there are many details to consider at the beginning, and numerous problems to solve during the development process. It’s easy and unfortunately common to fall...
Java Virtual Threads Performance Vs. Kotlin Coroutines
In previous post, I just did a simple benchmark to compare performance of Java Threads vs. Java Virtual Threads. In this post, I want to compare Java Virtual Threads against Kotlin Coroutines. This is a very simple test, I create a very huge number of coroutines, each takes 5 seconds to finish. Then I calculate the duration of running app. This is Kotlin code I...
Java Thread Performance Vs. Virtual Threads
During an interview, some interviewer asked me about the differences between Java Threads performance vs. Virtual Threads. I answered that because Virtual Threads are actually light weight threads handled by JVM, they must be faster, but I was curious about the exact performance difference between these two. So, I did a simple benchmark to see the performance improvements in Virtual Threads. This is a very...