12:59Server-side Kotlin with Coroutines • Roman Elizarov • GOTO 2019
From the creator
This presentation was recorded at GOTO Chicago 2019. #gotocon #gotochgo http://gotochgo.com Roman Elizarov - Kotlin Libraries Team Lead at JetBrains ABSTRACT Kotlin was designed as a general-purpose programming language and with coroutines writing server-side code is a easy as never before on JVM. We'll dissect scalability and reliability problems of a traditional thread-based stacks and discuss the process of mitigating those issues by introducing asynchrony with Kotlin coroutines. We'll see how coroutine-based design naturally avoids common pitfalls of traditional asynchronous programming such as resource management, error handling and request cancellation, producing safe [...] TIMCODES 0:00 Introduction 1:51 Old-school client-server monolith 2:32 Sizing threads - easy 4:08 Complex business logic 5:22 What if a service is slow? 5:40 Blocks threads 7:43 Release the thread 10:47 Suspend behind the scenes 11:42 Performance! 13:43 Integration 14:44 Release thread? 14:58 Blocking server 15:50 Asynchronous server 16:40 Server integrated with coroutines 17:30 Server not integrated with coroutines 19:23 Suspend is efficient 21:14 Let's go deeper (with coroutines) 21:49 Call stack with coroutines 23:26 Thread pools 27:51 CPU-bound code 28:14 Fine-grained control and encapsulation 33:14 Concurrency with async (futures) 35:25 Concurrency with coroutines 38:04 Without coroutine scope? 38:54 Convention 39:41 Types as documentation 40:35 Types are enforced 42:46 Green threads / Fibers
Published 2019-06-14 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





