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

IRC log for #mojo, 2016-01-23

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

All times shown according to UTC.

Time Nick Message
00:29 vicash hello. i am having this weird bug that i cannot figure out how to debug. In the startup() function I add a custom validator using add_check(is_email => sub { return  (Email::Valid->address($_->[2]) ) ? $_->[0] : undef); }) . However, this check always passes even for arbitrary strings when I am validating an Email parameter on form submission. When I run the same subroutine without Mojo, it works.
00:31 sri $_->[0]
00:32 vicash sri: i simplified the sub to look like this sub { my ($validator, $name, $value) = @_; return $validator if Email::Valid->address($value); return undef;}
00:33 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Adding-form-validation-checks
00:33 vicash sri: yes i looked at that and based my example off of that.
00:34 vicash oops
00:34 sri first sentence
00:36 vicash sri: much thanks !
00:42 good_news_everyon joined #mojo
00:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vzwgw
00:42 good_news_everyon mojo/master 0cab62d Sebastian Riedel: avoid misleading descriptions
00:42 good_news_everyon left #mojo
00:47 lluad joined #mojo
01:00 jontaylor joined #mojo
02:46 absolut_todd joined #mojo
03:26 gryphon joined #mojo
03:39 cpan_mojo Mojo-Pg-2.18 by SRI https://metacpan.org/release/SRI/Mojo-Pg-2.18
03:40 cpan_mojo Minion-4.04 by SRI https://metacpan.org/release/SRI/Minion-4.04
03:44 noganex_ joined #mojo
03:56 Averna joined #mojo
03:59 binlei joined #mojo
04:01 dj_goku joined #mojo
04:01 lsm joined #mojo
04:01 dj_goku sri: around?
04:03 Averna joined #mojo
04:03 sri dj_goku: yes
04:04 Averna joined #mojo
04:11 dj_goku sri: hey, I left my comment on the minion issues. Not sure if that is helpful or not.
04:11 dj_goku I can go into more detail if needed.
04:21 sri dj_goku: i'm afraid not particularly
04:26 sri like i said earlier, i'm not really interested in custom solutions, but proven ones from other commonly used job queues
04:27 dj_goku ahh. well I thought it might help with ideas.
04:27 sri appreciated
04:27 dj_goku we looked at celery but I didn't like the ISO8601 repeating date notation vs CRON.
04:28 dj_goku specially for end users having to input that for a re-occuring schedule.
04:28 Averna joined #mojo
04:29 dj_goku wait, wasn't celery, it was the airbnb job queue system.
04:29 dj_goku chronos
04:31 mcsnolte joined #mojo
04:34 c--_ joined #mojo
04:34 sri this one comes up the most https://github.com/mperham/sidekiq/wiki/Ent-Periodic-Jobs
04:35 dj_goku sri: I am interested in what you find or implement. There wasn't really anything that we liked from current job queues and had everything we wanted.
04:35 dj_goku ahh I think that is used in gitlab.
04:35 dj_goku ahh yeah it says it is ruby based so. :D
04:36 dj_goku oh wow that very similar to what we built.
04:36 dj_goku mgr.register('* * * * *', SomeWorkerClass, retry: 2, queue: 'foo')
04:36 dj_goku not this, but the idea behind it.
04:39 dj_goku sri: one thing we have been thinking about lately is a "delayed job queue" for jobs that have hit rate limits.
04:40 dj_goku gearman supports using epoch times in the future to be used to delay execution.
04:44 Grinnz joined #mojo
04:46 sri minion already has delays
04:47 dj_goku hmm.
04:47 sri in fact, it has most common features
04:53 dj_goku ahh. yeah I kind of forgot we have a similar delay. I guess the delay we are wanting is not apart of the job schedule, but a part of the system.
04:54 dj_goku So a job fails with a type of error "rate limiting", the system would then put it on a queue and delay execution until some predefined time.
04:59 dj_goku I haven't really thought through the problem and how to solve it. But we are wanting jobs to be more resilient so if it fails to "do the right thing". We would also want all other related jobs to go to this queue and delay execution since if they try to run they'll get the same rate limit error.
05:05 sri minion jobs can resquedule themselves in such cases
05:06 sri $self->fail('rate limit'); $self->retry({delay => 3600})
05:24 dj_goku hmm interesting.
05:30 kaare joined #mojo
05:37 panshin joined #mojo
05:55 Averna joined #mojo
06:32 sri dj_goku: something that interests me right now is how actual schedulers work
06:32 sri like, is there one machine you picked that simply runs a custom daemon
06:32 sri or like in sidekiq, an election process, where one worker gets elected to be the scheduler
06:33 sri and how failover is handled, that kinda stuff
06:35 sri and testing of course, that's a big topic with minion, scheduled jobs seem rather hard to test automatically
07:04 dod joined #mojo
07:10 dod joined #mojo
08:03 dim2 joined #mojo
08:07 binary joined #mojo
08:27 Vandal joined #mojo
08:32 sugar joined #mojo
09:02 jontaylor joined #mojo
09:02 n16gel joined #mojo
09:07 inokenty-w joined #mojo
09:17 bowtie joined #mojo
09:28 irqq joined #mojo
09:47 n16gel joined #mojo
09:54 dim2 joined #mojo
10:06 bowtie joined #mojo
10:34 absolut_todd joined #mojo
10:39 panshin joined #mojo
10:53 panshin_ joined #mojo
11:07 dim2 joined #mojo
11:14 panshin joined #mojo
11:45 HtbaaPi joined #mojo
11:55 sue joined #mojo
12:05 bowtie_ joined #mojo
12:18 panshin joined #mojo
12:20 n16gel joined #mojo
12:44 n16gel joined #mojo
13:16 panshin joined #mojo
13:52 sue joined #mojo
13:59 trone joined #mojo
14:01 zax joined #mojo
14:18 asarch joined #mojo
14:19 zivester joined #mojo
14:28 mcsnolte joined #mojo
14:32 vicash sri: having worked in HPC field, we test our schedulers by generating an automated test that schedules jobs based on the current time or relative scheduling. so if you want to test that a job is scheduled correctly at a certain wall clock time, that time is generated based on when you started the test.
14:32 vicash however, we call these regression tests and they are run before release to find bugs in scheduling
14:33 vicash we also test MPI jobs being scheduled so that if  a certain job needs 8 cores to run, it gets scheduled only when  8 cores are available or if it is capable of adding more cores as they're available then that..
14:34 vicash this feature involves the person requesting a job to provide info on how many cores are needed and if all are needed at once or on-demand addition of cores
14:36 vicash the scheduler also does some storage of past runs, so if the same job took 20 minutes to run the last time, it will incorporate this value into its scheduling algorithm to have more dynamic scheduling to provide faster completion of all jobs and better estimates of time taken to complete stuff
14:37 vicash it comes down to how well you want resource (hardware) management of your cluster
14:40 vicash sri: also with regards to daemons for scheduler, we use ssh as the daemon :) since our cluster is running Linux. so the scheduler just makes an ssh to launch a program and ssh keys are set and ssh-agents are running. that's the best daemon so far since it doesn't require new daemon installs
14:41 vicash also adding more systems to the cluster is trivial since all we need to do is make ssh key exchange and then we're done. we also use NFS to manage the files and such so we're not shipping data files across
14:42 tholen joined #mojo
14:42 vicash there is also BOSH which is the new kid on the block
14:44 tholen joined #mojo
14:49 bowtie_ joined #mojo
15:07 tholen joined #mojo
15:27 abra joined #mojo
15:42 tholen joined #mojo
15:49 gryphon joined #mojo
16:01 tholen joined #mojo
16:02 tholen joined #mojo
16:22 tholen joined #mojo
16:35 punter joined #mojo
16:44 absolut_todd joined #mojo
16:48 ajr_ joined #mojo
16:56 jacoby_ joined #mojo
17:13 nchambers joined #mojo
17:15 tholen_ joined #mojo
17:15 tholen_ joined #mojo
17:21 tholen_ left #mojo
17:44 sugar joined #mojo
18:16 trone_ joined #mojo
18:20 PryMar56 joined #mojo
18:21 tholen joined #mojo
18:21 sri \o\
18:21 sri /o/
18:24 dj_goku sri: we have a single server that runs our daemon and kicks off jobs. we currently don't have failover. Our scheduler is a singleton since we only ever want one scheduler scanning the database and adding jobs. If our scheduler is down for 2-3 hours or even longer it really isn't a big deal since all jobs needing scheduled will be added once the scheduler is back online.
18:34 * sri wonders why these articles always miss Mojo::DOM http://blogs.perl.org/users/polettix/2016/01/pure-perl-xml.html
18:49 nchambers joined #mojo
18:51 jberger could be the name
18:52 jberger they search for XML and HTML
18:57 sri shows up on the second page in metacpan search
18:58 jberger could also be the toolkit vs web framework argument
18:58 jberger perhaps I should just ask in a comment?
18:59 mishin joined #mojo
18:59 mishin Hi, Mojo!
19:00 jberger sri: asked
19:00 jberger mishin: o/
19:02 sri jberger++
19:02 sri o/
19:03 * sri never managed to create an account for commenting on blogs.perl
19:04 jberger sri: I don't think that's true, I recall you having one
19:05 jberger http://blogs.perl.org/users/joel_berger/2012/10/why-people-dont-like-mojolicious.html#comment-219382
19:05 sri was that when you still could comment anonymous?
19:07 jberger oh I don't know
19:07 jberger I've always had an account
19:08 mishin So, I try to install Mojo::UserAgent on Windows strawberry perl 6.16
19:08 mishin is it really?
19:09 jberger mishin: I'm sorry but it seems we have a bit of an language problem, I don't understand what you are asking
19:13 mishin http://matrix.cpantesters.org/?dist=Mojolicious+6.41 well I found text matrix and for v5.22.1 Mojo::UserAgent is up today
19:13 lluad joined #mojo
19:13 mishin sorry and thanks for disturb
19:14 jberger mishin: no problem
19:14 mishin I mean that for This is perl 5, version 22, subversion 1 (v5.22.1) built for MSWin32-x64-multi-thread  Mojo::UserAgent  os already go in distributive
19:17 jberger mishin: I still can't understand you, but if this helps, windows is well supported for the user agent
19:17 jberger the only parts of mojolicious that are not supported are hypnotoad
19:17 jberger morbo works but can be slow
19:17 jberger the daemon works fine
19:18 jberger *morbo works but can be slow **to detect changes and restart**
19:18 jberger everything else works just fine on windows including the user agent
19:18 jberger if you are having troubles let us know
19:19 mishin thanks, t'm trying to work with websocket, it works!
19:19 jberger mishin: glad to hear that, have fun!
19:26 sri the more i read about job queue schedulers the less i want one in minion :S
19:27 Kogurr joined #mojo
19:33 Adura joined #mojo
20:00 mishin joined #mojo
20:02 sugar joined #mojo
20:14 vicash so, i am getting a lot of warnings of "uninitialized value $str in substitution" in Mojo::Util's trim() function, especially if I use $validation->optional(foo => trim). if 'foo' is optional and has not been submitted as part of the form, shouldn't the filter not need to be invoked at all
20:15 vicash i understand that trim() needs to be fast and hence there are no checks if the $str variable is valid
20:22 nchambers joined #mojo
20:23 zax joined #mojo
20:26 nchambers_ joined #mojo
20:35 n16gel joined #mojo
20:39 nchambers joined #mojo
20:53 asarch joined #mojo
21:45 lsm joined #mojo
22:49 punter joined #mojo
23:02 n16gel joined #mojo
23:02 sri front-end development has gone crazy https://medium.com/@MikeRyan52/angular-2-first-app-post-mortem-b2b2b3618828#.aef6pdwt9
23:04 absolut_todd joined #mojo
23:04 sri vicash: what do your parameters look like?
23:08 jberger omg, I'm never going to be able to learn all that
23:08 binary joined #mojo
23:11 sri vicash: you can use a one-liner like this to demonstrate it too perl -Mojo -E 'a({inline => q{%== dumper $c->validation->input}})->start' get /?foo
23:11 sri it shouldn't be possible to get an undef value there
23:11 sri jberger: yea
23:38 sri ah, there is a bug
23:45 good_news_everyon joined #mojo
23:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vzrjx
23:45 good_news_everyon mojo/master 66d5b80 Sebastian Riedel: fix validation filter bugs in Mojolicious::Validator::Validation
23:45 good_news_everyon left #mojo
23:45 sri vicash: fixed

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