185 points · by dlcmh · 11y ago · 29 comments
At the moment I'm working on building an app in Node.js with Express and sadly, there are not many tutorials of this quality.
[1]: https://github.com/mineta/taskbuster-boilerplate/blob/master...
[2]: https://github.com/mineta/taskbuster-boilerplate/blob/master...
https://docs.djangoproject.com/en/1.8/releases/1.8/#template...
https://docs.djangoproject.com/en/1.8/releases/1.8/#django-c...
Alternative is to use something like Celery: http://docs.celeryproject.org/en/latest/index.html
The main issues when you start to have a stack built of big independant systems ( such as a db, a message queue, worker processes, and web server) are more related to deployment, monitoring and failover management. But they are really the big issues that justify the choice of a technology instead of another.
You could simply use this: if all you need is to run a slow task and not block a request there's this: https://github.com/defrex/django-after-response
I've usually used the system crontab (sometimes via https://github.com/andybak/django-cron ).
If you really really need a proper task queue then Huey is much lighter than Celery: https://huey.readthedocs.org/en/latest/
If you do need something more than
Say what?
The suckiness of celery doesn't come from its use of python. I'd be interested to know how you consider python not to be "enterprise ready".
The hendrix project - and its crosstown_traffic API specifically, is designed to alleviate this pain and remind that python (well, Twisted) is absolutely an enterprise-ready asynchronous network solution.
|-manage.py |-MyApp/ |---- settings.py, urls.py, wsgi.py,... etc. |-AnotherApp1 |---- urls.py, models.py, views.py, migrations/... etc. |-AnotherApp2 |---- urls.py, models.py, views.py, migrations/... etc.
This might make it not-that-suitable for actually complex projects.
EDIT: ah, looks like the formatting here did't support what I tried to do...
|-manage.py
|-MyApp/
|---- settings.py, urls.py, wsgi.py,... etc.
|-AnotherApp1
|---- urls.py, models.py, views.py, migrations/... etc.
|-AnotherApp2
|---- urls.py, models.py, views.py, migrations/..