The documentation to support my video about Kotlin Channels and flows that you can find here: https://www.youtube.com/watch?v=oEffjtSVAcc.
In this video and with this supporting document I am telling a story of how we can use flows and channels. To explain flows I use the examples of coffee in water and boats on the water. A pretty different example that I thought at the time would help people understand Flows and Channels in Kotlin.
The Zero-ETL Approach: Enhancing Data Agility and Insight
Unlocking the Power of Kotlin Channels.pptx
1. Escape the Ordinary: Unlocking
the Power of Kotlin Channels
through Coffee, Boats,and
Water Streams!
A Lightning Presentation (support slides 2023)
By João Esperancinha (2024/03/15)
2. Who am I?
Software Engineer for 10+ years, mostly in Java and half a
decade in Kotlin. Studied at ISEL Lisboa in Computer Science
and Telecom Engineering, Spring Professional 2020, OCP11 and
Kong Champion
3. Flows and Channels
● Flows
● Channels
Are used asynchronously in suspend
functions to produce and consume
values in an iterative way to and from a
channel.
It is defined as a primitive with non-
blocking properties that provides an
implementation of a SendChannel, to
send(produce) data and an
implementation of a ReceiveChannel, to
receive(consume) data.
● Hot Flow
● Cold Flow
A set of chained operations
designed to be called once
and quickly return
A stream that continuously
emit data, regardless of
whether the of any consumer
being subscribed to it.
12. Codebase
● Source Repository
○ https://github.com/jesperancinha/asnsei-the-right-waf
● Location Directory:
○ https://github.com/jesperancinha/asnsei-the-right-waf/tree/main/demo-projects/library-channels
Use git clone from the command prompt to download the full code base:
> git clone https://github.com/jesperancinha/asnsei-the-right-waf.git
You’ll be prompted for a username and password which should be your github account.
> cd /demo-projects/library-channels
The easy way:
> make b
> make run
The manual way:
> gradle build
> ./gradlew bootRun