views:

103

answers:

2

After a user submitted data to my app, I'd like to write to the database asynchronously, possibly through a message queue.

How do I set up such a system? Are there any pluggable Django apps that do such message queue-based database writes?

Also how do i handle errors that happens during the async processing?

Would really appreciate any pointers you can give me. Thank you.

+2  A: 

You could take a look at Celery with RabbitMQ or another ghetto queue.

digitaldreamer
+2  A: 

Celery as a queue mechanism with a processor on the back end. It's one of the simpler setups, and very effective. You can back it with persistence, or not, as you need. There's a good walk through on setting it with django up on the website as well. Typically you'll run a queue processor as a daemon, import the model bits from Django if you're using those, and do the updates/inserts/etc as you need.

The documentation includes an example of processing a serial task that you can use as a template.

heckj