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

IRC log for #mojo, 2014-09-24

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

All times shown according to UTC.

Time Nick Message
00:33 disputin joined #mojo
00:53 dexteruk_ joined #mojo
01:33 mib_1px9bd joined #mojo
01:34 preaction joined #mojo
02:01 Zx3 joined #mojo
02:04 d4rkie_ joined #mojo
02:15 noganex joined #mojo
02:36 anon2422 joined #mojo
02:42 anon4222 joined #mojo
02:54 anon2422 joined #mojo
03:14 basic6_ joined #mojo
03:17 jberger jzawodn: see here : https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Perl/mojolicious/app.pl#L14
03:17 doublelel joined #mojo
03:18 jberger That prevents the hypnotoad shutdown lag (down to 1s)
03:18 jberger Though remember that it would kill those connections quickly on hot restart too
03:22 r0b3rt joined #mojo
04:01 Averna joined #mojo
04:08 r0b3rt left #mojo
04:36 woz joined #mojo
04:42 zivester joined #mojo
04:43 anon2422 joined #mojo
05:00 anon2422 joined #mojo
05:07 Vandal joined #mojo
05:07 woz joined #mojo
05:07 D4RK-PH0ENiX joined #mojo
05:18 dexteruk joined #mojo
05:29 anon2422 joined #mojo
05:36 anon2422 joined #mojo
05:36 doublelel joined #mojo
05:38 woz joined #mojo
05:41 laouji joined #mojo
05:47 woz joined #mojo
06:10 ver joined #mojo
06:12 KCL_ joined #mojo
06:14 oetiker joined #mojo
06:15 dod1 joined #mojo
06:17 nicomen a/win 18
06:18 rofl_ lolfail 18
06:18 rofl_ nicomen: try alt + i
06:18 rofl_ brotip
06:19 nicomen thanks :-)
06:29 sujithm joined #mojo
06:44 anon2422 joined #mojo
06:44 Zx3 joined #mojo
06:51 woz joined #mojo
06:57 ladnaV joined #mojo
06:58 anon2422 joined #mojo
06:59 batman marcus: what do you think about sri's comment about join/part/quit? should we revert and wait for https://github.com/Nordaaker/convos/pull/201 ?
06:59 batman sri: "fancy caching" ? what do you mean?
07:00 marcus batman: yeah, let's do it. It annoys me too.
07:00 batman can you do it?
07:00 batman general question: is it good to store the $app in the plugin?
07:01 batman marcus: i'll do it
07:01 marcus batman: I can do it tho, it's only like 4 lines?
07:01 marcus I think it's actually reverted in my branch
07:02 marcus batman: Actually, I think I should just finish the /ignore system that I've started.
07:02 marcus I can probably do that in an hour right? :)
07:03 batman marcus: i just did it.
07:03 batman haha, no idea how long you will spend on that :)
07:03 marcus batman: I plan to do it on the core level.
07:04 batman marcus: why not in the frontend?
07:04 batman marcus, sri: i've restarted demo.convos.by. reload to see join/part/quit
07:04 marcus batman: because I want it to work over the whole line. Logs and proxy and everything
07:07 marcus Sweet.
07:08 batman i don't like to loose information :/
07:09 batman could you ask jberger, sri, nicomen what they think is a good idea?
07:11 marcus batman: but you don't want to ignore anything, so you won't lose any information?
07:11 batman that is true, but it's a generic question.
07:11 batman like highlight: i would like to add the meta information on render, so i can reply old messages as well
07:12 marcus sri: If you put someone /something on ignore, do you still want to see it?
07:12 marcus batman: but highlight is set in the core.
07:12 marcus as a meta flag
07:12 batman yeah, not sure if that's a good idea :/
07:13 marcus #wat
07:13 batman if you add "perl" as a highlight word (not yet implemented), do you want the old messages to be highlighted as well? i think i do.
07:14 marcus I don't
07:15 marcus Now we must fight in the arena.
07:15 * marcus pushes batman into the alligator pit. #done
07:15 batman i guess we do... i really like having dynamic meta.
07:16 marcus batman: highlighting old stuff makes no sense from a user perspective. It will be annoying.
07:16 batman why is it more annoying to highlight old stuff than new..?
07:20 aleksey joined #mojo
07:25 trone joined #mojo
07:25 batman marcus: you are usually right, but it would be cool if you could find someone else to reassure me.
07:26 nicomen batman: ignoring PART, QUIT, JOIN is something I would need, however it's not something I would impose on a default first-time user
07:27 marcus nicomen: I've got a ignore branch in the works
07:27 batman nicomen: we're not going to. the question is, would you like to have "/ignore whatever" to work on the core level or in the frontend?
07:27 nicomen marcus: I thought it was that one I was asked to comment?
07:27 mael joined #mojo
07:27 nicomen aaaah
07:27 marcus nicomen: no, we're discussing what level to place ignore/highlight
07:27 batman if it's added to the core, then the messages won't be stored at all. if they are added to the frontend, they will simply be filtered out
07:28 batman *filtered out when rendered*
07:28 marcus I want it in the core so it works across web frontend/logs/proxy
07:28 nicomen so the pros of not storing it to save space?
07:28 nicomen +is
07:28 marcus batman want to do it dynamically in the web frontend.
07:28 batman i want it in the frontend, because then you can undo what you previously ignored. and you can also search for the full conversation (once we have added search)
07:29 elsanchez joined #mojo
07:29 batman i you do it in core, then the messages will be lost forever.
07:29 batman (not lost, but never stored)
07:30 nicomen a middle way is to filter in backend I guess?
07:30 nicomen less traffic, no loss?
07:30 batman uhm... when i say "frontend", i don't mean "javascript".
07:30 nicomen oh
07:31 marcus nicomen: what about highlight. If you did /highlight convos now, would you want to see all the previous mentions highlighted ?
07:31 nicomen marcus: that would be nice, but I haven't seen that in clients before
07:32 rawler joined #mojo
07:32 batman we could do that easily, by moving the filtering to the frontend. the filters would then be both "highlight" and "ignore" and you can change them historically for any type
07:32 voegelas joined #mojo
07:32 marcus I also have a problem understanding how it would work across channels.
07:33 nicomen I haven't seen how you do websocket communication and how the actual actions are passed, but even if you added highlights to older text, wouldn't the client not see it, until next time he connects?
07:33 marcus should #convos suddenly light up when I add a highlight while standing in #mojo?
07:33 marcus nicomen: yeah, I feel like it's adding a lot of confusing edge cases for the user.
07:33 anon2422 joined #mojo
07:33 batman marcus: good point.
07:33 purl nice and sharp
07:34 nicomen marcus: the edfault highlights I've seen have been global
07:34 batman i wasn't thinking about the notification list part. i was only considering the red background
07:34 marcus nicomen: yeah, but they're not retroactive.
07:34 nicomen true
07:35 marcus batman: I guess filtering joins and quits can't actually be done in the proxy anyways.
07:35 nicomen highlighting of the channel should probably only work on "new events" ?
07:35 marcus Since it would fuck up the client user lists. You'd have to do that in the client you're proxying too
07:35 batman marcus: right.
07:35 batman i guess my "do the same for highlight and ignore" statement is false
07:36 batman marcus: wanna grab a beer and fight later or tomorrow? ;)
07:36 voegelas joined #mojo
07:36 marcus batman: I'll check with the boss.
07:36 batman :)
07:37 marcus But now I have to bike out and meet arne. He came back from the US last night.
07:37 batman cool. have fun and say hello :)
07:40 woz joined #mojo
07:56 dp_ joined #mojo
08:04 basiliscos joined #mojo
08:07 woz joined #mojo
08:18 Mso150 joined #mojo
08:26 davido__ joined #mojo
08:47 fhelmber_ joined #mojo
08:52 denis_boyun joined #mojo
09:19 anon2422 joined #mojo
09:32 meshl joined #mojo
09:33 anon2422 joined #mojo
09:40 t4gg joined #mojo
10:04 dod joined #mojo
10:06 basiliscos joined #mojo
10:07 D4RK-PH0ENiX joined #mojo
10:25 D4RK-PH0ENiX joined #mojo
11:08 batman marcus, sri: we got flat navbar now (feedback wanted)
11:08 batman (and sidebar)
11:08 marcus batman: I love it.
11:08 batman <3
11:09 batman good think i put it in "master" then, hehe
11:09 marcus masters of the universe
11:10 batman :)
11:14 batman marcus: what about this: http://home.thorsen.pm/private/raw/notverysecret/convos/convos-input-flat-01.png ?
11:15 batman i think it's almost what you suggested a month ago..?
11:15 marcus +1
11:15 purl 1
11:15 batman ok that i change the input styling for all the forms as well then?
11:15 batman just to try it out and then rather change back?
11:16 marcus ok
11:16 batman cool.
11:16 batman i'll change it when i make time...
11:35 neilhwatson joined #mojo
11:49 mael joined #mojo
12:15 meshl joined #mojo
12:18 mael_ joined #mojo
12:23 dvinciguerra joined #mojo
12:34 neilhwatson joined #mojo
12:35 hertzhaft joined #mojo
12:35 neilhwatson joined #mojo
12:38 ghandi|work joined #mojo
12:39 ghandi|work Hi, is there an easy way with Test::Mojo to look at the application logfiles? (e.G. development.log and/or production.log)?
12:43 lipizzan joined #mojo
12:48 doublelel joined #mojo
12:48 nicomen ghandi|work: I believe there is a way to inspect log without even having to touch the files themselves
12:49 ghandi|work nicomen: would work for me too. But currently my tests run, fail and i'm stuck debugging without further information...
12:49 nicomen we use a custom logger that outputs to STDERR in TAP commented format
12:50 Akron joined #mojo
12:51 nicomen ghandi|work: if you look in t/mojo/log.t you can see who to write log to a variable
12:52 batman ghandi|work: you could just remove the log/ directory
12:52 batman then the logging will appear to screen
12:52 nicomen https://github.com/kraih/mojo/blob/master/t/mojo/log.t#L22
12:53 batman you can also do $t->app->log->on(message => sub { shift; Test::More::diag(@_); }); # though i'm not sure if that's really a good idea
12:53 Jonneh joined #mojo
12:53 batman (that's not the completely the correct way, but it might work)
12:54 batman ghandi|work: http://mojolicio.us/perldoc/Mojo/Log#message
12:54 mr-foobar joined #mojo
12:55 ghandi|work Thanks, i'll have a look at this.
12:55 ghandi|work But i was hoping $t->app->log->path("/tmp/mojo.log"); would just work...but that's not the case...
12:57 batman ghandi|work: i would rather do $t->app->log->handle(\*STDERR);
12:57 batman why doesn't $t->app->log->path("/tmp/mojo.log") work?
12:57 ghandi|work I have no idea, the log is simply not created
12:58 batman are you sure you're doing it before you have logged anything?
12:58 batman you can't do $t->get_ok("/"); and then $t->app->log->path("/tmp/mojo.log")
12:59 ghandi|work I set it right after instantiativen my TestApp: my $t = Test::Mojo->new("MyApp");$t->app->log->path("/tmp/mojo.log");
12:59 batman you need to do it right after Mojo::Test->new('...'); and it will also be too late if you log inside startup()
12:59 batman try $t->app->log->handle(\*STDERR)
13:01 ghandi|work ...log->handle(...) isn't working too
13:01 gabiruh joined #mojo
13:01 batman how do you run the test?
13:01 batman try prove -vl t/yourtest.t
13:02 ghandi|work i'm using Module::Build: ./Build test
13:02 ghandi|work Funny, with prove i get the logging output to stderr
13:02 batman maybe module build does something funny
13:03 gabiruh joined #mojo
13:03 batman why can't you use ExtUtils::MakeMaker ?
13:03 ghandi|work But log->path(...) isn't working with prove...
13:04 batman probably because you have already built the handle attribute.
13:04 batman you could do delete $t->app->log->path("....")->{handle};
13:04 batman which will force rebuild of handle
13:04 batman it's dirty though :/
13:04 batman sri: would you consider a pull request where path() is a method that clear handle() ?
13:05 ghandi|work at least i get to the log output in some way now, thanks so far :)
13:16 batman sri: https://gist.github.com/8bff42ee9f4bdc433b75
13:42 r0b3rt joined #mojo
13:47 sujithm joined #mojo
13:50 gabiruh joined #mojo
13:56 jon joined #mojo
13:58 damaya How is Mojolicious in terms of scalability?
14:04 jon I’ve got a bit of a problem on a Mojolicious 4.9 App, requests are randomly taking 10 seconds instead of milliseconds
14:04 jon in order to isolate my own code, I tested by just testing it requesting a static file, a javascript file
14:05 jon running apachebench with 10 concurrency, 100 total requests, the fastest request was 26ms, the slowest request was 10057ms
14:06 batman damaya: it's not really a mojo question. it's a design question.
14:07 jon i cannot explain the slow requests, at first I thought it was processes restarting, but surely it shouldn’t lag so badly, i’m running hypnotoad with 16 workers, each worker accepting 100 connections
14:07 batman damaya: but mojolicious can handle a lot of concurrent requests, as long as they are non-blocking. "blocking mode" has the same issues as apache
14:07 jon the app itself starts in under a second from cold
14:07 batman damaya: like 10k connections at the same is just fine.
14:08 batman jon: paste your test app somewhere and we might take a look if it's short enough
14:09 jon i could write a test app, but the problem is occurring only in production, for a telecomms firm
14:10 genio Then something must be blocking.  How good are your logs?
14:10 jon I’ve switched the log into production mode, and it is indicating that all requests are fast
14:10 jon * i mean debug mode
14:10 batman jon: do you have a reverse proxy infront?
14:11 _eugen joined #mojo
14:11 jon I do, but i’m testing at the moment bypassing it, going directly to hypnotoad
14:11 damaya well, there is the architecture, I agree with that; but the framework has its importance in scalability (e.g., facebook php -> c++)
14:11 jon apache bench indicates that the connects are always accepted immediately
14:11 damaya perfect
14:11 damaya I am not using apache, I am using Hypnotoad with HAProxy, so hopefully that works well
14:11 damaya thanks batman
14:12 jon So from what I can see, hypnotoad is accepting the requests, but they only get processed some time later, yet according to the log file every request is quick
14:12 jon I’m going to have to make a small test app to reproduce this, otherwise I don’t feel like I am going to get anywhere
14:12 batman damaya: it's _always_ important to use a fast cache, like varnish or a cdn like cloudflare. that goes for any framework.
14:13 batman jon: does the debug log say 10s ?
14:13 jon no the debug log says its only milliseconds
14:13 batman then it's not mojolicious
14:13 jon which would make me think it was the OS
14:13 jon but apache bench says the connection is accepted immediately
14:13 batman i doubt it's  the os
14:14 jon it sounds like something between the two putting request in a queue, but I don’t understand how that can be
14:14 batman jon: accept != process
14:14 damaya Hm, varnish is new to me. Do you use varnish in conjunction with HAProxy?
14:15 damaya Or nginx, etc.
14:15 batman no. i use cloudflare
14:15 batman cloudflare => hypnotoad is my setup (though i'm not having a lot of visitors)
14:15 damaya awesome, thank you batman :)
14:16 batman i'm not sure if i would do it any other way. cloudflare use nginx as reverse proxy and sends the requests to hypnotoad on port 8080
14:16 batman i might add haproxy if i had a bunch of hypnotoad servers
14:16 batman i think *maybe* marcus does that. (not sure though)
14:17 damaya I have 4, and 2 HAProxy servers
14:18 batman makes sense :)
14:18 damaya It's just something more to look into though, which I appreciate.
14:18 damaya Far too many permutations in system architecture
14:18 batman cloudflare is awesome. the only thing missing is websocket support. (they are working on it)
14:19 batman and they cache the assets far closer to the user than what you do, if you have visitors world wide
14:19 batman and serve faster to cell phones.
14:19 genio for single hypnotoad/other servers here, we use Nginx + mod_security for nginx with core rule set.  for multiple servers or AWS hosted stuff, we are a bit more complicated
14:20 batman genio: yeah, i would do that if cloudflare didn't do it for me :)
14:25 rem_lex joined #mojo
14:32 sugar joined #mojo
14:41 Bender joined #mojo
14:49 sujithm joined #mojo
14:51 rem_lex joined #mojo
14:59 irq joined #mojo
15:05 sh4 joined #mojo
15:21 rem_lex joined #mojo
15:29 jon I’ve managed to reproduce my issue in a test app
15:29 jon I generated a mojo app with mojo generate app MyApp
15:30 jon and then just apache benched it
15:30 jon ab -n10000 -c20 "http://127.0.0.1:8080/"
15:30 jon the first time round it completes fine
15:30 jon run the apache bench a second time
15:31 jon and it stalls at roughly 16000 requests
15:31 batman and the app looks like..?
15:31 batman https://gist.github.com
15:31 purl i guess https://gist.github.com is a paste site running on 443
15:32 jon its the basic unmodified site you get when running the generator, but for completeness I will put it on github
15:33 jon https://gist.github.com/jontaylor/1ee3ef043fc34aea8017
15:36 jon I have added a comment on the gist
15:36 jon for the easiest possible way to reproduce
15:36 jon I’m going to go grab another linux server that I can put the latest mojo on
15:36 jon to see if the issue occurs on latest
15:39 jon same issue on mojo 5.44 for me, I can’t rule out problems with the way i’m testing yet though
15:39 jon fastest request is processed in 2ms, slowest in 20747ms
15:44 Vandal joined #mojo
15:44 oetiker joined #mojo
15:55 ryozi joined #mojo
15:55 batman jon: do you have EV? (mojo version)
15:56 jon I have version 4.15 of EV installed,
15:56 jon I will update it and test again
15:57 oetiker joined #mojo
15:57 batman not sure if it matters though.
15:57 batman jon: why can't you upgrade Mojolicious?
15:58 jon i’ve upgraded it locally and I get the same problem
15:58 batman i'm pretty sure no-one will help you, when you're on 4.x
15:58 oetiker joined #mojo
15:58 batman oh. that's interesting
15:58 jon I was hesitant to do it on live without getting the business involved though
15:59 batman i have to go now. good luck. post at https://groups.google.com/forum/#!forum/mojolicious unless you get help here
15:59 jon ok, thanks
16:12 jon Tested the same thing on an 8 core Xeon, and the results are much better
16:13 jon the fastest request was 1ms, slowest request was 244ms
16:13 jon which is likely within margin of error for this test
16:18 Ptolemarch joined #mojo
16:27 stokachu joined #mojo
16:32 dvinciguerra joined #mojo
16:38 Mso150 joined #mojo
16:41 Kundun joined #mojo
16:46 disputin joined #mojo
16:48 preaction joined #mojo
16:58 KindOne joined #mojo
17:02 basiliscos joined #mojo
17:17 doublelel joined #mojo
17:22 Eitz joined #mojo
17:26 hertzhaft joined #mojo
17:44 basic6 joined #mojo
17:47 berov joined #mojo
17:53 irq joined #mojo
17:55 human39 joined #mojo
18:12 KCL joined #mojo
18:12 hertzhaft joined #mojo
18:27 disputin joined #mojo
18:27 Kundun joined #mojo
18:30 doublelel joined #mojo
18:36 disputin joined #mojo
18:41 dod joined #mojo
18:50 neilhwatson joined #mojo
18:56 marcus sri: How do you feel about changing the top right menu to something like https://www.evernote.com/shard/s22/sh/018f7f89-ba6f-492b-85dd-dd716c3fe4b4/2435b5daaba5ae87cbe5c693061d8a62/deep/0/Nordaaker-demo----convos-on-perlorg---penta--.png ?
18:58 marcus And probably adding the channel list there and making them equal width.
19:03 jamesaxl joined #mojo
19:06 Mso150 joined #mojo
19:15 Mso150 joined #mojo
19:29 mael joined #mojo
19:30 mael_ joined #mojo
19:39 sugar joined #mojo
19:52 disputin joined #mojo
19:56 lipizzan joined #mojo
20:14 sugar joined #mojo
20:48 disputin joined #mojo
20:58 disputin joined #mojo
21:56 disputin joined #mojo
22:01 disputin joined #mojo
22:06 batman +1
22:06 purl 1
22:13 woz joined #mojo
22:43 woz joined #mojo
22:43 meshl joined #mojo
22:47 D4RK-PH0ENiX joined #mojo
22:51 saki joined #mojo
23:02 howitdo joined #mojo
23:16 woz joined #mojo
23:23 woz joined #mojo
23:24 Averna joined #mojo
23:27 axlrose joined #mojo
23:44 doby joined #mojo
23:50 dvinciguerra joined #mojo
23:55 woz joined #mojo
23:55 * tempire is shocked
23:55 tempire Mango 1.12 is still on cpan

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