Skip to content

Nameko microservices based demo. app which shows http, rpc and event based calls in Nameko.

Notifications You must be signed in to change notification settings

DayDreamer3d/nameko_demo_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo App

Introduction

In this setup we will use Nameko to create an app with following functionalities. - setup for http traffic and http service. - rpc for inter-service calls. - event based logging.

Note

It's a demo app therefore, we are using Nameko for both http and rpc traffic. We are mocking database as well as logging bits too. In real world we would prefer appropriate technologies for each of these parts.

Setup

We will create three services - http_route_service - service facing client, accepts and responds to http requests. - db_service - interact with low level persistent infrastructure. - log_service - event based logging service and write logs to file.

Make sure RabbitMQ is running and localhost:8000 is free. Use nameko run db_service log_service route_service to start these services.

Working

demo app image

  1. Client will send a GET http request through localhost:8000.
  2. http_route_service will receive this request and sends an rpc request to RabbitMQ.
  3. Broker will route this message to database_service to get the records from persistent store.
  4. These records will get returned to http_route_service which will use them to fill the html template.
  5. http_route_service will also dispatch get_people event for logging to RabbitMQ broker.
  6. Event message will get routed to log_service which writes this message to a file.
  7. Finally, http_route_service returns the http response with html.

More

I've created a sample app with few of nameko extensions which extends these principles.


About

Nameko microservices based demo. app which shows http, rpc and event based calls in Nameko.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages