Proper way to run nameko service(s) inside a Django application?

450 Views Asked by At

If I have a vanilla Django REST (DRF) application and I would like to integrate a nameko service (specifically an event_handler event listening service), what's the best way to achieve this?

I cannot simply nameko run a service if it's part of a Django application.

I'm considering running the nameko service via a custom Django management command, but would I lose some of nameko's features, say, scalability? Eg. nameko maintains a pool of 10 workers per nameko run (if I remember correctly).

1

There are 1 best solutions below

0
On

This is how:

https://github.com/sivabudh/djanko/blob/master/services.py

See: django-nameko-standalone

Update: If you want to do microservices with Django, just use Celery. Works like a charm.