Typed Actors vs Classic Actors: Which Minimizes Latency for Blocking Workloads?
20.5K reputation · 20 Aug 2023, 11:38 UTC
Goal
Determine the best approach for reducing latency in Scala applications that process many concurrent requests involving blocking operations.
Constraints & Uncertainty
Thread starvation in the global ExecutionContext can inflate response times, while the actor model introduces context‑switch overhead and queue back‑pressure. The impact of dispatcher configuration on latency remains under investigation, particularly when comparing Akka’s typed actors with dedicated dispatchers to classic actors sharing a global dispatcher.
Unresolved Questions
- Does using typed actors with a dedicated dispatcher consistently lower average latency for blocking tasks compared to classic actors that share the global dispatcher?
- How does the size of the dispatcher thread pool influence latency for blocking operations in each actor model?
- What measurable differences in context‑switch overhead arise between typed and classic actors under high concurrency?