Re:Funding Django is not an act of charity, it's an investment
by mrfusion on Tuesday February 09, 2016 @10:04AM
(#11065715)
I'd like to see something like celery built in. But easier to use and doesn't need a separate db. Is it possinlble to fund that like south was?
[ Parent
| on HN ]
Re:Funding Django is not an act of charity, it's an investment
by piquadrat on Tuesday February 09, 2016 @10:39AM
(#11065961)
Django Channels, which is slated for inclusion in one of the next Django releases, covers at least some of the use cases you'd traditionally use Celery for, specifically running code after returning a response. It does require Redis for this though.
Re:Funding Django is not an act of charity, it's an investment
by mrfusion on Tuesday February 09, 2016 @11:34AM
(#11066457)
Neat! I couldn't find an example of doing a background task from a view with channels. Any ideas?
Re:Funding Django is not an act of charity, it's an investment
by passwert on Tuesday February 09, 2016 @10:19AM
(#11065819)
Out of curiosity: How would you do that - "easier" and without separate DB?
Re:Funding Django is not an act of charity, it's an investment
by mrfusion on Tuesday February 09, 2016 @10:30AM
(#11065898)
Not require everything to go into a tasks.py file. And I don't see why such a system can't use the existing db?
Re:Funding Django is not an act of charity, it's an investment
by jMyles on Wednesday February 10, 2016 @03:35PM
(#11075762)
If "something like celery built in" means a tool that runs Django as a network service in a concurrent context, with APIs to allow asynchronous processing of tasks, you might want hendrix, which serves Django on Twisted:
https://github.com/hendrix/hendrix
(Others have pointed to django-channels, for which hendrix may eventually evolve into a backend)
Re:Funding Django is not an act of charity, it's an investment
by shabda on Tuesday February 09, 2016 @10:56AM
(#11066091)
Are you looking for something like https://github.com/andrewgodwin/channels
Re:Funding Django is not an act of charity, it's an investment
by fleetfox on Tuesday February 09, 2016 @10:46AM
(#11066007)
Isn't celery plug and play nowadays? If you need a something simpler take a look at django-rq. I don't think a serious job queue is possbile with RDBMS as backend.
Re:Funding Django is not an act of charity, it's an investment
by mrfusion on Tuesday February 09, 2016 @11:35AM
(#11066467)
What's so special about a job queue that it can't use an rdbms? I never understood that.
Re:Funding Django is not an act of charity, it's an investment
by rajivm on Tuesday February 09, 2016 @12:18PM
(#11066895)
One reason: Most RDBMS's aren't designed for "waiting for newly queued items". You literally have to have each worker poll at some time interval for new items: `SELECT * FROM jobs WHERE status = 'new'`, transactionally claim the job, and if a worker dies, un-claim it. It's not that it's not possible to use an RDBMS and work around these problems, but generally, it won't lead to the most scalable and robust solution for the problem. Message brokers / AMQP are better designed for this problem set. If you have a small site, with a low volume queue, your RDBMS might be just fine though.
Re:Funding Django is not an act of charity, it's an investment
by houzi on Wednesday February 10, 2016 @02:10AM
(#11071198)
This is not the case if you're using Postgres, which will signal/notify listening clients, instead of having the clients poll for changes.
Re:Funding Django is not an act of charity, it's an investment
by anentropic on Tuesday February 09, 2016 @12:03PM
(#11066758)
are you asking why RabbitMQ exists?
Re:Funding Django is not an act of charity, it's an investment
by LaurensBER on Tuesday February 09, 2016 @12:29PM
(#11066996)
Yeah, or any documentation that explains the fundamental differences. I get that it's required and I can see the advantages for large scale operations but I never understood why you can run a simpel DB backend for small scale setup.
Just trying to learn here!
Re:Funding Django is not an act of charity, it's an investment
by fleetfox on Tuesday February 09, 2016 @12:49PM
(#11067140)
You can use relation database but sane implementation is ugly and doesn't scale. There is little reason to choose bunch complexity and unpredictable behavior over dedicated queue dependency. Sorry, i don't have any good material on the topic. Maybe you can use this to see how RDBMS implementation looks and what are the consequences. https://brandur.org/postgres-queues