If playback doesn't begin shortly, try restarting your device.
•
You're signed out
Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.
CancelConfirm
Share
An error occurred while retrieving sharing information. Please try again later.
9,057 views • Streamed live on Feb 16, 2023 • #kotlin #structuredconcurrency #coroutines
Show less
Modern programming often requires us to guarantee how our applications terminate. One way to do this is through structured concurrency, which allows us to reason about parallel processes and how they relate.
In this session, we will learn how to use Arrow’s Resource Domain-Specific Language (DSL) to reason about resource safety, like we use structured concurrency to avoid leaking resources. We will also see how this can be combined with KotlinX Coroutines to build complex use cases and elegantly use Kotlin DSLs.
#kotlin#structuredconcurrency#coroutines
Demo source code: https://github.com/nomisRev/ktor-k8s-...
Speaker: S…...more
Graceful Resource Handling Using Structured Concurrency in Kotlin
Modern programming often requires us to guarantee how our applications terminate. One way to do this is through structured concurrency, which allows us to reason about parallel processes and how they relate.
In this session, we will learn how to use Arrow’s Resource Domain-Specific Language (DSL) to reason about resource safety, like we use structured concurrency to avoid leaking resources. We will also see how this can be combined with KotlinX Coroutines to build complex use cases and elegantly use Kotlin DSLs.
#kotlin#structuredconcurrency#coroutines
Demo source code: https://github.com/nomisRev/ktor-k8s-...
Speaker: Simon Vergauwen, Tech Lead at 47 Degrees
0:00 Introduction
2:44 Problem description
5:00 Rolling out the application in Kubernetes
8:20 Adding shutdown hooks
10:32 Introducing SuspendApp
13:52 Why graceful shutdown is essential?
19:50 Graceful shutdown in action
21:20 Structured concurrency
24:44 More about SuspendApp for Ktor
32:10 What is resourceScope?
36:20 More extensions for working with the environment in Ktor
46:00 Using Either and handling errors
56:20 Working with dependencies
1:03:35 Summary…...more