Skip to content
0:00 / 0:00

#kotlinflow#coroutines#asynchronousprogramming

KotlinConf 2019: Asynchronous Data Streams with Kotlin Flow by Roman Elizarov

JetBrains

236K subscribers • 29 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2021 to 2024.
  • Presented by Roman Elizarov, Project Lead for Kotlin

Intermediate. Assumes working knowledge.

83K views6 years ago2 recommendations

Programming languagesSoftware designKotlinConcurrency and parallelismKafka and stream processing

Roman Elizarov explains the design, implementation, and usage patterns of Kotlin Flow for asynchronous data streams.

Recording brought to you by American Express. americanexpress.io/kotlin-jobs Kotlin Flow is a declarative mechanism for working with asynchronous data streams that builds on top of Kotlin coroutines and structured concurrency. Kotlin Flows are doing the same revolution in simplicity for data streams that suspending functions did for data values. In this talk we will discuss the challenges of working with asynchronous streams and how Kotlin Flows solve them. We will study the basics of Kotlin Flow design, see their typical usage patterns, peek behind the scenes and into some of the implementation details, checkout flow performance and see how they enable writing safe, reliable, and leak-free systems. We will also discuss how they relate to and incorporate ideas from reactive extensions and reactive streams, how they are similar and different, and how they can be used together. Resources: KotlinConf website: jb.gg/fyaze5 KotlinConf on Twitter: twitter.com/kotlinconf Kotlin website: jb.gg/pxrsn6 Kotlin blog: jb.gg/7uc7ow Kotlin on Twitter: twitter.com/kotlin #KotlinConf19 #Kotlin #JetBrains #KotlinFlows About the Presenter: Roman Elizarov works at JetBrains as Team Lead for Kotlin Libraries team, where he is focused on development and maintenance of multi-platform foundational libraries for Kotlin programming language. His main contribution in this role is design of Kotlin coroutines and development of Kotlin coroutines library. In 2000 Roman Elizarov had graduated from St. Petersburg ITMO and started his career as a professional software developer. During his undergraduate study he participated in International Collegiate Programming Contests (ICPC). Since 1997 and until now Roman serves as a Chief Judge of Northern Eurasia Region of ICPC. He also maintains his academic ties and now teaches a course on concurrent and distributed programming at ITMO. Roman Elizarov had worked for most of 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 concurrency, real-time data processing, algorithms, and performance optimizations for modern architectures.

Why it's here

2 people recommend this

What people say. Recommended as an excellent resource for understanding Kotlin coroutines and Flow at a deeper level.

u/i_dont_know_him_manin r/Kotlin • Recommends

On “Resources on coroutines”

In my opinion the content of Roman Elizarov (ex-project lead on Kotlin) is pure gold in understanding these concepts at a deeper level. I don't know if this is a style that fits all (probably not) but from my experience and from some chats with colleagues I figured this is some good material that works with a relative large audience. I gathered some resources here for you, but in case you find the time I would recommend browsing through his medium protfolio or his conference talks. # Coroutines * Kotlin Coroutines, a deeper look * Coroutine Context and Scope * The reason to avoid GlobalScope # Flows & Channels: * Shared flows, broadcast channels * Cold flows, hot channels Now in ca…

u/astro1066in r/Kotlin • Recommends

On “What's the recommended way to implement an event emitter in Kotlin when working with coroutines?”

Interesting, it seems very suitable for my use case indeed. Thanks! I don't know much about flows, I guess it's time for me to check the 2019 talk by Roman Elizarov.

u/renatomrcostain r/Kotlin • Mentions

On “[Question] GraphQL + R2DBC”

You do need the `kotlin-coroutines-jdk8` dependency if you are working if `CompletableFuture<T>`, but the helper function you presented there is the DSL helper to create Java 8 futures in an idiomatic kotlin way, if you have need of that: val java8Future = CompletableFuture() // or val java8Future = future { } Howver, in this case, you do not need to create a future manually: You need to interop with what's provided in the r2dbc library. Normally, when you want to work with a CompletableFuture in a suspending manner, one can simply use the extension function `.await()` on it. It will suspend it, and work akin to the special jobs the `async {}` co…