Litcius/Paper detail

Fast and Scalable Channels in Kotlin Coroutines

Nikita Koval, Dan Alistarh, Roman Elizarov

202312 citationsDOI

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 sends do not suspend and put elements into the buffer until its capacity is exceeded. This primitive is known as a buffered channel.

Topics & Concepts

Computer scienceRendezvousQueueAsynchronous communicationChannel (broadcasting)ScalabilityParallel computingSynchronization (alternating current)Message passingComputer networkDistributed computingProgramming languageOperating systemSpacecraftEngineeringAerospace engineeringDistributed systems and fault toleranceParallel Computing and Optimization TechniquesOptimization and Search Problems