Creating a generic microservice with Nameko
In the next few recipes, we are going to create a scraper that can be run as a microservice within a Docker container. But before jumping right into the fire, let's first look at creating a basic microservice using a Python framework known as Nameko.
Getting ready
We will use a Python framework known as Nameko (pronounced [nah-meh-koh] to implement microservices. As with Flask-RESTful, a microservice implemented with Nameko is simply a class. We will instruct Nameko how to run the class as a service, and Nameko will wire up a messaging bus implementation to allow clients to communicate with the actual microservice.
Nameko, by default, uses RabbitMQ as a messaging bus. RabbitMQ is a high-performance messaging bus that is great for performing the type of messaging service used between microservices. It's a similar model to what we saw earlier with SQS, but designed more for services located in the same data center instead of across that cloud. That...