Exploring the Tokio Framework
So far in this book, we have been building web apps using frameworks and packaging them in Docker to be deployed on a server. Building standard servers is useful and will enable us to solve a range of problems. However, there will come a point in your web development career where a standard REST API server will not be the best solution. It is useful to reach for another tool to implement more custom solutions.
In this chapter, we will explore the Tokio framework to enable async programming. We will then use the Tokio runtime to build safe custom async systems, by sending messages to async code blocks using channels. These messages can even be sent over different threads. We will then facilitate async solutions to complex problems by implementing the actor model.
In this chapter, we will cover the following topics:
- Exploring the Tokio framework for async programming
- Working with workers
- Exploring the actor model for async programming...