You are viewing content from a past/completed QCon

Presentation: Fresh Async With Kotlin

Track: Evolving Java

Location: Seacliff ABC

Day of week: Tuesday

Slides: Download Slides

Level: Intermediate - Advanced

Persona: Architect, Backend Developer, Developer, Developer, JVM, Front-end Developer, General Software, Mobile Developer, Technical Engineering Manager

Share this on:

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.

Question: 

What is the primary role that you have with Kotlin at JetBrains?

Answer: 

I'm currently leading the team of Kotlin libraries. We are working in close cooperation with Kotlin language team, the design, etc..

Question: 

What made you want to do this talk?

Answer: 

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.

Question: 

Are you going through various async approaches?

Answer: 

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

Question: 

Regarding coroutines, are you talking about it from the syntax approach or about implementation details?

Answer: 

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.

Question: 

Who are you talking to? The Java developer, the Kotlin developer, the JVM developer? An architect? A language designer?

Answer: 

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.

Speaker: Roman Elizarov

Software Engineer Developing Kotlin @JetBrains

Roman Elizarov is a professional software developer with more than 16 years of experience. He had started his career at Devexperts, where he designed and developed high-performance trading software for leading brokerage firms and market data delivery services that routinely handle millions of events per second. He is an expert in Java and JVM, particularly in concurrency, real-time data processing, algorithms and performance optimizations for modern architectures. Roman currently works on Kotlin language at JetBrains. In 2000 Roman had graduated from St. Petersburg ITMO. He now teaches a course on concurrent and distributed programming in ITMO. During his undergraduate study he participated at ACM International Collegiate Programming Contest (ICPC). Since 1997 and until now Roman serves as a Chief Judge of Northeastern European Regional Programming Contest (NEERC) of ICPC.

Find Roman Elizarov at

2020 Tracks

  • Distributed Systems for Developers

    Computer science in practice. An applied track that fuses together the human side of computer science with the technical choices that are made along the way

  • The Future of APIs

    Web-based API continue to evolve. The track provides the what, how, and why of future APIs, including GraphQL, Backend for Frontend, gRPC, & ReST

  • Resurgence of Functional Programming

    What was once a paradigm shift in how we thought of programming languages is now main stream in nearly all modern languages. Hear how software shops are infusing concepts like pure functions and immutablity into their architectures and design choices.

  • Social Responsibility: Implications of Building Modern Software

    Software has an ever increasing impact on individuals and society. Understanding these implications helps build software that works for all users

  • Non-Technical Skills for Technical Folks

    To be an effective engineer, requires more than great coding skills. Learn the subtle arts of the tech lead, including empathy, communication, and organization.

  • Clientside: From WASM to Browser Applications

    Dive into some of the technologies that can be leveraged to ultimately deliver a more impactful interaction between the user and client.

  • Languages of Infra

    More than just Infrastructure as a Service, today we have libraries, languages, and platforms that help us define our infra. Languages of Infra explore languages and libraries being used today to build modern cloud native architectures.

  • Mechanical Sympathy: The Software/Hardware Divide

    Understanding the Hardware Makes You a Better Developer

  • Paths to Production: Deployment Pipelines as a Competitive Advantage

    Deployment pipelines allow us to push to production at ever increasing volume. Paths to production looks at how some of software's most well known shops continuous deliver code.

  • Java, The Platform

    Mobile, Micro, Modular: The platform continues to evolve and change. Discover how the platform continues to drive us forward.

  • Security for Engineers

    How to build secure, yet usable, systems from the engineer's perspective.

  • Modern Data Engineering

    The innovations necessary to build towards a fully automated decentralized data warehouse.

  • Machine Learning for the Software Engineer

    AI and machine learning are more approachable than ever. Discover how ML, deep learning, and other modern approaches are being used in practice by Software Engineers.

  • Inclusion & Diversity in Tech

    The road map to an inclusive and diverse tech organization. *Diversity & Inclusion defined as the inclusion of all individuals in an within tech, regardless of gender, religion, ethnicity, race, age, sexual orientation, and physical or mental fitness.

  • Architectures You've Always Wondered About

    How do they do it? In QCon's marquee Architectures track, we learn what it takes to operate at large scale from well-known names in our industry. You will take away hard-earned architectural lessons on scalability, reliability, throughput, and performance.

  • Architecting for Confidence: Building Resilient Systems

    Your system will fail. Build systems with the confidence to know when they do and you won’t.

  • Remotely Productive: Remote Teams & Software

    More and more companies are moving to remote work. How do you build, work on, and lead teams remotely?

  • Operating Microservices

    Building and operating distributed systems is hard, and microservices are no different. Learn strategies for not just building a service but operating them at scale.