Главная
Study mode:
on
1
Intro
2
Speaker: Roman Elizarov
3
Old-school client-server monolith
4
Sizing threads - easy
5
Complex business logic
6
What if a service is slow?
7
Blocks threads
8
Release the thread
9
Suspend behind the scenes
10
Performance!
11
Integration
12
Release thread?
13
Blocking server
14
Asynchronous server
15
Server integrated with coroutines
16
Server not integrated with coroutines
17
Suspend is efficient
18
Let's go deeper (with coroutines)
19
Call stack with coroutines
20
Thread pools
21
CPU-bound code
22
Fine-grained control and encapsulation
23
Concurrency with async (futures)
24
Concurrency with coroutines
25
Without coroutine scope?
26
Convention
27
Types as documentation
28
Types are enforced
29
Green threads / Fibers
30
Fibers promise
31
Solution - shared thread pool
32
Returning many responses
33
Where's the catch?
34
Flow example
Description:
Explore server-side Kotlin with coroutines in this GOTO Chicago 2019 conference talk by Roman Elizarov, Kotlin Libraries Team Lead at JetBrains. Dive into the scalability and reliability challenges of traditional thread-based stacks and learn how to mitigate these issues using Kotlin coroutines. Discover how coroutine-based design naturally avoids common pitfalls of asynchronous programming, including resource management, error handling, and request cancellation. Examine the benefits of using coroutines for writing efficient server-side code on the JVM, and gain insights into topics such as suspending functions, thread pools, CPU-bound code, fine-grained control, and concurrency. Compare asynchronous servers with coroutine-integrated servers, and understand the concept of green threads and fibers. Learn about coroutine scopes, conventions, and how types can serve as documentation and enforcement mechanisms. Conclude with an exploration of returning multiple responses using Kotlin flows. Read more

Server-Side Kotlin with Coroutines

GOTO Conferences
Add to list