KotlinConf 2017 - Deep Dives into Coroutines on JVM by Roman Elizarov
In this talk, we perform a deep dive into the design and implementation of Kotlin coroutines for those who like to understand it down to the bottom. What were the design goals of the Kotlin coroutines and how are they implemented on JVM? What is the difference between CPS and CSP? What concept stands behind the suspending functions in Kotlin and how are they represented on JVM? What exactly happens when you launch coroutines and how much actual overhead do they have? Can you use Kotlin coroutines from Java? This talk answers these and other coroutine-related questions, showing and explaining the corresponding byte code that is produced by the Kotlin compiler with code samples and benchmarks. Roman Elizarov is a professional software developer with more than 16 years experience. He started his career at Devexperts, where he designed and developed high-performance trading software for leading brokerage firms and market data delivery services that routinely handle millions of events per second. He is an expert in Java and JVM, particularly in real-time data processing, algorithms and performance optimizations for modern architectures. Roman currently works on the Kotlin language at JetBrains. Having worked on very large systems comprising of many modules written in different languages, he has a dream of a single language that can be used to write all parts of a very large distributed system, to share and reuse data models and algorithms without friction. Kotlin with JVM and JS backends and the upcoming native compiler is the ideal candidate to realize this dream. In 2000 Roman had graduated from St. Petersburg ITMO. He now teaches a course on concurrent and distributed programming in ITMO. During his undergraduate study, he participated at ACM International Collegiate Programming Contest (ICPC). Since 1997 and until now Roman serves as a Chief Judge of Northeastern European Regional Programming Contest (NEERC) of ACM ICPC.