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

IRC log for #mojo, 2016-01-31

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

All times shown according to UTC.

Time Nick Message
01:51 mattp joined #mojo
02:00 mattp joined #mojo
02:01 jontaylor joined #mojo
02:17 mattp joined #mojo
02:27 mattp joined #mojo
03:35 noganex_ joined #mojo
04:47 c--__ joined #mojo
04:52 kaare joined #mojo
05:23 taichi joined #mojo
06:21 mattp joined #mojo
07:33 go|dfish joined #mojo
07:54 cpan_mojo WWW-OAuth-0.001 by DBOOK https://metacpan.org/release/DBOOK/WWW-OAuth-0.001
07:55 Grinnz funny, why'd that show up here
08:20 go|dfish joined #mojo
08:20 HtbaaPi joined #mojo
08:26 Vandal joined #mojo
08:50 dod joined #mojo
08:55 bpmedley Grinnz : You are now mind melding with mojo
08:56 dod joined #mojo
08:59 jasanj left #mojo
10:53 marcus sri: I'm on instagram :p
11:58 trone_ joined #mojo
12:39 good_news_everyon joined #mojo
12:39 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vzjM7
12:39 good_news_everyon mojo/master fad35ff Sebastian Riedel: more layout tests
12:39 good_news_everyon left #mojo
12:42 bowtie_ joined #mojo
12:48 sprocket joined #mojo
13:23 asarch joined #mojo
14:15 c--_ joined #mojo
14:39 gryphon joined #mojo
15:19 sri marcus: that means we are not old yet?
15:19 sri \o/
15:20 marcus sri: Maybe :)
15:20 marcus I'm not sure instagram is a good measure tho. Maybe we're old because we are not on snapchat.
15:22 * dabudabu chases everyone off his lawn
16:54 thowe joined #mojo
17:29 PryMar56 joined #mojo
18:08 sri patch i'm considering https://gist.github.com/anonymous/bb6c0506ba3490d78da7
18:08 sri idea is to allow handling back-pressure gracefully
18:08 sri like when you're forwarding data from one socket to another
18:08 sri and you read data faster than you can write
18:15 thowe neat
18:15 thowe You know you've got a pretty mature product when this is the level to which the engineering has advanced
18:18 sri heh
18:18 sri so, the problem is that we wouldn't actually use high_watermark in core
18:19 sri since we don't forward from socket to socket
18:19 sri of websocket to socket... or ...
18:19 sri low_watermark would be usable with our servers and user agent
18:20 sri i imagine it can sometimes smooth out response times
18:21 thowe do you have a reliable method for creating and monitoring the situation you are trying to solve?
18:22 sri nope, i do not
18:23 thowe Not that I am any help...  You're getting into stuff that's a level beyond anything I've tried.  I manage to be fairly productive and have fun while not getting very deep into what Mojo offers.  Yet anyway.
18:23 thowe Loops, non-blocking jazz, sockets...  That's the next level up from me.  I'm mostly using it as glue and trying to design so I don'
18:23 thowe t screw myself later
18:24 sri the big problem i'm trying to solve here is an attack vector i see pretty much whenever i see someone forward sockets to sockets or sockets to websockets with mojolicious
18:25 thowe denial of service type thing?
18:25 sri it's super easy to DoS a mojolicious websocket proxy that forwarss data to some backend socket server
18:25 sri s/s/d/
18:26 sri with the congestion patch you'd add a few lines, and the problem was gone
18:26 sri $stream1->on(congestion => sub { $stream2->stop }); $stream1->on(drain => sub { $stream2->start });
18:27 sri $stream2->on(congestion => sub { $stream1->stop }); $stream2->on(drain => sub { $stream1->start });
18:28 sri and it would stay fast
18:28 sri right now that's pretty much impossible
18:29 sri $stream1->on(drain => sub { $stream2->start }) is possible, but you'd have to $stream2->stop after every $stream1->write
18:29 sri making things slow
18:30 sri so, all current mojolicious apps that forward data like that are either vulnerable to a DoS, or slow
18:33 sri hmm, thinking some more about it, low_watermark has more problems
18:33 sri we depend on it for finish event timing
18:33 sri so if it gets emitted before all data has been written things will go wrong
18:38 sri that changes the patch to https://gist.github.com/anonymous/387a9b9d337b6422a0c1
18:41 sri hmm, there might actually be a core use case :)
18:41 thowe It sounds like this is potentially a big feature/fix
18:41 sri Mojo::Server::Daemon could use the event to log a debug message
18:42 sri it would catch many of the "while (1) { $c->send('lalala') }" cases
19:26 good_news_everyon joined #mojo
19:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgeYT
19:26 good_news_everyon mojo/master a8a640e Sebastian Riedel: better congestion control for Mojo::IOLoop::Stream
19:26 good_news_everyon left #mojo
19:26 sri that's what i had in mind :)
19:27 * sri pokes jberger, marcus, batman, tempire and crab
19:28 sri http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#What-does-Write-congestion-mean
19:28 sri the faq answer
19:35 good_news_everyon joined #mojo
19:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vgeOB
19:35 good_news_everyon mojo/master 37478b7 Sebastian Riedel: mention DoS attacks too
19:35 good_news_everyon left #mojo
19:36 sri the cost of this feature is -2 btw., since i've removed some code on the way ;p
19:39 batman +1 from me
19:41 batman Add a question to the commit.
19:44 sri answered
19:46 batman <3
19:47 batman Is it the same value as the upgrade limit in Mojo::Asset::Memory..?
19:48 sri nope, that's 256kb
19:48 sri the max_message_size value is 16mb though
19:49 batman Ah! Right :)
19:54 sri one thing is not so great though, it doesn't cover "get '/' => sub { my $c = shift; $c->send('lalala') while 1 };"
19:57 sri control has to be passed back to the web server at least once
19:57 sri so a timer or other event source is fine
20:03 sri hmm, 16mb might not be the best choice either
20:05 sri hard to reach with small writes
20:28 chansen Looks like its a high level implementation of the socket options SO_{SND,RCV}LOWAT
21:09 chansen sri: ^^
21:28 bowtie joined #mojo
21:31 jberger sri: very cool
21:31 jberger When I get home I will read there patch more closely
21:32 jberger And probably amend ... that thing I'm working on
21:33 dod joined #mojo
21:35 dod joined #mojo
21:39 bowtie joined #mojo
21:40 sri well, that was bad timing, i'm about to remove it again -.-
21:40 good_news_everyon joined #mojo
21:40 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vge4B
21:40 good_news_everyon mojo/master ea5fe04 Sebastian Riedel: remove congestion event again
21:40 good_news_everyon left #mojo
21:41 sri not convinced it is the right way to do it
21:41 sri and not enough time to research
22:06 absolut_todd joined #mojo
22:22 absolut_todd joined #mojo
22:28 Grinnz http://asset-f.soupcdn.com/asset/15768/1885_f5fc_576.jpeg
23:18 punter joined #mojo
23:58 CandyAngel Errr
23:59 CandyAngel Is there any reason why replacing app->commands with another "::Commands" object would break Mojo::Log?

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