Background task queue in ChicagoBoss

36 views
Skip to first unread message

Miguel Benitez

unread,
Jan 27, 2015, 5:58:44 PM1/27/15
to chica...@googlegroups.com
Hi community,

I have a function that takes a long time to run, so I'd like to execute it in the background, I wonder if there is something like http://www.celeryproject.org/ in chicagoboss?

Any help is appreciated

emacstheviking

unread,
Jan 27, 2015, 6:04:29 PM1/27/15
to chica...@googlegroups.com
Why can't you just use a gen_server with an asynchronous callback?

create your gen server, when you need your background processing, use send_event/2 on it and then let it rip... your main process need only have a receive loop in it somewhere and that should do it.

Otherwise if it is a *big* requirement you might use boss_mq as a simple work queue but again the same principle will apply. And there there is RabbitMQ for the big jobs. I love Rabbit! Even as a vegetarian. :)

Is this is response to a web request though??? That could be interesting because you would either have to use a keep-alive (web socket) or once processing is complete, use a POST back to the caller but then the caller needs to be listening for it which means tagging each request with a unique ID etc etc

I like being a systems architect!  ROFLCOPTER etc.

Hope that helps a bit... ask more detailed questions if you like.

Sean.


--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/1a753622-7432-4a00-bd62-5779187509fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

emacstheviking

unread,
Jan 27, 2015, 6:05:37 PM1/27/15
to chica...@googlegroups.com
https://www.rabbitmq.com/tutorials/tutorial-two-python.html

That might provide some food for thought maybe adapted to boss_mq or something?!

Miguel Benitez

unread,
Jan 28, 2015, 12:20:02 PM1/28/15
to chica...@googlegroups.com
Thanks Sean, i'll give it a try and let you know de results.

Dmitry Polyanovsky

unread,
Jan 28, 2015, 4:58:35 PM1/28/15
to chica...@googlegroups.com
You can use boss_news to run actions if some data changes. also, there is built-in queue called boss_mq, so you can use it for simple tasks without adding any external libraries.
Reply all
Reply to author
Forward
0 new messages