SlideShare a Scribd company logo
1 of 14
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)
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
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.
https://kotlinlang.org/docs/coroutines-overview.html
https://www.tibco.com/reference-center/what-is-data-streaming
https://kotlinlang.org/docs/channels.html#channels-are-fair
https://dictionary.cambridge.org/dictionary/english/canal
https://dictionary.cambridge.org/dictionary/english/channel
Left side of the stream
Right Side of the Stream
The full picture
Resources
● About Coroutines
○ https://kotlinlang.org/docs/coroutines-overview.html
○ https://kotlinlang.org/docs/multiplatform-mobile-concurrency-and-coroutines.html
○ https://www.tibco.com/reference-center/what-is-data-streaming
○ https://dictionary.cambridge.org/dictionary/english/canal
○ https://dictionary.cambridge.org/dictionary/english/channel
○ https://kotlinlang.org/docs/channels.html#buffered-channels
● About Hogweed:
○ - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5729142/
○ - https://www.invasivespeciescentre.ca/invasive-species/meet-the-species/invasive-plants/giant-hogweed/
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
Questions?
Thank You

More Related Content

Similar to Unlocking the Power of Kotlin Channels.pptx

Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...
Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...
Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...
Eranea
 
Study and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple PlayStudy and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple Play
Satya Prakash Rout
 

Similar to Unlocking the Power of Kotlin Channels.pptx (20)

Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
 
Tutorial on SDN data plane evolution
Tutorial on SDN data plane evolutionTutorial on SDN data plane evolution
Tutorial on SDN data plane evolution
 
Qubole Pipeline Services - A Complete Stream Processing Service - Data Sheets
Qubole Pipeline Services - A Complete Stream Processing Service - Data SheetsQubole Pipeline Services - A Complete Stream Processing Service - Data Sheets
Qubole Pipeline Services - A Complete Stream Processing Service - Data Sheets
 
CV-05.02.2017
CV-05.02.2017CV-05.02.2017
CV-05.02.2017
 
OSLC KM: Elevating the meaning of data and operations within the toolchain
OSLC KM: Elevating the meaning of data and operations within the toolchainOSLC KM: Elevating the meaning of data and operations within the toolchain
OSLC KM: Elevating the meaning of data and operations within the toolchain
 
A Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing Clusters
 
Microservices with Spring 5 Webflux - jProfessionals
Microservices  with Spring 5 Webflux - jProfessionalsMicroservices  with Spring 5 Webflux - jProfessionals
Microservices with Spring 5 Webflux - jProfessionals
 
Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...
Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...
Eranea : solution for Cobol to Java transcoding (100% automatic and strictly ...
 
How to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent IIHow to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent II
 
Alpakka:Intergating Akka-Streams with different technology
Alpakka:Intergating Akka-Streams with different technologyAlpakka:Intergating Akka-Streams with different technology
Alpakka:Intergating Akka-Streams with different technology
 
Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018
 
Lakhan_Gupta_CV
Lakhan_Gupta_CVLakhan_Gupta_CV
Lakhan_Gupta_CV
 
LEGaTO: Software Stack Runtimes
LEGaTO: Software Stack RuntimesLEGaTO: Software Stack Runtimes
LEGaTO: Software Stack Runtimes
 
Study and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple PlayStudy and Emulation of 10G-EPON with Triple Play
Study and Emulation of 10G-EPON with Triple Play
 
bds project final documentation
bds project final documentation bds project final documentation
bds project final documentation
 
A efficacy of different buffer size on latency of network on chip (NoC)
A efficacy of different buffer size on latency of network on chip (NoC)A efficacy of different buffer size on latency of network on chip (NoC)
A efficacy of different buffer size on latency of network on chip (NoC)
 
IPT Reactive Java IoT Demo - BGOUG 2018
IPT Reactive Java IoT Demo - BGOUG 2018IPT Reactive Java IoT Demo - BGOUG 2018
IPT Reactive Java IoT Demo - BGOUG 2018
 
Intel colfax optimizing-machine-learning-workloads
Intel colfax optimizing-machine-learning-workloadsIntel colfax optimizing-machine-learning-workloads
Intel colfax optimizing-machine-learning-workloads
 
Optimize Machine Learning Workloads on Intel® Platforms
Optimize Machine Learning Workloads on Intel® PlatformsOptimize Machine Learning Workloads on Intel® Platforms
Optimize Machine Learning Workloads on Intel® Platforms
 
OpenStack & OpenContrail in Production
OpenStack & OpenContrail in ProductionOpenStack & OpenContrail in Production
OpenStack & OpenContrail in Production
 

More from João Esperancinha

KONNECT Kong-Presentation How to protect web applications
KONNECT Kong-Presentation How to protect web applicationsKONNECT Kong-Presentation How to protect web applications
KONNECT Kong-Presentation How to protect web applications
João Esperancinha
 

More from João Esperancinha (7)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptx
 
Demystifying Co, Contra, In Kotlin modifier keywords.pptx
Demystifying Co, Contra, In Kotlin modifier keywords.pptxDemystifying Co, Contra, In Kotlin modifier keywords.pptx
Demystifying Co, Contra, In Kotlin modifier keywords.pptx
 
Exploring Tailrec Through Time Until Kotlin.pptx
Exploring Tailrec Through Time Until Kotlin.pptxExploring Tailrec Through Time Until Kotlin.pptx
Exploring Tailrec Through Time Until Kotlin.pptx
 
Reactive programming with Spring Webflux.pptx
Reactive programming with Spring Webflux.pptxReactive programming with Spring Webflux.pptx
Reactive programming with Spring Webflux.pptx
 
KONNECT Kong-Presentation How to protect web applications
KONNECT Kong-Presentation How to protect web applicationsKONNECT Kong-Presentation How to protect web applications
KONNECT Kong-Presentation How to protect web applications
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
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.
  • 8. Left side of the stream
  • 9. Right Side of the Stream
  • 11. Resources ● About Coroutines ○ https://kotlinlang.org/docs/coroutines-overview.html ○ https://kotlinlang.org/docs/multiplatform-mobile-concurrency-and-coroutines.html ○ https://www.tibco.com/reference-center/what-is-data-streaming ○ https://dictionary.cambridge.org/dictionary/english/canal ○ https://dictionary.cambridge.org/dictionary/english/channel ○ https://kotlinlang.org/docs/channels.html#buffered-channels ● About Hogweed: ○ - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5729142/ ○ - https://www.invasivespeciescentre.ca/invasive-species/meet-the-species/invasive-plants/giant-hogweed/
  • 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