The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-07-07

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:19 Averna joined #mojo
00:24 btyler joined #mojo
00:27 R0b0t1 I'm panicking.
00:27 Adura Hi panicking.
00:31 sri o/
00:35 * Phil21 panics too
00:37 sri http://www.anxietysymptomsdr.com/wp-content/uploads/2012/11/panic-attack-symptoms.png
00:55 laouji joined #mojo
00:57 dabudabu joined #mojo
01:13 * sri started another wishlist thread https://groups.google.com/forum/#!topic/mojolicious/mIRRwNwDLSE
01:13 * sri panics
01:17 dabudabu A flight simulator-type of easter egg would be nice
01:17 bpmedley joined #mojo
01:26 sri +1
01:26 purl 1
01:29 jberger +1
01:29 purl 1
01:29 jberger purl, you're getting repetitive
01:29 purl jberger: what?
01:42 preaction 1+1
01:44 purl 2
01:44 preaction better
01:47 hlin joined #mojo
01:47 klapperl joined #mojo
01:52 mire joined #mojo
02:59 KCL joined #mojo
03:00 jhg joined #mojo
03:13 basic6_ joined #mojo
03:17 cpan_mojo Statocles 0.019 by Doug Bell - http://metacpan.org/release/PREACTION/Statocles-0.019 (depends on Mojolicious)
03:18 bayashi joined #mojo
03:27 neyasov joined #mojo
03:57 laouji joined #mojo
04:00 laouji joined #mojo
04:04 laouji joined #mojo
04:14 laouji joined #mojo
04:40 irq joined #mojo
05:27 laouji joined #mojo
06:00 Insane all, if using Mojolicious classic, shoul I have all my helpers under startup {} sub? Or I could tell Mojo to import them from another script file?
06:06 denis_boyun joined #mojo
06:07 Negor joined #mojo
06:08 crab you could put them all in a plugin and ->plugin() the plugin
06:17 Eke- joined #mojo
06:18 denis_boyun joined #mojo
06:22 sujithm joined #mojo
06:25 Lee joined #mojo
06:32 chankey joined #mojo
06:38 denis_boyun joined #mojo
06:47 dod joined #mojo
06:47 Vandal joined #mojo
06:53 Dandre joined #mojo
06:54 rawler joined #mojo
06:59 Insane ok, so I have a helper and wish to use it outside Mojo app, by calling $something->helperName(). Could I?
07:01 dpetrov_ joined #mojo
07:11 irq joined #mojo
07:14 _eugen joined #mojo
07:24 trone joined #mojo
07:29 eseyman joined #mojo
07:40 igorsutton joined #mojo
07:43 neyasov joined #mojo
08:09 denis_boyun joined #mojo
08:23 fhelmber_ joined #mojo
08:35 voegelas joined #mojo
08:38 edestler joined #mojo
08:49 basiliscos joined #mojo
08:50 voegelas joined #mojo
09:21 dotan joined #mojo
09:24 meshl joined #mojo
09:33 neyasov joined #mojo
09:34 dod joined #mojo
09:35 mishantil Insane: if it doesn't use app-specific stuff then you whould be fine. A simple `use My::Magic::Helper; My::Magic::Helper->help_me('naw!');` has worked for me in the past.
09:36 mishantil s/who/sho/
09:44 mire joined #mojo
09:45 sujithm joined #mojo
09:45 denis_boyun joined #mojo
09:53 sujithm joined #mojo
11:12 voegelas joined #mojo
11:38 fhelmber_ joined #mojo
11:40 circ-user-tw7Mx joined #mojo
11:43 circ-user-tw7Mx exit
11:51 mattastrophe joined #mojo
11:53 mr-foobar joined #mojo
12:11 neilhwatson joined #mojo
12:18 batman jberger: what do you think about this: http://home.thorsen.pm/private/raw/notverysecret/convos-conversation-selector-91.ogv
12:21 laouji joined #mojo
12:36 d4rkie joined #mojo
12:37 d4rkie joined #mojo
12:39 Kripton joined #mojo
12:56 d4rkie joined #mojo
13:22 sujithm_ joined #mojo
13:22 denis_boyun_ joined #mojo
13:38 btyler joined #mojo
13:48 sri looks like mojolicious is done and there is nothing more to add :)
14:06 mire joined #mojo
14:06 lipizzan joined #mojo
14:07 bluescreen joined #mojo
14:10 torbjorn nicne
14:10 torbjorn -n
14:11 avkhozov joined #mojo
14:20 mattastrophe joined #mojo
14:24 avkhozov Hi
14:24 purl hi, avkhozov.
14:24 avkhozov I have a feature request for Minion. Sometimes I need to restart job with a time delay (like a "release with delay" method in beanstalkd job queue)
14:25 neyasov joined #mojo
14:25 avkhozov This functionality will be useful for others?
14:26 avkhozov For example, $job->restart({delay => 10});
14:32 sri just make a new job
14:32 sri restart is for failed jobs
14:37 avkhozov Yes, for now I use this workaround. But it seems in the kernel it would be more logical.
14:40 sh4 joined #mojo
14:43 avkhozov Sorry, I didn't understand at once about restart. So new job remains the only one way for restart with delay.
14:48 disputin joined #mojo
14:52 tempire sri: You've been saying that for a year :)
14:59 sri avkhozov: it's not a workaround, that's how it's supposed to work
14:59 sri tempire: but this time i'm serial!
14:59 KCL_ joined #mojo
15:00 sri avkhozov: actually, i think i'm going to rename ->restart to ->retry
15:00 avkhozov sri: Yes, I understand. Thanks for the explanation.
15:19 sri https://github.com/kraih/minion/commit/b6a5f422c61c8afe90f632fd18304913963009da
15:21 mikegrb Has there been a blog post for minion? I didn't realize it existed and am sad.
15:21 sri it was part of the 5.0 announcement
15:21 sri but it's still experimental
15:22 stephanj sri: was there any progress with job return values(decoupled from job notifications)?
15:22 sri i officially introduced minion at mojoconf
15:22 sri stephanj: yes, they are not going to happen
15:23 stephanj okey
15:23 mikegrb k, so it's my fault from not peering out from under my rock well enough
15:23 stephanj is there a way to get a list of jobs which got removed due to garbage cleanup?
15:23 sujithm joined #mojo
15:24 sri it wouldn't be used correctly, and since minion is integrated s tightly into mojolicious, you'll always have your model layer to store stuff... so it's not useful enough
15:24 sri stephanj: the point of garbage collecting jobs is to get rid of them ;p
15:25 stephanj yea, some hook would be cool so i can also clean them out in my model :) saves one step
15:26 sri that would be terrible
15:27 sri garbage collection runs every now and then in the manager process... if you tied arbitrary code to it things would get chaotic
15:27 stephanj ah sorry
15:27 stephanj i thought its something you would need to call yourself from time to time
15:27 stephanj if it runs automatically, never mind :)
15:28 sri it currently runs whenever a worker is started
15:28 stephanj ok
15:28 sri or when someone calls $minion->repair
15:46 meshl joined #mojo
15:50 disputin joined #mojo
15:59 cpan_mojo Minion 0.29 by Sebastian Riedel - http://metacpan.org/release/SRI/Minion-0.29 (depends on Mojolicious)
16:00 sri i kinda hate to make the worker command more complicated, but running repair in regular intervals has to be done :/
16:01 sri *sob* https://github.com/kraih/minion/commit/f17a638957af7e4714fb15d5c3465af858bf9393#diff-4f1352738326b0ddc1f87e0767a0c9e3L12
16:09 btyler_ joined #mojo
16:14 basiliscos joined #mojo
16:21 mire joined #mojo
16:21 abra joined #mojo
16:29 denis_boyun joined #mojo
17:11 rem_lex|pivo joined #mojo
17:19 r0b3rt joined #mojo
17:24 DaniBunny joined #mojo
17:44 dod joined #mojo
17:56 dotandimet joined #mojo
18:00 Mikey has there been any thought put to getting workers to not poll?  isn't there a mangodb event or a filesystem event we could be watching for?
18:01 Mikey for the time being i trim that sleep 5 to a Time::HiRes::sleep 0.1
18:01 Mikey on my macbook pro it only uses 1% of cpu with that rapid polling.  a fair trade for instant processing imo.
18:03 Mikey on the good news front, i now can do all my non blocking work inside of workers, and using zmq i can alert connected websockets that their data's ready and ship it over the websocket
18:06 dod joined #mojo
18:10 Mikey inotify would tie us to linux, but.. mongodb, we could watch the log i guess..  *sigh* no perfect system.
18:12 Mikey and btw job return values are easy enough to build on top of minion.  personally i like the underlying system to be simpler, it's more mojolicious that way.
18:13 sri Mikey: notifications went out the window when we went with multiple backend support
18:14 Mikey i guess i could write my own worker command.  in fact, i think that's what i'm gonna do for now, and i'm going to go back to the File backend and use inotify if i detect linux, and i'll use an aggressive sleep() if i detect anything else
18:14 sri 0.1s sleep is a terrible terrible idea
18:14 sri a hundred workers all pulling from the database every 0.1 seconds...
18:15 Mikey i won't ever have that many.  the workers just fork() themselves per job anyway, non?
18:15 Mikey and i agree that'd be a terrible situation
18:16 Mikey so is your solution to just create a bunch of workers started at an offset?  so one or more workers is always polling the queue at one time or another?
18:16 sri if you want instant results i believe you might be using job queues wrong
18:17 Mikey i'm using them differently.  i'm not quite sure it's wrong (yet).
18:17 Mikey and i don't want /instant/ results, per se, i just want them faster.
18:19 sri mongodb has native pub/sub support btw. and minion supported it for instant job processing a few weeks back
18:19 Mikey i thought that was still the case so i went through the trouble of going from the File backend to MongoDB and set up mongodb
18:19 Mikey only to find that it was gone (or that i was imagining things)
18:20 Mikey at least i know i'm not crazy.
18:20 Mikey (says the guy who's doing sleep 0.1)
18:21 sri actually i'm rather disappointed with pluggable backend support... so far we have no 3rd party backend and no feedback whatsoever... i might go back to only supporting mongodb if that doesn't change soon
18:21 Mikey if you did that, it'd make my design decisions for me.
18:21 Mikey i don't mind bundling mongo as a requirement for this
18:21 Mikey a small db only used for minion pretty much
18:22 Mikey they build their own binaries, and they're clean and sane... it's not a big deal to include
18:23 sri jberger and tempire were pushing for pluggable backends... but don't seem interested anymore
18:24 Mikey i was originally in support of them, too, but if marrying minion to mongo gives us sane, cross platform event based processing...
18:25 Mikey think about the requisite complexity of implementing event based processing for an arbitrary number of backends
18:25 sri actually it doesn't (yet), pub/sub in mongodb is kinda broken atm. it burns cpu like crazy
18:25 Mikey it's daunting.  i mean, for my little neck of the woods i could write an inotify based one for ::File.. but if that choice is looming i'm gonna just wait
18:26 Mikey i want to tie my wagon to yours, it's made sense thus far.
18:26 Mikey oh
18:27 sri ah right, this was the patch https://github.com/kraih/minion/commit/5a6d04ae52d5d9344168f8bb4d5052e303c48529
18:27 Mikey well okay, for the time being, what do you think about making the worker command detect the configured backend?  or allow you to specify a backend?  and move the backend-specific polling code into the backend module itself?
18:28 Mikey and if nothing's specified it just defaults to sleep 5;
18:28 Mikey so when you used this code, mongodb burned cpu like crazy?
18:29 sri the worker command having to know about the backend is very very bad design
18:30 sri honestly... i'm a little tired of this... the patch is there... feel free to experiment with it yourself and report the results
18:30 Mikey thanks :)
18:33 sri you should actually be able to patch the backend only without having to modify anything else
18:33 sri the dequeue will just wait a bit then
18:39 sri Mikey: if you can clean it up and make everything work i'm willing to give it another try, maybe move the sleep 5 stuff into the backend... as in have the backend guarantee that ->dequeue doesn't return right away
18:39 sri maybe require an argument like ->dequeue(5)... meaning "wait for up to 5 seconds"
18:40 Mikey *nod* that makes good sense.
18:41 Mikey alright i'm gonna patch this stuff in and continue testing
18:41 Mikey IAW for a bit
18:43 crab in another world?
18:46 davido_ joined #mojo
18:47 mire joined #mojo
19:06 meshl joined #mojo
19:11 Mikey sri: it's much more performant with the patch, but as you said, mongodb is using a bunch of CPU
19:18 kyshtynbai joined #mojo
19:19 sri i guess the future proof thing to do would be to move the sleep 5 into the backend dequeue method... then alternative backends could figure out their own way to wait
19:20 sri you could have your own Minion::Backend::FasterMango class
19:21 Mikey *nod* i'd probably end up using this setup.
19:22 Mikey even tho it's using a bit of cpu, it's not that aggressive, and being that my mongodb is only used for minion, it's a fair tradeoff.. something like 4% cpu for realtime processing
19:35 Mikey so are you any closer to a decision on alternative backends?  if not, i still want to try the inotify worker and see how it and the File backend stack up to this tailable cursor based solution
19:47 tempire I thought we already had pluggable backends for minion
19:50 lipizzan is there somewhere I can find a list of "keywords\methods following $ua and $tx objects?   e.g..       ->req->url->clone->to_abs;   ... or whatever?
19:52 Mikey req is Mojo::Message::Request, url is a Mojo::URL in the context of its parent request
19:53 Mikey so.. in the documentation of the respective class you will find descriptions of the methods
19:54 Mikey it's a bit of a rabbit hole, but usually when a method is referring to another class the docs are good about putting a link to that class in the description of that method
19:57 Mikey also, it looks like these mongodb performance issues are on the verge of being fixed, there are some platform specific patches in the wild that fix them now.
19:57 neyasov joined #mojo
19:59 DaniBunny joined #mojo
20:06 neyasov_ joined #mojo
20:16 harvested joined #mojo
20:31 jnbek joined #mojo
20:40 cpan_mojo Mojolicious-Plugin-AssetPack 0.16 by Jan Henning Thorsen - http://metacpan.org/release/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.16
20:58 denis_boyun joined #mojo
21:12 denis_boyun_ joined #mojo
21:14 denis_boyun joined #mojo
21:19 denis_boyun_ joined #mojo
21:22 basiliscos joined #mojo
21:40 meshl joined #mojo
21:47 neyasov_ joined #mojo
22:02 disputin joined #mojo
22:40 nishttal2 joined #mojo
22:41 jmmills joined #mojo
22:48 d4rkie joined #mojo
23:07 d4rkie joined #mojo
23:31 btyler joined #mojo
23:50 janus joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary