KotlinConf 2018 - Kotlin Coroutines in Practice by Roman Elizarov

  • Published on Oct 14, 2018
  • Recording brought to you by American Express americanexpress.io/kotlin-jobs
    Let's see how Kotlin Coroutines are used to solve real-life concurrency and coordination problems. With coroutines we don't have to worry about shared mutable state and synchronization. We can solve the problems we face using a number of communicating coroutines, where each piece of state is confined to a single coroutine.
    About the Presenter:
    Roman Elizarov is a professional software developer with more than 17 years of experience. He had 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 Kotlin language at JetBrains. Having worked on very large systems compromising 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 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.

Comments • 45

  • Ersin Ertan
    Ersin Ertan 3 years ago +15

    His working through the problem style of presentation is really effective, well presented Roman

  • zhou7yuan
    zhou7yuan 2 years ago +41

    Coroutines recap [

  • Stefan O.
    Stefan O. Year ago

    His talks are actually great to learn the basics and also the best practices of using coroutines.

  • zhenfang Zhang

    I love every talk by Roman

  • Ryszard Grodzicki
    Ryszard Grodzicki Year ago +2

    Should we now use Flow instead of Channels in similar examples?

  • Erik Huizinga
    Erik Huizinga 3 years ago +4

    This talk is essential to understanding some important practicalities about coroutines in Kotlin. Love it. I'd like to help improve the closed captions, but they're not open for contribution. It's unfortunate that automatically generated closed captions don't handle words like 'Kotlin' and 'coroutines' very well. CCs are very useful to watch this video at 2x playback rate to more easily follow what's being said. However, with the bad automatic generation, the CCs don't help.

  • Igor

    How much relevant is this video,

  • Světýlkovo
    Světýlkovo 3 years ago +7

    I am wondering, why did Roman choose to use channels for this example? Is it just to ensure the "reactivenes" so that when some new reference comes at some of point of time, it gets processed? Because if it was to be processed e.g. on a button click, I think it could be rewritten without channels entirely and without mutable state + it would be like 100x simpler IMO :-). It is difficult for me to resist the feeling, that this particular example is already going far too academic. I can remember cca 8 years ago, I was a lot into Actors in Scala, but when I left college and jumped into real programming world, I think I've never used it since then. So I don't know, maybe I've never written a concurrent application that was complicated enough, or I just feel more comfortable doing synchronization from time to time :-). Anyway I've been watching coroutines for almost a year now and when I saw this channels entangled design, it gave me a headache :-D. I think if somebody, who has never seen coroutines before, will watch this video, he will run as far as he can :-)).

  • A YouTuber
    A YouTuber 2 years ago

    Thanks, this is a very nice presentation.

  • Robert Chrzanowski
    Robert Chrzanowski Year ago +1

    In russia, the quantity of coroutines has a quality of it's own.

  • Dharmesh Basapati

    Hi Team JetBrains,

  • FicklebarMcSchrooginatorTheThird

    New to coroutines, I understand everything so far, but does anyone else find this code to be incredibly _dense_? I.e., it seems like every line is packed with so much meaning, it really boggles the mind! I have to reign in my habit of skimming code to understand, it would seem. Or maybe it’s just because it’s so foreign to me.

  • Stanislaw Baranski
    Stanislaw Baranski 3 years ago +4

    Love this guy presentations

  • Marky
    Marky 3 years ago +17

    Excellent talk. Small typo: should be "if (refs == null)" at

  • Вова Монако

    Article about deadlocks in code sample from this presentation

  • Daniele Segato
    Daniele Segato Year ago +1

    I believe the downloader code is bugged. won't work if a location has already been downloaded and a new reference come in cause it gets added to the list but it will not receive the content again.

  • MrJesterJam
    MrJesterJam Year ago +3

    That's all quite good until you start using it. When you start using the actor function, for example, you see it is marked as obsolete. What's the alternative? No, alternative, just 2-year old lengthy discussion on a github issue.

  • Vachagan Balayan
    Vachagan Balayan 3 years ago +2

    Would be great to have this code published to play with...

  • Dmitriy Staeglazov

    It reminded me Akka in some way. Were you inspired by it, Erlang or something else?

  • Ceisluck
    Ceisluck 3 years ago +23

    He has a certain resemblance with Elon Musk