A job queue for Mojolicious

332 views
Skip to first unread message

sri

unread,
Mar 27, 2014, 10:04:03 PM3/27/14
to mojol...@googlegroups.com
Since the topic keeps coming up pretty regularly around here, my latest project might be of interest to some of you.


The idea is to build a minimalistic resque inspired (but Mango based) job queue, that's very tightly integrated into Mojolicious and therefore easy to learn.

--
sebastian

Jonathan Otsuka

unread,
Mar 27, 2014, 10:19:48 PM3/27/14
to mojol...@googlegroups.com
Thanks! I am super excited to try it out!

Jonathan Otsuka
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

sri

unread,
Apr 1, 2014, 11:11:52 PM4/1/14
to mojol...@googlegroups.com
Minion is still experimental, but i don't expect too many big changes anymore, the 0.05 release should be ready for testing. Certain bigger features like a REST API are still planned, but will have to wait until after Mojoconf.

--
sebastian

Luc Didry

unread,
Apr 2, 2014, 3:12:09 AM4/2/14
to mojol...@googlegroups.com
In the README, you say that it is a "A Mango job queue for the
Mojolicious real-time web framework." but it seems to that it could be
used for any other job queue purpose.

Am I right ?

PS: it seems to be a great new tool :-)
--
Luc
http://www.fiat-tux.fr/
Internet n'est pas compliqué, Internet est ce que vous en faites.

signature.asc

sri

unread,
Apr 2, 2014, 8:07:43 AM4/2/14
to mojol...@googlegroups.com, l...@didry.org
In the README, you say that it is a "A Mango job queue for the
Mojolicious real-time web framework." but it seems to that it could be
used for any other job queue purpose.

Not sure what you mean by that, does the current description imply certain limitations i'm not aware of?

--
sebastian 

sri

unread,
Apr 2, 2014, 8:40:37 AM4/2/14
to mojol...@googlegroups.com
Certain bigger features like a REST API are still planned, but will have to wait until after Mojoconf.

Since the REST API has to wait, Minion will use a command for now, suggestions for making the output more pretty would be very welcome.


--
sebastian 

sri

unread,
Apr 2, 2014, 12:41:57 PM4/2/14
to mojol...@googlegroups.com
Since the REST API has to wait, Minion will use a command for now, suggestions for making the output more pretty would be very welcome.

After some IRC discussions this is what we ended up with, still rudimentary, but i think it gets the information across.


There's also new options for managing jobs.


--
sebastian 

Andrey Khozov

unread,
Apr 4, 2014, 9:25:17 AM4/4/14
to mojol...@googlegroups.com
Thanks for cool job queue!

Do you have a plan to add non-blocking API for Minion? (at least for enqueue, so you can using Minon in non-blocking Mojolicious projects)
Do you have a plan to add capabilities to daemonize workers?​


--
Andrey Khozov

sri

unread,
Apr 4, 2014, 10:08:10 AM4/4/14
to mojol...@googlegroups.com, avkh...@googlemail.com
Do you have a plan to add non-blocking API for Minion? (at least for enqueue, so you can using Minon in non-blocking Mojolicious projects)


Do you have a plan to add capabilities to daemonize workers?​

Not sure yet, but i've recently made some changes in Mojolicious that would make it a trivial addition.


--
sebastian

Andrey Khozov

unread,
Apr 4, 2014, 10:12:08 AM4/4/14
to sri, mojol...@googlegroups.com

On Fri, Apr 4, 2014 at 8:08 PM, sri <kra...@googlemail.com> wrote:
Do you have a plan to add non-blocking API for Minion? (at least for enqueue, so you can using Minon in non-blocking Mojolicious projects)

Already done. :)

​Thank you very much!​ :)

--
Andrey Khozov

Ben van Staveren

unread,
Apr 4, 2014, 10:13:56 AM4/4/14
to mojol...@googlegroups.com
On 04/04/2014 09:08 PM, sri wrote:
>> Do you have a plan to add non-blocking API for Minion? (at least for
>> enqueue, so you can using Minon in non-blocking Mojolicious projects)
>>
> Already done. :)

sri++

sri

unread,
Apr 4, 2014, 4:48:55 PM4/4/14
to mojol...@googlegroups.com, avkh...@googlemail.com
Do you have a plan to add capabilities to daemonize workers?​

Not sure yet...

Two more points i'm a little unsure about.

a) Events for extensions... so far i've only added very basic ones.


b) Job timeouts... killing the forked process really sucks to do portably, so maybe just a SIGALRM based timeout that emits an event.

    $job->on(timeout => sub {
      my ($job, $child_pid) = @_;
      kill 'KILL', $child_pid;
    });

--
sebastian

Luc Didry

unread,
Apr 4, 2014, 6:02:18 PM4/4/14
to mojol...@googlegroups.com
It seems I don't receive all the messages of this mailing-list… I just
saw your answer on the google groups web interface :( (EDIT : and I
finally got it right now, two days later)


Well, this is how I understand the description: the mongoDB url as
argument to the plugin seems to tell "use minion only if you use mongoDB".

But since you don't use Mango in the minion's task in the example, it
seems that you can use Minion for any purpose, not only Mango-related
actions.

It's just a little confusing.

The real question I wanted to ask is : do I need a mongoDB connection
for Minion ?
signature.asc

sri

unread,
Apr 4, 2014, 6:41:47 PM4/4/14
to mojol...@googlegroups.com, l...@didry.org
The real question I wanted to ask is : do I need a mongoDB connection
for Minion ?

You do, Minion only works with MongoDB.

--
sebastian
Reply all
Reply to author
Forward
0 new messages