Most, if not all, of the systems we develop nowadays require the cooperation of other services, which may live in the same process, in the same machine, or may require some network communication. This creates a lot of different potential scenarios where things may fail. Resilience is the ability of your system to act in an organized way when those events occur.
Your particular approach to resilience depends on multiple factors. Is it possible to try that request again? Should the administrator be alerted if the detected error is fatal? Instead of predefined answers, Arrow aims to provide a set of tools that you can compose to specify your solution in a concise and composable way.
In Arrow series 1.0.x and 1.1.x, these types were provided as part of the
arrow-fx-coroutines library. From 1.2.0 on they live in
even though a migration window is in place until Arrow 2.0.
The Arrow Resilience library implements three of the most critical design pattern around resilience:
- Retry and repeat computations using
- Protect other services from being overloaded using
- Implement transactional behavior in distributed systems in the form of
The following videos showcase how to introduce resilience in your applications.
- Functional Programming in Kotlin with Arrow by Simon Vergauwen and Alejandro Serrano
- Building applications with Kotlin and Arrow.kt in style by Simon Vergauwen