A book on how to safely create, compose, and execute effectful Scala programs using the Typelevel Cats Effect library.
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. This book 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.
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.
About the Author
Programming in Scala since 2011, Adam focuses on building systems, teaching, and mentoring using functional programming as a Principal at Inner Product LLC. He previously helped various startups in many domains develop back-end systems and implement continuous deployment practices, and also spent five years as a developer at Xerox PARC. This is his first book.