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

IRC log for #mojo, 2014-05-31

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

All times shown according to UTC.

Time Nick Message
00:01 neyasov_ joined #mojo
00:12 gtodd joined #mojo
00:16 Adura joined #mojo
00:26 jeff joined #mojo
00:43 rem_lex|pivo joined #mojo
01:02 neyasov_ joined #mojo
01:28 jberger dotan: https://gist.github.com/jberger/5153008
01:28 jberger ^^ updated
01:53 klapperl_ joined #mojo
02:03 neyasov_ joined #mojo
02:16 stryx` joined #mojo
02:17 gtodd left #mojo
02:39 disputin joined #mojo
02:52 dj_goku_ joined #mojo
03:04 neyasov_ joined #mojo
03:15 cpan_mojo Mojolicious-Plugin-BasicAuthPlus 0.07 by BLR - http://metacpan.org/release/BLR/Mojolicious-Plugin-BasicAuthPlus-0.07
04:05 neyasov_ joined #mojo
04:27 maze joined #mojo
05:06 neyasov_ joined #mojo
06:07 neyasov_ joined #mojo
06:32 Vandal joined #mojo
06:52 dotandimet joined #mojo
07:08 neyasov_ joined #mojo
07:10 irq joined #mojo
07:25 hesco joined #mojo
07:26 hesco left #mojo
07:28 struppi joined #mojo
07:33 struppi left #mojo
07:35 eugen joined #mojo
07:48 dod joined #mojo
07:51 * marcus ponders blogging - “LWP considered harmful"
07:58 marcus Good timing with 5.0 and 5.20, for once ;)
07:59 denis_boyun joined #mojo
08:09 neyasov_ joined #mojo
08:13 marcus I agree sounds like a bug in renderstep, will look later.
08:23 denis_boyun joined #mojo
08:26 tadegenban joined #mojo
08:29 tadegenban hi, everyone , I use DBI->connect to connect mysql , does it auto disconnect after some hours ?
08:31 tadegenban should I connect  mysql every time when I want to query ?
08:35 bc547 tadegenban: use DBIx::Connector
08:36 bc547 tadegenban: there is more info about it on https://github.com/kraih/mojo/wiki/Hypnotoad-prefork-web-server
08:38 tadegenban bc547: thank you !
08:50 mire_ joined #mojo
09:10 neyasov_ joined #mojo
09:38 marty joined #mojo
10:04 d4rkie joined #mojo
10:11 neyasov_ joined #mojo
10:11 dotandimet joined #mojo
10:13 dexteruk joined #mojo
10:25 cpan_mojo Mojolicious-Plugin-TtRenderer 1.53 by PLICEASE - http://metacpan.org/release/PLICEASE/Mojolicious-Plugin-TtRenderer-1.53
10:28 d4rkie joined #mojo
10:39 marty joined #mojo
10:41 basic6 joined #mojo
10:51 alnewkirk joined #mojo
11:04 meshl joined #mojo
11:12 neyasov_ joined #mojo
11:17 punter joined #mojo
11:40 marty joined #mojo
11:48 jberger marcus: I like the idea but I think it may be unnecessarily antagonistic
11:48 jberger marcus: did you look at my branch for mojo-pg?
11:51 denis_boyun_ joined #mojo
11:58 jberger oh hey look, test failures! I used partial all over the place!
12:01 omega joined #mojo
12:04 crab hi jberger.
12:04 irq joined #mojo
12:05 jberger o/
12:12 punter Maybe Mojolicious should support this syntax, because at the moment there's no way of redirecting to an external URL with query parameters: $self->redirect_to("http://www.google.com", query => { a => 1, b => 2 });
12:12 punter ok there is a way, but not in one statement
12:14 neyasov_ joined #mojo
12:17 sugar joined #mojo
12:17 punter Docs say that 'redirect_to' takes the same parameters as 'url_for', but you can't do $self->redirect_to('http://www.google.com/')->query(a => 1, b => 2) for obvious reasons
12:23 jberger punter: you could use Mojo::URL to build it. url_for is not really intended for that
12:23 shmuel joined #mojo
12:23 punter ok
12:24 sri $self->redirect_to($self->url_for(...)->query(...))
12:24 punter thx
12:27 crab how do people handle utility scripts for their mojo projects? make them command plugins?
12:28 * sri does
12:28 crab i'm tempted to create a command plugin named exec that does the moral equivalent of carton exec blah
12:28 jberger commands are awesome
12:29 crab i.e. set PERL5LIB so that i can avoid the use lib dance in my (existing) utility scripts.
12:29 crab but of course a credible alternative is to make them all commands.
12:29 jberger crab: https://github.com/jberger/Galileo/blob/master/lib/Galileo/Command/setup.pm
12:30 jberger Galileo's setup command is a webapp in its own right, it replaces the router with its own, but still has the database and helpers from the main app
12:32 crab i see
12:32 crab btw, look for "to run" and you'll find a typo
12:32 jberger crab: yes indeed!
12:33 jberger I'll fix that while I fix the partial in there too
12:33 jberger FIX ALL THE PARTIAL THINGS!
12:33 crab FIX ALL THE THINGS PARTIALLY!
12:34 sri btw. i'm still collecting upgrade tips on the mailing list
12:34 dod joined #mojo
12:35 jberger sri: I'm sure someone mentioned partial already right?
12:35 jberger so far I think that's the only actual breakage I have seen
12:35 sri i started with that https://groups.google.com/forum/#!topic/mojolicious/PYfjHyVj26w
12:35 jberger in my code
12:35 sri i've seen 3 problems so far
12:35 * jberger really should read the mailing list more often
12:35 * jberger monitors the SO tag, isn't that enough!
12:36 sri partial, generate_port, and user agent errors
12:38 jberger yeah, forgot about UserAgent error, I'm sure I have at least one of those I need to fix too
12:39 jberger <3 github search
12:39 jberger only one!
12:39 purl hmmm... only one is at a time
12:40 crab is switching from X-Forwarded-HTTPS to -Proto "https" an upgrade tip?
12:40 crab also there's people who had defined a custom format method for MyApp::Log who (a) don't need to do that any more, and (b) if they do, it'll break.
12:41 crab you know, "people". not anyone we know or anything.
12:41 marty joined #mojo
12:41 jberger crab: :-)
12:42 jberger sri: so if I change to ->include I don't need to bump the required Mojo version number right?
12:43 crab change ->render(..., partial => 1) to include?
12:43 purl crab: that doesn't look right
12:43 sri jberger: right
12:43 crab purl: that's what i thought.
12:43 purl no idea, crab
12:44 jberger and the difference between render_to_string and include is the stash localization right? But since my code didn't need that before it should be fine
12:44 sri there is no difference anymore
12:45 crab oh.
12:45 sri https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/DefaultHelpers.pm#L38
12:45 sri helper only exists for templates now
12:46 jberger sri: I just found that
12:46 jberger but thanks
12:50 denis_boyun joined #mojo
13:03 cpan_mojo Mojolicious-Plugin-Humane 0.07 by Joel Berger - http://metacpan.org/release/JBERGER/Mojolicious-Plugin-Humane-0.07
13:04 jberger hehe, I had to do them in the right order
13:05 jberger I was going to fix Galileo first, but it failed its tests until Humane was fixed
13:07 cpan_mojo Galileo 0.034 by Joel Berger - http://metacpan.org/release/JBERGER/Galileo-0.034 (depends on Mojolicious::Plugin::Memorize)
13:10 marcus sri: I effin’ hate perl gc
13:10 sri you hate it, but you also like the benefits ;p
13:10 marcus I don’t understand why on(error => sub { $self->render_maybe or $self->not_found } -  should fail at not_found
13:11 sri in any case, i think just keeping $tx alive should be enough
13:12 sri on(error => sub { $tx; $self->render_maybe or $self->not_found }
13:12 marcus sri: Don’t you mean $self->tx ?
13:13 sri you have to assign $self->tx to something
13:13 marcus outside of the sub?
13:13 cpan_mojo Mojolicious-Plugin-PPI 0.06 by Joel Berger - http://metacpan.org/release/JBERGER/Mojolicious-Plugin-PPI-0.06
13:15 neyasov_ joined #mojo
13:15 * jberger partial-ed all the things
13:20 jberger actually, Mojo::FriendFeed isn't technically broken by the change in ->error
13:20 jberger but the callback signature is!
13:25 jberger kinda cool that I'm going to be able to fix all my 5.00 breakage without actually bumping the required version to 5.00 :-)
13:29 * sri wonders if all the remaining wantarray methods should support the ->param(['foo', 'bar']) form
13:29 sri as far as i can see it's only Mojo::Message::cookie/upload and Mojolicious::Controller::cookie/signed_cookie
13:41 marty joined #mojo
13:42 sh4 joined #mojo
13:44 good_news_everyon joined #mojo
13:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZStYA
13:44 good_news_everyon mojo/master 8184c8f Sebastian Riedel: added tests for request with cookies sharing the same name
13:44 good_news_everyon left #mojo
13:47 disputin joined #mojo
13:53 cpan_mojo Mojo-FriendFeed 0.05 by Joel Berger - http://metacpan.org/release/JBERGER/Mojo-FriendFeed-0.05
13:53 jberger hey, that time I actually finished my post-release cleanup before cpan_mojo announced!
13:54 cpan_mojo Mojolicious-Plugin-PubSubHubbub 0.12 by Nils Diewald - http://metacpan.org/release/AKRON/Mojolicious-Plugin-PubSubHubbub-0.12
13:57 jberger sri: to your question: I rarely use the cookie methods directly (I use session mostly) so I'm not sure I'm qualified to answer. That said, its kinda handy on the param method, so why shouldn't it be handy on the cookies?
13:58 oetiker joined #mojo
14:01 jberger \o/ I think I am 5.0 clean!
14:01 sri \o/
14:01 sri yea, most people don't actually use the cookie methods
14:03 crab i think it's ok ([foo,bar])
14:10 * jberger still wants to chat with marcus and dotan
14:16 neyasov_ joined #mojo
14:32 good_news_everyon joined #mojo
14:32 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/MPZn9g
14:32 good_news_everyon mojo/master 3f63548 Sebastian Riedel: get rid of warning on older versions of Perl
14:32 good_news_everyon left #mojo
14:42 marty joined #mojo
14:58 marcus jberger: I'll look at your branch now
15:01 marcus jberger: so, you need to call new_handle whenever you do something?
15:07 good_news_everyon joined #mojo
15:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/bk1opA
15:07 good_news_everyon mojo/master a0dac22 Sebastian Riedel: fixed bug where Mojo::DOM::HTML could not handle tags with lots of attributes
15:07 good_news_everyon left #mojo
15:07 sri this is a funny one!
15:08 sri before the patch the regex engine would bail out with "Complex regular subexpression recursion limit (32766) exceeded at /Users/sri/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/Mojo/DOM/HTML.pm line 119."
15:08 sri BUT
15:09 sri this is line 119 https://github.com/kraih/mojo/blob/master/lib/Mojo/DOM/HTML.pm#L119
15:11 zivester joined #mojo
15:16 jberger marcus: get_handle but close enough
15:16 jberger it either dequeues a handle or enqueues a job for later
15:17 neyasov_ joined #mojo
15:17 jberger marcus: also did you look at the packaging of Convos 0.5 yet?
15:21 sri i guess 32000 attributes is what can happen when you have broken html before some huge block of text
15:27 basic6_ joined #mojo
15:29 jberger sri: cool bug, where did you find that?
15:29 sri by accident, someone in #perl complained that Mojo::DOM was slower than treebuilder and i didn't believe him basically :)
15:30 sri everything he said was rather useless, but i've seen the 32k limit before with Mojo::JSON, so had a hunch where to look
15:31 sri same workaround in Mojo::JSON https://github.com/kraih/mojo/blob/master/lib/Mojo/JSON.pm#L140
15:32 sri the whole thing is rather freaky, not only is the line wrong, the regex engine also spews the warning and bails out, basically stops matching at that point, but doesn't die
15:34 jberger Does it happen on earlier perls?
15:34 irq_ joined #mojo
15:34 sri yes, since 5.10
15:34 purl somebody said since 5.10 was not supported since 5.14 either
15:35 sri 5.8 segfaulted (recursive engine and all...)
15:35 jberger talk to #p5p?
15:35 * sri shrugs
15:36 jberger seems like a bug to me
15:41 dexteruk joined #mojo
15:42 D4RK-PH0ENiX joined #mojo
15:42 zivester joined #mojo
15:43 sri jberger: which part?
15:43 marty joined #mojo
15:44 jberger if nothing else, the line number
15:44 sri i can't replicate the line number thing in a test case
15:46 jberger that's interesting
15:49 sri crab: when you said "i think it's ok", did you mean as it is right now, or to add the change?
15:49 crab to add the change
15:50 sri oh
15:53 skiehn joined #mojo
15:54 skiehn joined #mojo
15:54 skiehn joined #mojo
16:04 crab you don't think so/
16:06 sri not sure
16:19 neyasov_ joined #mojo
16:23 good_news_everyon joined #mojo
16:23 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/rOK0HQ
16:23 good_news_everyon mojo/master f2b6ef9 Sebastian Riedel: added multi-name support to a few more methods
16:23 good_news_everyon left #mojo
16:23 sri that covers all of the remaining wantarray methods
16:25 meshl joined #mojo
16:28 disputin joined #mojo
16:44 marty joined #mojo
16:55 nicomen do we like twigils, yay or nay?
16:57 disputin joined #mojo
17:09 sri nyay
17:10 nicomen yeah, I can't decide either
17:11 nicomen that slashdot article, just wow
17:18 sri interesting, slashdot still results in more visitors than hackernews
17:19 nicomen it was all over twitter too
17:20 neyasov_ joined #mojo
17:20 sri t.co was onlt 1%
17:20 sri 11.66% from slashdot
17:21 sri 4.09% from developer.slashdot.org
17:21 sri 2.22% from beta.slashdot.org
17:21 sri 7.74% from reddit
17:22 sri hackernews is not even listed, wonder if there is some google analytics shenenigans going on
17:24 sri 30.87% was "direct", wonder what's going on there
17:25 disputin joined #mojo
17:29 mire_ joined #mojo
17:37 sri anyway
17:38 sri marcus, tempire, jberger: you ok with the multi-name change above too?
17:39 sri that would cover all remaining wantarray methods
17:40 dod joined #mojo
17:45 marty joined #mojo
17:45 sri jamadam++ # mojo-legacy is already up to 5.01 https://github.com/jamadam/mojo-legacy
17:52 dotandimet joined #mojo
17:55 crab i realised only right this minute that carton bundle creates a fatpacked bin/carton to run on the target machine.
17:55 crab until now, i thought carton had to be installed separately before the app.
17:55 * crab smacks his head against a wall
17:57 tempire jamadam is a boss
17:58 tempire I went through the log...I'm not sure what multi-name change we're talking about.
18:01 nicomen my ($foo, $bar) = $c->cookie(['foo', 'bar']);
18:01 nicomen my ($foo, $bar) = $c->signed_cookie(['foo', 'bar']);
18:02 tempire I'm totes cool with that.
18:10 * tempire is digging reactjs
18:21 neyasov_ joined #mojo
18:24 cpan_mojo Mango 0.40 by Sebastian Riedel - http://metacpan.org/release/SRI/Mango-0.40 (depends on Mojolicious)
18:29 punter joined #mojo
18:33 sri guess it's time to remove the mojoconf ribbon (for now)
18:35 * tempire cries
18:35 sri *sob*
18:45 marty joined #mojo
18:58 jberger_ joined #mojo
18:58 * jberger_ wails
19:00 jberger_ +1 on access methods
19:00 jberger_ cookie etc
19:05 neyasov_ joined #mojo
19:11 denis_boyun joined #mojo
19:13 neyasov_ joined #mojo
19:13 stryx`_ joined #mojo
19:17 jberger__ joined #mojo
19:26 jberger mojo is still on page 2 of slashdot, that's pretty awesome!
19:28 sri wow, selector subject support is gone from the css4 selector spec :o
19:35 sri and now there's two implementation profiles... fast and complete
19:35 sri fast doesn't require :has()
19:35 sri hmm
19:36 sri which is the replacement for subject selectors http://dev.w3.org/csswg/selectors4/#relational
19:46 marty joined #mojo
19:51 bjoernfan http://vimeo.com/94502406 heh, found this as "something Futurama never covered"
20:11 jberger bjoernfan: that was good!
20:13 neyasov_ joined #mojo
20:23 sh4|2 joined #mojo
20:28 cpan_mojo Mojolicious-Plugin-RenderSteps 0.03 by Marcus Ramberg - http://metacpan.org/release/MRAMBERG/Mojolicious-Plugin-RenderSteps-0.03
20:29 sshaw joined #mojo
20:32 irq joined #mojo
20:37 sshaw any reason why the plugin generator doesn't use the mojo namespace for the top-level directory?
20:38 sshaw using only the module's basename can be a little confusing
20:38 sshaw for exampe `mojo generate plugin mail` creates a mail directory
20:40 Adurah joined #mojo
20:40 sshaw a Mojolicious-Plugin-Mail directory would be much nicer
20:47 marty joined #mojo
20:49 marcus http://www.yapcna.org/yn2014/talk/5303
20:50 marcus sshaw: I agree about that. I always rename the dirs after I use the plugin generator. Create an issue for it?
20:50 marcus You already have one +1 :)
20:58 sshaw marcus: Have an issue, no. Will create one now.
20:58 jberger is freido going to use mango? he is the maintainer of the official mongo driver
21:01 sri he has to promote the official MongoDB stuff
21:02 sri and i believe xdg is now the actual maintainer, friedo is evangelist or so
21:08 good_news_everyon joined #mojo
21:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/nL9e7g
21:08 good_news_everyon mojo/master 5aadebb Sebastian Riedel: improved Mojolicious::Command::generate::plugin to use better directory names
21:08 good_news_everyon left #mojo
21:08 sri marcus: no issues for feature requests
21:09 nicomen the more I get accustomed to the thought of doing non-blcking, the more I feel the need for a job queue of some sort, and minion makes sense. But I don't really like to have to depend on a mongodb installation, also I am thinking that the api to "bakground" something would fit inside Mojolicious.
21:09 marcus sri: Is it really a new feature tho?
21:09 sri marcus: it's not a bug
21:10 marcus sri: what's the reasoning behind the current behavior?
21:10 sri marcus: that i agree with you
21:10 nicomen That are the intentions of having minion as a separate project, and how hard/useful would it be to have a fork/process-based queue as default fallback?
21:10 sri marcus: yes, i'm making fun of you, you missed the commit above ;p
21:10 nicomen s/That/What/
21:11 marcus sri: No, I've seen it :)
21:12 sri nicomen: a job queue requires a storage backend though
21:12 nicomen yes, in this default,stripped-down version the storage would be in-process memory
21:13 sri that's totally not going to work
21:13 marcus IPC could work tho?
21:13 sri i'm sceptical
21:14 sri file storage with some serialization format is the best you can do i believe
21:14 marcus Maybe just a simple file storage with locking?
21:14 marcus Yeah
21:14 nicomen I'm not saying this is the greatest idea ever, but it might make sense to have a way to quickly get jobs working, and upgrade to a different backend driver
21:14 neyasov_ joined #mojo
21:14 marcus nicomen: yeah, but in memory is not going to work out
21:14 nicomen when you get stuff working
21:14 nicomen is minions pluggable?
21:15 sri Minion is tightly integrated with Mango and the BSON serialization format
21:15 nicomen aha
21:15 sri i believe tempire was working on pluggable storage backends for Minion
21:16 sri first of all... do we agree that Minion is the correct design for a Mojolicious job queue?
21:17 sri with the whole integration of tasks and commands stuff?
21:18 Mikey i donno how much my voice counts, but i'm planning on using it for my offline stuff
21:18 Mikey it's paired down and looks very much like mojo's cousin.  everything required, nothing feels like its forcing me into doing something in a weird way
21:18 Mikey everything that's required rather.
21:19 sri nicomen/marcus: maybe you want to join tempire in making storage backends for Minion pluggable then :)
21:19 Mikey im not a big fan of mongodb, but only because i was losing my mind trying to create an ORM for it.
21:19 Mikey (thanks to those who are working on that now)
21:19 marcus sri: I might.
21:20 sri i'm open to the idea of getting it into core once that is done
21:20 marcus sri: I can’t see that he has published anything yet tho
21:20 Mikey i will probably only use it to handle / process back end jobs, but pretty much all of the federation work i do will be done with minion/mango
21:21 sri the tricky part is really to find a way of mapping those time/priority/... queries onto files
21:21 marcus Just noticed tempire has used the grumpify app on his github avatar :)
21:21 sri Mikey: let me know how it works out
21:22 Mikey i wrote a file based IDM system for my employer in 2006 or so.. all LDIF files, there are currently over 90 million of them, and only amazing btree indexed filesystems can even handle that setup
21:22 Mikey it's pretty much a job processing queue, all perl, and Minion has pretty much all the base functionalities i'd need to recreate it so..
21:23 Mikey just like i ditched my homemade web framework for mojo, i'm planning on ditching that rats nest for minion
21:23 Mikey sri: will do.
21:23 marcus sri: btw, have you looked into 0mq at all? Some people I like are into it.
21:23 Mikey demo.academicaportal.com has zeromq on the backend
21:24 Mikey i marry zmq and the IOLoop
21:24 nicomen wow
21:24 Mikey it's getting us medium scalability
21:24 marcus nicomen: wow mom wow?
21:25 Mikey it's worked out very nicely.  allows me to scale my message bus horizontally, though since there's no multicast on AWS it's using all my ephemeral tcp socket ports
21:25 sri marcus: briefly, it's more of transport layer than a message queue
21:25 Mikey it's very very dead simple.  its aim is to behave like a socket.
21:26 Mikey but what you write into that socket conforms to a configured pattern
21:26 marcus a pubsub socket
21:26 Mikey yeah i use pubsub, but there are many other models that zmq supports
21:27 marcus looking at the wikipedia talk as we chat :)
21:27 marcus s/talk/page/
21:27 Mikey yeah and i will say that the zeromq docs are some of the better docs out there
21:27 Mikey the docs in the perl module suck, so it's best to just use the low level c wrapper interface and just use their interface
21:28 * marcus just installed rustc, because sri
21:28 sri heh
21:28 Mikey you think they'll ever make a non blocking DBI?
21:29 Mikey (oh and DBIx::Class)
21:29 nicomen marcus: http://rustc.com/ - for your wife?
21:29 marcus nicomen: nope - https://www.google.com/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=rustc&amp;safe=off
21:30 sri Minion is only 300 SLOC btw., so really not that hard to get into :)
21:30 marcus mikey: DBD::Pg can do non-blocking, I and jberger have a Mojo::IOLoop hookup in progress
21:30 nicomen https://metacpan.org/pod/Mojolicious::Plugin::PgAsync ?
21:31 Mikey all my queries are DBIx::Class
21:31 Mikey though i could do some queries non blocking for sure
21:32 Mikey pretty much any query inside of the websocket loop needs to be nonblocking
21:32 Mikey or it's gonna gimp my clients-per-process quite a bit
21:33 Mikey i might swing my axe at minion as i build out our federation stuff
21:33 Mikey see if i can help out
21:35 * sri wonder if there are actually any good job queues with pluggable storage backends
21:35 marcus sri: I read through it, it seems it shouldn’t be that hard to make it pluggable
21:36 sri ah, celery from python does it
21:38 Mikey i'd definitely help with making it pluggable.  i have experience with complex filesystem data storage, but eventually you need an index, and damn if berkdb isn't finicky.
21:38 marcus A fellow Norwegian works on that afaik
21:38 nicomen ask hehe, ex-collegue of mine
21:38 nicomen I think he landed his current job after making that
21:38 nicomen he was hardcore perl-er before
21:38 sri Mikey: also no external deps for the file backend
21:38 Mikey that's a fun constraint ;)
21:39 sri that's the whole point of having a file backend ;)
21:39 Mikey i could make a file based index
21:39 marcus DB_File is a core module right?
21:39 Mikey though, unlike LDIP we only care about work we have to do not about work that's been done
21:40 marcus wow, perldoc.perl.org 503
21:40 Mikey my IDM lets me rewind an account to any point in time for audit purposes
21:40 Mikey and keeps detailed logging info about everything it did
21:40 marcus mikey: Yeah, we only care about unprocessed and failed jobs
21:41 marcus sri: DB_File really seems like the easiest way? :)
21:41 Mikey i have pretty much 4 states, completed, failed, paused (waiting for time to pass or some other external event to happen), and queued for processing
21:41 sri marcus: never used it
21:42 Mikey it would be nice to have the ability to have an audit trail.. maybe a plugin though
21:43 sri Minion has an audit trail
21:43 sri there's timestamps for everything atm.
21:44 Mikey cool
21:44 jberger sri: no pure-perl optional dependency?
21:44 * jberger likes DBM::Deep
21:44 sri jberger: no
21:44 sri jberger: this is about a default file storage backend that just works everywhere
21:45 jberger IIRC DB_File still requires an external dependency
21:45 sri i wouldn't be surprised
21:45 jberger DBM::Deep is a very solid CPAN module, pure-perl
21:45 Mikey DBM::Deep looks neat.
21:46 sri i think the best you might be able to do is a Storable file with a lock
21:46 marcus DB_File is a core module tho
21:46 jberger DB_File is core, berkley db library is not
21:46 marcus it’s just shipped with all the unixes out there?
21:46 sri if DB_File just worked i think we would see it get used more often ;p
21:47 Mikey every time i've used DB_File in production, i've regretted it.
21:47 * sri has never used it though, so no evidence
21:47 sri anyway, first step is to abstract out the MongoDB storage layer
21:47 Mikey it's just that berkdb's need to be handled in the right ways all the time
21:48 Mikey or they get corupted
21:48 marty joined #mojo
21:48 Mikey corrupted*
21:48 sri Celery seems to go very key/value store https://github.com/celery/celery/tree/master/celery/backends
21:49 marcus Mikey: I’ve had that experience too with Berkley LDAP backends
21:50 Mikey *nod*.  OpenLDAP DBs and earlier ns-slapd DBs were so brittle
21:50 good_news_everyon joined #mojo
21:50 good_news_everyon [mojo] kraih tagged v5.02 at cf23bb6: http://git.io/xNEjLw
21:50 good_news_everyon left #mojo
21:51 * jberger remembers his mojopaste gist: https://gist.github.com/jberger/5701774
21:51 Mikey sri: key-value is damn near perfect for job processing.  if a sub handler needs to stash something in a job it can always just serialize a more complicated data structure and store it as a value
21:52 good_news_everyon joined #mojo
21:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/LlcQIg
21:52 good_news_everyon mojo/master e8f341a Sebastian Riedel: bump version
21:52 good_news_everyon left #mojo
21:52 Mikey im gonna read more minion.. and have another mojito.  be back in a few
21:52 cpan_mojo Mojolicious 5.02 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-5.02
21:52 jberger oh man, mojitos should really be the official drink of Mojolicious
21:53 jberger they are tasty and they have the right letters
21:53 sri well, Minion exploits some benefits of document databases to implement delayed jobs and priorities
21:53 sri those will be harder with pure key/value stores
21:54 sri might be worth starting from zero again, and design everything with less assumptions about the storage layer
21:56 meshl joined #mojo
21:57 sri i do really like having delayed jobs and priorities though
21:59 riche it's either you have jobs with metadata carried with them, or you will need a manager keeping tabs on them
22:00 riche I like the former better, but it limits backend options
22:02 riche another option is to have separate queues that infer priority and state, which isn't too bad either
22:02 Mikey yeah in my file based system every job in the queue has both a metadata file and the actual file being processed.  the metadata file is for note taking and auditing, and the file being processed is changed as it works its way through the various handlers
22:03 sri this is really hard work, i get the feeling it won't work out ;p
22:03 Mikey i don't get that feeling at all.
22:04 Mikey i don't think we should scrap it / start over either.
22:04 jberger for DBM::Deep, the only things that scares me are the more complex queries
22:05 neyasov_ joined #mojo
22:05 jberger but a lot of that sorting and filtering could just be in the Perl process rather than the query (which is basically how DBM::Deep would always work)
22:06 jberger if all the Mango calls were abstracted into their own little methods, I think I would quite easily make a DBM::Deep backend
22:09 jberger also, for those looking at 0mq above (I forget who it was)
22:10 jberger look at ZMQ::FFI on CPAN
22:10 jberger cool stuff
22:10 riche whatever is chosen imo making certain there's little to none chance for message loss should be priority
22:12 Adurah_ joined #mojo
22:38 sri making it solid is the most important goal imo
22:39 sri with Minion i've used extremely defensive queries everywhere
22:40 sri the one thing that's missing is time limits for jobs
22:40 sri that's a bit tricky to do portably
22:42 maze joined #mojo
22:46 punter joined #mojo
22:48 marty joined #mojo
23:01 Jonis jberger: there was a surprisingly low number of cocktails at mojoconf actually, I vote for making Mojito the official drink as well :D
23:06 neyasov_ joined #mojo
23:09 neyasov__ joined #mojo
23:18 d4rkie joined #mojo
23:21 neyasov__ joined #mojo
23:29 shmuel joined #mojo
23:46 tempire I think it's an ok design.
23:46 tempire I don't have any other ideas about it.
23:47 * tempire hasn't messed with work queues much
23:49 marty joined #mojo

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