Tuesday, August 25, 2015

Re: Django + microservices: What's correct approach?

> Create a Django project for each micro-service or all using the same project?

Different projects.

Micro-services must communicate themselves using the same REST API, some way for better approach?

The API *is* the service boundary yup.

How to deploy the project: Running "python manage.py runserver" or something like "python manage.py start MY_MICROSERVICE"?

Same way you'd deploy any other Django service.

>  How to communicate the services for reduce response time and using async way?

Just use requests, and don't worry about this.

But finally and most importantly:

Almost certainly *don't bother*. Micro-services have a large up-front cost, and they're not worth it unless you've got a good reason to do so (eg you have a large service and you know that you need to scale different components independently, and ensure distributed reponsibilities across a large engineering team)

Unless you know that you've got an issue like that and you can pinpoint it, it's unclear why a microservices approach would be preferable. (If you're purely looking at this as a learning exercise then that's slightly different)   

A single project providing an API for your front end is *far* more likely to be what you're actually looking for.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7a3005a8-0ecc-4b6e-b614-c5d536b610dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment