Server-side Kotlin with Coroutines • Roman Elizarov • GOTO 2019
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
Essential Kotlin & Coroutines Tools
AI-recommended products based on this video

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

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

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)
![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]](https://m.media-amazon.com/images/I/71lzXt4djxL._AC_UY654_FMwebp_QL65_.jpg)
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]

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

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

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

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

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

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

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

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

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

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

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

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)




















