How to safely create, compose, and execute effectful Scala programs using the Typelevel Cats Effect library.
Cats Effect is a Scala library that makes it easy to write code that effectively uses multiple cores and doesn’t leak resources. This makes building complex applications, such as highly concurrent services, much more productive. Essential Effects aims to introduce the core concepts in Cats Effect, giving you the knowledge you need to go further with the library in your own applications.
This book is for you if:
- You've heard about "programming with effects" but want to learn more.
- You want to know the basics of Cats Effect.
- You, your team, or your organization is refactoring your code from Future to IO, or is considering doing so.
- Your existing parallel and concurrent code is a tangled mess, or a confusing black box, and you're not sure how to approach fixing it.
Essential Effects will teach you to:
- Understand the meaning and role of side-effects and effects.
- Understand how to encapsulate side-effects in a safer form.
- Use parMapN and other combinators to run effects in parallel.
- Fork independent work into concurrent tasks, then cancel or join them.
- Learn how to separate CPU-bound work from blocking, I/O-bound work.
- Integrate callback-based code, like scala.concurrent.Future, into a safer, effect-based interface.
- Build and combine resource-leak-proof dependencies for applications.
- Test code that performs multiple effects like concurrency and I/O.
More information about Essential Effects can be found at https://essentialeffects.dev.
When the final version is published, you'll receive a copy for no additional cost!