Search results for: multithreading

How to write better multi-threaded code using Akka, Futures, and For-Comprehension

Here at MediaMath, we use Scala to help our API engine handle thousands of concurrent requests per second. We chose Scala because it is designed for use in concurrent, asynchronous, and distributed environments. After all, according to Amdahl’s Law, which states that the more parallel code you have, the more you can benefit from using a modern multi-core processor. But building a high performance system in Scala is always an interesting task. Parallel and concurrent code is historically difficult to write and prone to errors. In this post, I want to share some techniques I’ve learned that will hopefully help […]