[Django]-Implementing a SOA in Django using celery

9👍

A message queue (such as rabbitmq brokered by celery) is a perfectly fine way to handle communication between SOA components. Additionally, if you need real-time communication without sharing databases between services, REST is basically made for this. There are several options for implementing REST services on top of Django, with Tastypie and Django-Rest-Framework being popular choices.

As for passing authentication between components, Django has several options for this. Contrary to popular opinion, the Django authentication framework is extremely flexible, supporting authorization/authentication against anything you can write a backend for. See https://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend for documentation on this.

There are numerous examples of this already:

As for publishing auth, there are fewer options, but these include:

I strongly suggest using a provider package already built and tested over rolling your own. Implementing SSO is deceptively tricky.

👤GDorn

4👍

Django is not really built for SOA. In the case of authentication, Django has a well-defined authentication framework that will easily allow you to reuse it across Web, API, etc.

Generally speaking, if you want the flexibility to define your own architecture, Django probably isn’t for you. You might want to consider something more minimalist like web.py.

Leave a comment