Server-side Kotlin with Coroutines • Roman Elizarov • GOTO 2019

GOTO Conferences June 14, 2019
Video Thumbnail
GOTO Conferences Logo

GOTO Conferences

@goto-

About

GOTO gathers the brightest minds in the software community to help developers tackle projects today, plan for tomorrow and create a better future. Learn from thought leaders and innovators with top-rated videos released daily, and at our year-round conferences, masterclasses and meetups. GOTO offers attractive sponsorship opportunities for partner companies. Reach out for limited offerings: [email protected] GOTO YouTube Channel Code of Conduct: https://blog.gotocon.com/yt-coc

Video Description

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 43:25 Fibers promise 44:40 Solution - shared thread pool 45:54 Returning many responses 48:02 Where's the catch? 50:14 Flow example Download slides and read the full abstract here: https://gotochgo.com/2019/sessions/827 https://bsky.app/profile/gotocon.com https://twitter.com/GOTOcon https://www.linkedin.com/company/goto- https://www.instagram.com/goto_con https://www.facebook.com/GOTOConferences #kotlin #programming #ProgrammingLanguages CHANNEL MEMBERSHIP BONUS Join this channel to get early access to videos & other perks: https://www.youtube.com/channel/UCs_tLP3AiwYKwdUHpltJPuA/join Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at https://gotopia.tech Sign up for updates and specials at https://gotopia.tech/newsletter SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1

You May Also Like

Essential Kotlin & Coroutines Tools

AI-recommended products based on this video

Loading...
Smart Watch for Men Women Bluetooth Call, 1.85" HD Touch Screen Fitness Watch with Sleep Heart Rate Monitor, 112+ Sports Modes, IP68 Waterproof Activity Trackers for Android iOS, Black

Smart Watch for Men Women Bluetooth Call, 1.85" HD Touch Screen Fitness Watch with Sleep Heart Rate Monitor, 112+ Sports Modes, IP68 Waterproof Activity Trackers for Android iOS, Black

(89)
$21.98
FREE delivery Fri, Dec 19 on your first order
Loading...
Wireless Earbuds, Bluetooth Headphones 5.3 HiFi Stereo Ear Buds, 80H Bluetooth Earbuds with Dual LED Display Charging Case, IPX7 Waterproof Earphones for Android iOS

Wireless Earbuds, Bluetooth Headphones 5.3 HiFi Stereo Ear Buds, 80H Bluetooth Earbuds with Dual LED Display Charging Case, IPX7 Waterproof Earphones for Android iOS

(111)
$26.99
Prime
400+ bought in past month
Loading...
Air Tracker Tags-4 Pack: Smart Bluetooth Tracker, Item Finder Works with Apple Find My (iOS Only) App, Trakcer Tag Locator for Keys, Luggage, Satchel, Backpack etc. (Not for Android Devices)

Air Tracker Tags-4 Pack: Smart Bluetooth Tracker, Item Finder Works with Apple Find My (iOS Only) App, Trakcer Tag Locator for Keys, Luggage, Satchel, Backpack etc. (Not for Android Devices)

(441)
$49.99
FREE delivery Sat, Sep 13
2K+ bought in past month
Loading...
SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]

SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]

(12,472)
$19.99$18.59
FREE delivery Sun, Aug 10 on your first order
400+ bought in past month
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22
Loading...
Wireless Charger for Samsung - NANAMI 3 in 1 Charging Station for Multiple Devices,Fast Charger Stand Dock for Galaxy S25 S24 S23 Ultra S22 S21 S20 Z Flip Fold,Galaxy Watch 5/5 Pro/4/3,Galaxy Buds Pro

Wireless Charger for Samsung - NANAMI 3 in 1 Charging Station for Multiple Devices,Fast Charger Stand Dock for Galaxy S25 S24 S23 Ultra S22 S21 S20 Z Flip Fold,Galaxy Watch 5/5 Pro/4/3,Galaxy Buds Pro

(2,272)
$43.99
PrimeFREE delivery Sat, Jun 14
200+ bought in past month
Loading...
Magnetic Nasal Strips Starter Kit: Comfortable Nasal Breathing Support for Sleep, Helps Reduce Snoring Noise, Includes 60 Tabs (30 Uses) with 4 Sizes

Magnetic Nasal Strips Starter Kit: Comfortable Nasal Breathing Support for Sleep, Helps Reduce Snoring Noise, Includes 60 Tabs (30 Uses) with 4 Sizes

(40)
$17.99
FREE delivery Wed, Mar 18 on your first orderOnly 7 left in stock.
1K+ bought in past month
Loading...
Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

(786)
$69.15$33.51
FREE delivery Jun 13 - 17
Loading...
Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

(0)
$30.99
FREE delivery Jun 19 - Jul 3
Loading...
Bonsai Starter Kit – 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters – Gardening Gifts for Women & Men
Best Seller

Bonsai Starter Kit – 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters – Gardening Gifts for Women & Men

(243)
$19.99
FREE delivery Sat, Jun 14 on your first order
300+ bought in past month
Loading...
A Family Affair: The List: A Small Town Family Saga (Truth In Lies Book 20)

A Family Affair: The List: A Small Town Family Saga (Truth In Lies Book 20)

(268)
$0.00
Available instantly
Loading...
GLEAM Sheet Music Stand - Full Metal with Carrying Bag, Phone Holder, Sheet Music Folder and Clip, 5 in 1 Desktop Book Stand
Best Seller

GLEAM Sheet Music Stand - Full Metal with Carrying Bag, Phone Holder, Sheet Music Folder and Clip, 5 in 1 Desktop Book Stand

(12,206)
$36.99
PrimeFREE delivery Sat, Jun 14
500+ bought in past month
Loading...
We Who Will Die: An Epic Romantasy of Forbidden Love, Deadly Secrets, and Vampires in a High-Stakes Arena, Discover a Vividly Reimagined Ancient Rome (Empire of Blood Book 1)

We Who Will Die: An Epic Romantasy of Forbidden Love, Deadly Secrets, and Vampires in a High-Stakes Arena, Discover a Vividly Reimagined Ancient Rome (Empire of Blood Book 1)

(21,195)
$0.00
Available instantly
Loading...
The Ultimate Book of Random Fun Facts: Over 1000 Interesting Facts And Trivia Quizzes About History, Science, Sports, Animals, Space and Anything In Between!

The Ultimate Book of Random Fun Facts: Over 1000 Interesting Facts And Trivia Quizzes About History, Science, Sports, Animals, Space and Anything In Between!

(1,271)
$15.72
FREE delivery Tue, Dec 30 on your first order