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
 
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
 
Intel colfax optimizing-machine-learning-workloads
Intel colfax optimizing-machine-learning-workloadsIntel colfax optimizing-machine-learning-workloads
Intel colfax optimizing-machine-learning-workloads
 
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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

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