Scalaz RingBuffer adds a high-performance low-latency multi-producer/multi-consumer task queue to RTS for faster and smarter concurrency in ZIO.
ZIO RTS runs on a thread pool executor backed by LinkedBlockingQueue. This has the following consequences:
- Performance and latency are inhibited because: a) waiting on locks cause threads to be de-scheduled, b) traversing a linked list is not cache-friendly.
- Optimizations to Fiber cooperative multi-tasking strategy is limited because the thread pool doesn't expose any metrics on its queue remaining capacity\processing times.