Concurrency is one of the most complicated areas in software development. Libraries like RxJava, KotlinX Coroutines, and Arrow provide out of the box solutions for the most common patterns, so developers don't need to scratch their heads every single time to solve their problems. In this course, we will learn how to address the most common concurrency scenarios using pure functional approaches thanks to Arrow.
- Previous experience with Kotlin.
- IntellIJ IDEA, JDK 8.
What you'll learn
suspendfrom Kotlin stdlib, what it represents, how it works.
- What does
suspendtranslate to at compile time (CPS).
- The power of delimited continuations, the mother of all monads.
- Equivalence between wrapped approaches and Kotlin suspend.
- Removing the need for IO wrappers.
suspendas a mean to track side effects at compile time.
- Arrow Fx Coroutines: A pure functional implementation of Kotlin
- Concurrency solved by Arrow Fx Coroutines operators.
- Handling errors in concurrent contexts by leveraging
- Fibers as lightweight threads.
- Fork / Join (as functional async await over fibers).
- Evaluating effects on arbitrary contexts.
- Cancellation across asynchronous boundaries.
- Collaborative cancellation checked by all operators.
- Cancellable effects.
- Error handling in concurrent scenarios.
- Handling concurrent mutable state.
- Traversing effects.
- Racing effects.
- Safe resource acquisition with
- Mutual exclusion and concurrency safety with structures like Semaphore.
- Handling concurrent mutable state with
- Composable repeat and retry strategies with
- Racing fibers.
- Functional implementation of suspend system by Arrow Fx Coroutines. Removing wrappers and promoting
- Functional Streams
- Functional Streams with embedded effects