Being able to listen to smart people like Roman Elizarov explaining complex subjects in such simplicity is something we take for granted. I envy the people who work with him.
Little observation -> Coroutines are becoming close to RXJava, because more and more operators are being released. They make the coroutines more complex and the main reason people moved from RX was the complexity, but despite this I can't help but notice that JetBrains does it in very beautiful way
For one, it helps that Flow API's (or Kotlin in general) method names are succinct while having a clear meaning over what they do, that alone makes it triumphs RxJava.
Great talk and Kotlin Flow seems an amazing feature! It's funny though, that Roman tells how RxJava is complicated because of all the operators (19:48), and at the end he's telling about bunch of new operators that will be added to Kotlin Flow :)
How would you cross Flow with Result? Let's say there's a function to access a paginated REST API. The function may loop over pages and emitAll their deserialized results. Then the REST API access does something unexpected like 400 Bad Request..... throw? return Result.failure? what else?
All the Kotlin Talks can be found here: kotlinconf.com/talks/ and on each talk there is a link where you can download the slides. For this talk the link is this: resources.jetbrains.com/storage/products/kotlinconf2019/slides/Friday/A1/R.%20Elizarov,%202019%20KotlinConf%20-%20Kotlin%20Flows.pdf Happy coding! :)
I found it. resources.jetbrains.com/storage/products/kotlinconf2019/slides/Friday/A1/R.%20Elizarov,%202019%20KotlinConf%20-%20Kotlin%20Flows.pdf?_ga=2.135341745.100730859.1580057294-705069668.1580057294 the rest of them: kotlinconf.com/talks/
Usually eager/lazy is used in a difference sense, especially in Kotiln. Lazy is something you compute on the first access and then save (cache) for future use. That's how both lazy { ... } and asyc(start=LAZY) { ... } works in Kotlin. Cold is different -- it is something you recompute on each access.
Oh... we could implement rx fully in kotlin and try to optimize it for you, but we don’t care about you. Instead we will just implement ours own clone of rx with alien syntax so you will have something to learn on the weekend.
I actually like Flow's syntax more, also there are some changes (like context preservation for example) which are super useful that would be very hard to do if they were to just port Rx as they would be very misleading to developers users to Rx libraries.
kdreamix Mak yeah... objects and functions which are well known and have the same names across multiple languages. What can be more alienated then that?)
Kotlin won't stagnate either, plus predicting the future is never easy realistically. All being said Kotlin would even in your scenario still continue to be a Google backed language for Android since Google and Java have parted ways. Also Kotlin native could become a thing and open a new set of possibilities. The thing with Kotlin is that thr language really keeps evolving and going forward.
and do you think kotlin is just going to stay the same in the next few years? lmao no it's going to keep improving at the same rate. I don't think Java would be adding all of the new features that are planned if it weren't for Kotlin and Scala gaining so much popularity.
3:00 buildList
5:00 Channel
9:55 flow
13:40 flow vs list
23:10 flow under the hood
29:25 flow asynchronous yet sequential
31:06 go concurrent with flow
33:06 flow execution context
36:36 flow in reactive ui
42:27 roadmap
18:00 flow vs rxjava
And nice desktop at 1:09
Being able to listen to smart people like Roman Elizarov explaining complex subjects in such simplicity is something we take for granted. I envy the people who work with him.
Speaker was so articulate. Thank you so much for such an easy explanation of such complex topics.
What an awesome talk! Elizarov presentations are always very interesting
This talk really flowed well
Thank you Roman !!! Super workshop as always.
Big respect to the guy at 2:40 for sorting out Roman's mic 👍
'suspend' function is magic in its purest form.
Спасибо, Роман. Интересно)
Little observation -> Coroutines are becoming close to RXJava, because more and more operators are being released. They make the coroutines more complex and the main reason people moved from RX was the complexity, but despite this I can't help but notice that JetBrains does it in very beautiful way
You mean the Flow API, not the Coroutines :)
For one, it helps that Flow API's (or Kotlin in general) method names are succinct while having a clear meaning over what they do, that alone makes it triumphs RxJava.
Brain explosion. Such a neat elegant approach to further improve reactive programming
That`s definetly great videos, that can explain you all what you need to know about flow and how to start using them. Thank you!
very clear explanation when he uses marble diagrams
such a wonderful talk, thank you for sharing all this knowledge in such an easy to understand way.
Great talk and Kotlin Flow seems an amazing feature!
It's funny though, that Roman tells how RxJava is complicated because of all the operators (19:48), and at the end he's telling about bunch of new operators that will be added to Kotlin Flow :)
Can't wait for that share operator
Recap On Kotlin Coroutines [0:46]
Call back hell before
Direct style with Kotlin Coroutines
Asynchronous yet sequential
(buildList) [2:58]
Channel [4:57]
Channel is hot🔥 [7:06]
Kotlin Flow [9:41]
Flow is cold❄️ [12:03]
Flow is declarative [12:31]
Flow vs List [13:38]
Flow: Defined Declarative (Runs the flow -suspend)
List: Runs Imperative (suspend)
Execution order [15:14]
Flow is reactive🚀 [16:16]
RxJava / Project Reactor / Kotlin Flow -> Reactive Streams Specification
Why Flow? (What's the difference? [17:53]
(example of RxJava) [18:44]
Flowable:
map sync; flatMapSingle async
filter sync; 🤯 async
Flow [20:01]
map(transform: suspend(T) -> R): Flow
filter(predicate: suspend(T) -> Boolean): Flow
Operator avoidance [20:53]
onStart {} / onEach{} / catch {} / flow {}
(Composable)
Flow Under The Hood [23:04]
(Backpressure) [26:08]
Simple design => performance [26:31]
Kotlin Flow Plays Scrabble (A Benchmark) [26:47]
Time: Sequence < Flow < RxJava2
Flow Is Asynchronous Yet Sequential [29:22]
Going Concurrent With A Flow [31:06]
flow.buffer().collect{}
(internal use Channel) but (Declarative & safe)
Flow Execution Context [33:06]
(where to execute? always on collector) [34:22]
.flowOn(Dispatchers.Default) [34:58]
flow code executes in background, collector code still executes in its context
(Context preservation) [36:13]
Flow In Reactive UI [36:22]
Managing Lifetime [38:26]
(RxJava Subscription Example) [38:53]
(Flow) [39:56]
Status & RoadMap [42:12]
Learn more [44:21]
I loved the talk. Gave thumbs up. But where is the thumbs down count Google??????
Thanks for the talk. It cleared a lot of things for me.
Роман Елизаров , хорошо рассказывает
Flow is cool, Awesome!
It's cold :)
Would be interesting to see comparison of Kotlin Flow vs Scala ZIO
and again simple wins. 🚀
Thanks. Its a great talk.
Glad you enjoyed it
nice explanation ....
How would you cross Flow with Result? Let's say there's a function to access a paginated REST API. The function may loop over pages and emitAll their deserialized results. Then the REST API access does something unexpected like 400 Bad Request..... throw? return Result.failure? what else?
WOW. Amazing!
I just want to know that where the slide can be downloaded, or when will it be released...?
All the Kotlin Talks can be found here: kotlinconf.com/talks/ and on each talk there is a link where you can download the slides. For this talk the link is this: resources.jetbrains.com/storage/products/kotlinconf2019/slides/Friday/A1/R.%20Elizarov,%202019%20KotlinConf%20-%20Kotlin%20Flows.pdf
Happy coding! :)
I found it.
resources.jetbrains.com/storage/products/kotlinconf2019/slides/Friday/A1/R.%20Elizarov,%202019%20KotlinConf%20-%20Kotlin%20Flows.pdf?_ga=2.135341745.100730859.1580057294-705069668.1580057294
the rest of them:
kotlinconf.com/talks/
That mouse cursor on slides 👀😒😅
flowOf, flowOn. Reminds me of Mister Miyagi, not that I actually watched the original film... 😅
Please make slides with dark background please.
Link to Flow Scrabble Benchmark
github.com/Kotlin/kotlinx.coroutines/blob/develop/benchmarks/src/jmh/kotlin/benchmarks/flow/scrabble/README.md
why hot/cold instead of eager/lazy?
Usually eager/lazy is used in a difference sense, especially in Kotiln. Lazy is something you compute on the first access and then save (cache) for future use. That's how both lazy { ... } and asyc(start=LAZY) { ... } works in Kotlin. Cold is different -- it is something you recompute on each access.
@@relizarov Thank you for clarification.
In c# it's called lazy execution. When the result is computed during the access a new item.
How about GlobalScope
when flow.buffer is going to be out
just curious if there are going to tools for converting rxjava code to Kotlin flow
find replace
Wow, such an awesome content! Flow beat the shit out of RxJava.
Everything is nice except that cursor sitting on top left
First of all, var and val are not acceptable in Japan.
What?
Hahaha
Is he nervous?
Oh... we could implement rx fully in kotlin and try to optimize it for you, but we don’t care about you. Instead we will just implement ours own clone of rx with alien syntax so you will have something to learn on the weekend.
I actually like Flow's syntax more, also there are some changes (like context preservation for example) which are super useful that would be very hard to do if they were to just port Rx as they would be very misleading to developers users to Rx libraries.
Actually rx has more alienated syntax on kotlin
Wow, the one who wear leaves laugh at the inventing of clothes “implement their own clone of leaves with alien style”.
kdreamix Mak yeah... objects and functions which are well known and have the same names across multiple languages. What can be more alienated then that?)
in a few years kotlin will be obsolete since java will have integrated new features:)
Kotlin won't stagnate either, plus predicting the future is never easy realistically.
All being said Kotlin would even in your scenario still continue to be a Google backed language for Android since Google and Java have parted ways.
Also Kotlin native could become a thing and open a new set of possibilities.
The thing with Kotlin is that thr language really keeps evolving and going forward.
and do you think kotlin is just going to stay the same in the next few years? lmao no it's going to keep improving at the same rate. I don't think Java would be adding all of the new features that are planned if it weren't for Kotlin and Scala gaining so much popularity.
Not everybody is an Oracle employee
Watch Jake Wharton's talk.
Oh yeah, Java is gonna get first class immutability, null safety and suspended threads REAL soon now.