Fast and Scalable Channels in Kotlin Coroutines
Nikita Koval, Dan Alistarh, Roman Elizarov

TL;DR
This paper introduces a new fast and scalable algorithm for implementing rendezvous and buffered channels in Kotlin Coroutines, significantly improving performance and integrating seamlessly into the existing library.
Contribution
The paper presents a novel algorithm for channels that enhances speed and scalability, supporting full semantics and integrating into Kotlin Coroutines.
Findings
Up to 9.8x performance speedup compared to existing implementations.
Successful integration into Kotlin Coroutines library.
Demonstrated scalability and expressiveness of the new algorithm.
Abstract
Asynchronous programming has gained significant popularity over the last decade: support for this programming pattern is available in many popular languages via libraries and native language implementations, typically in the form of coroutines or the async/await construct. Instead of programming via shared memory, this concept assumes implicit synchronization through message passing. The key data structure enabling such communication is the rendezvous channel. Roughly, a rendezvous channel is a blocking queue of size zero, so both send(e) and receive() operations wait for each other, performing a rendezvous when they meet. To optimize the message passing pattern, channels are usually equipped with a fixed-size buffer, so send(e)-s do not suspend and put elements into the buffer until its capacity is exceeded. This primitive is known as a buffered channel. This paper presents a fast…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed systems and fault tolerance · Parallel Computing and Optimization Techniques · Distributed and Parallel Computing Systems
