Presentation: Fresh Async With Kotlin
What You’ll Learn
- Hear how asynchronous programming is done in various languages.
- Find out how Kotlin does asynchronous based on code samples that vary from simple to complex.
Abstract
Asynchronous programming is on the rise. Modern software systems are connected and constantly communicating. Programming languages are adding some form of asynchronous programming like async/await. However, Kotlin had taken a fresh approach to this problem with Kotlin Coroutines.
In this talk, we’ll study various approaches to asynchronous programming, their evolution, differences and similarities. We’ll see the problem with the traditional async/await approach that is based on futures/promises and how the Kotlin’s solution that is based on concepts of coroutines and continuations is giving us safer and easier programming model.
What is the primary role that you have with Kotlin at JetBrains?
I'm currently leading the team of Kotlin libraries. We are working in close cooperation with Kotlin language team, the design, etc..
What made you want to do this talk?
Part of the reason is the way we designed asynchronicity Kotlin, it is novel. There are things you can't find in other languages. It's less familiar to people, so we need to spend some time explaining it to people, what is different, how it works, and why would we chose to do async in this wait instead of how other languages are doing it.
Are you going through various async approaches?
Yes. I want to start with callbacks, which is a classic approach, very popular in JavaScript/Node.js world. Then we'll see Futures and Promises. That's how modern languages approach async. Then we'll jump to Kotlin, how async is different, cleaner, easier. In a way it's very similar, but it removes a layer of complexity from the language
Regarding coroutines, are you talking about it from the syntax approach or about implementation details?
I would show both how you use it and a little bit how it's implemented by the compiler. How it translates into Java bytecode if you were doing it manually to dispel the magic. Then I'll show a couple of practical scenarios, how to use it. Here is the task you have in hand, then you write the async call. How you start from taking your async I/O library that most people use and adapt it to work with coroutines. I will take a simple example and show how to build a more complex one.
Who are you talking to? The Java developer, the Kotlin developer, the JVM developer? An architect? A language designer?
The main persona I envision is a developer. It's more about concepts, but I show the actual code. It should be easily to understand for JVM developers, but it is not problem to grasp it even if you come from another world, JS or Swift. It should be pretty self-explaining because the code we will be showing you'll be able to read even if you don't know the language.
Similar Talks
License Compliance for Your Container Supply Chain
Open Source Engineer @VMware
Nisha Kumar
Observability in the SSC: Seeing Into Your Build System
Engineer @honeycombio
Ben Hartshorne
Evolution of Edge @Netflix
Engineering Leader @Netflix
Vasily Vlasov
Mistakes and Discoveries While Cultivating Ownership
Engineering Manager @Netflix in Cloud Infrastructure
Aaron Blohowiak
Optimizing Yourself: Neurodiversity in Tech
Consultant @Microsoft
Elizabeth Schneider
Monitoring and Tracing @Netflix Streaming Data Infrastructure
Architect & Engineer in Real Time Data Infrastructure Team @Netflix
Allen Wang
Future of Data Engineering
Distinguished Engineer @WePay
Chris Riccomini
Coding without Complexity
CEO/Cofounder @darklang
Ellen Chisa
Holistic EdTech & Diversity
Holistic Tech Coach @unlockacademy