Session

Efficient Async code with Kotlin Coroutines

Working with asynchronous code is difficult especially for Android Developers which ultimately leads to callback hell. The only way out is using Rx, but again Rx has a really steep learning curve, and forces reactive style on the developers, whether you like it or not, the problem with Rx is that, most beginners in Rx tends to mix reactive style with imperative style which causes bugs and loopholes and also debugging Rx is almost a nightmare.
Most Android developers are using Kotlin nowadays, it has many fantastic features, Coroutines being most notable among them, moreover they're stable now.
This talk would cover:
- Co-routines Generator API Example (for explaining suspension)
- How and where to create Coroutine Scopes, and how to manage them
- How to make API calls just by using co-routines and Kotlin URL extension functions
- How to use co-routines with popular REST client Retrofit.
- Actors, easing Concurrency for Android Developers
- DSL with Corotuines
- Sneak peak at channels, an experimental feature in Coroutines

Nowadays all android developers are using Kotlin, Coroutines are awesome feature of Kotlin and now they're stable as well, it's the best time for Android developers to adopt Coroutines.
Today, for writing good async code developers are bound to follow reactive style with Rx libraries, while using Rx is not a bad thing, but developers need to go a complex learning curve to utilise Rx completely and most-often developers tend to mix reactive style with imperative style which causes bugs and loopholes and also debugging Rx is almost a nightmare.
Coroutines doesn't impose a particular tyle to you, you can follow whatever style you're familiar with and write efficient async code.

Rivu Chakraborty

Kotlin GDE, Android Dev, Author, Speaker, Community Person

Bengaluru, India

View Speaker Profile