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

IRC log for #mojo, 2015-09-12

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

All times shown according to UTC.

Time Nick Message
00:06 Grinnz http://grinnz.com:3000/ well, pubsub through sqlite works... hehehe
00:06 preaction what has science done?!
00:09 firnsy Grinnz++
00:28 cpan_mojo Mojo-SQLite-0.014 by DBOOK https://metacpan.org/release/DBOOK/Mojo-SQLite-0.014
00:28 asarch joined #mojo
00:44 mattastrophe joined #mojo
01:01 jberger Grinnz: the horror
02:15 PryMar56 joined #mojo
02:24 jb360 joined #mojo
02:56 noganex joined #mojo
03:02 asarch joined #mojo
03:36 asarch joined #mojo
03:50 bpmedley Grinnz++
04:19 cpan_mojo Mojo-SQLite-0.015 by DBOOK https://metacpan.org/release/DBOOK/Mojo-SQLite-0.015
05:36 nigel joined #mojo
06:18 davido_ joined #mojo
07:34 dod joined #mojo
07:39 dod joined #mojo
07:49 Vandal joined #mojo
07:52 juikuen joined #mojo
08:11 brrt joined #mojo
08:19 sri has science gone too far?
08:19 mattastrophe joined #mojo
08:20 preaction Me am play gods! http://dresdencodak.com/comics/2009-09-22-caveman_science_fiction.jpg
08:22 sri :D
08:28 sh4 joined #mojo
09:05 asm35 joined #mojo
09:05 sri tempire: since you did most of the work on TLS support in mojolicious back in the days... perhaps you'd like to comment https://github.com/kraih/mojo/issues/844
09:08 batman Grinnz: will Mojo::SQLite only look for a new event every second..?
09:16 berov joined #mojo
10:01 brrt joined #mojo
10:21 trone joined #mojo
10:31 dod joined #mojo
11:04 trone_ joined #mojo
11:06 nigel joined #mojo
11:39 ribasushi joined #mojo
11:41 akhasanov joined #mojo
11:53 mattastrophe joined #mojo
11:57 sri hmm, i guess there's another aspect to the tls_version thing
11:58 sri one might want to enforce maximum security with version=TLSv1_2
11:58 sri or possibly newer versions in the future
11:59 sri the implementation is super simple and clean, just the test is a bit sketchy
12:02 good_news_everyon joined #mojo
12:02 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZwn8
12:02 good_news_everyon mojo/master 3ca46ad Sebastian Riedel: allow the TLS protocol version to be configured (closes #844)
12:02 good_news_everyon left #mojo
12:03 sri i'm still on the edge about it
12:04 sri if a critical flaw is found in TLSv1_1, it seems like a good idea to make it easy to disable on production boxes in a hurry
12:05 sri without having to wait for a new IO::Socket::SSL release with new defaults
12:17 batman sri: i think that sounds good
12:17 sh4 joined #mojo
12:19 batman sorry i can't be helpful with the implementation :/
12:21 sri it's about the implementation of the test https://github.com/kraih/mojo/commit/3ca46ad5f2493c6135a34af680c527e08e8d58ff#diff-e8b4322d0a009adab7395c3ba72a2fe9R96
12:21 sri specifically forcing a protocol there
12:28 batman what's wrong with the test?
12:28 sri it changes global IO::Socket::SSL defaults
12:30 batman right... could you add tls_version to Mojo::IOLoop::Client ?
12:31 sri sure, but there's lots of other server options not available there yet either
12:32 sri like ciphers
12:32 sri verify mode...
12:32 batman how about just making a low level IO::Socket::SSL object that connects to the server?
12:33 asm35 joined #mojo
12:33 sri maybe
12:33 batman i guess you don't really need to test that the ua can retrieve a document for this specific test..?
12:34 sri actually you do, but i guess you could move the cipher/version parts into a new test
12:34 batman ok
12:42 meshl joined #mojo
13:03 dustinm joined #mojo
13:18 Zoffix joined #mojo
13:29 Zoffix Grinnz, so if pubsub can be added like that... why not make a separate "pubsub" plugin?
13:31 mattastrophe joined #mojo
13:32 batman Zoffix: what do you mean?
13:33 mattastrophe_ joined #mojo
13:35 Zoffix From what I understand, this "pubsub" just lets things subscribe to notifications and share some data. I see little relevance for why that has to be a strictly database thing that's added to SQLite and MySQL Mojo db modules. Why not make a separate Mojo::PubSub and have be available as a standalone "subscribe to things and share data" thing. If anyone wants to share database XYZ connection, all the power to them
13:35 Zoffix Dunno... maybe I don't fully understand this "pubsub" concept and why it's married to DB modules.
13:36 batman Zoffix: where will you publish to, if you don't have a central database?
13:38 batman Zoffix: you can very well make a M::P::PubSub, but it would not work well, without the low level functionality in Mojo::Pg, ::mysql, ::SQLite, ::Redis2
13:48 Zoffix Alright.
13:54 sri Zoffix: Mojo::Pg actually implements it with postgres notifications
13:54 sri a native pubsub system with very high performance
13:55 sri the others just wanted to copy the api, and made workarounds
13:55 Zoffix I see.
13:58 sri i can send like 20k messages per second with Mojo::Pg
13:59 Zoffix 0.o
14:04 sri what makes the pubsub api special is that it only uses one connection per worker process
14:05 sri no matter how many channels you subscribe to or how many subscribers there are
14:05 sri since number of connections is usually the weakness of postgres
14:06 sri with one connection per worker it's not just fast, it also scales very nicely
14:11 sri your default hypnotoad will handle 1000 websocket connections per worker, with 4 workers, that's 4000 concurrent websocket connections, which will only require 4 database connections for pubsub
14:11 sri (of course going as high as 10k connections per worker is no big problem either)
14:12 * sri has not really tested the upper limits yet
14:13 sri i stopped at 20k on my little macbook air
14:19 PryMar56 joined #mojo
14:52 jberger <3
15:04 stephen joined #mojo
15:30 thowe joined #mojo
15:47 ajr_ joined #mojo
15:50 jberger so it looks like letsencrypt starts next week?
15:51 jberger I remember vaguely that there is some weird protocol involved, is that something we need to worry about or in the end will the certs "just work"?
15:56 sri i've not heard anything yet
15:57 thowe wild, I was just checking that web site again...
15:58 jberger ah, the official client is python and I'm assuming that's what is using the weird protocol
15:59 jberger mucking with virtualenv is so annoying though ...
15:59 asm35 joined #mojo
16:00 akhasanov joined #mojo
16:28 sri so, i guess we are all in agreement about how $ua->cookie_jar->ignore(...) is supposed to work http://mojolicio.us/perldoc/Mojo/UserAgent#cookie_jar
16:35 good_news_everyon joined #mojo
16:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZrEi
16:35 good_news_everyon mojo/master 1a16400 Sebastian Riedel: dots are ignored earlier now
16:35 good_news_everyon left #mojo
17:27 asm35 joined #mojo
17:27 Kogurr joined #mojo
17:31 thowe hm, finally got OpenBSD's slowcgi to work with nginx...
17:32 jberger thowe: oh dear gods why?
17:32 thowe So I can run some cgi crap this guy has hosted on my stuff forever but still move to nginx
17:33 thowe I'm thinking about just tossing all these people out...  been hosting some of this stuff for 10 years...
17:33 thowe oh, also awstats
17:34 thowe hmm..  I bet I could replace that with a mojo lite app.  I wonder if the awstats guys would be interested.
17:41 jberger thowe: there is this too, never used it myself
17:41 jberger https://metacpan.org/pod/Mojolicious::Plugin::CGI
17:42 thowe huh.  I might be able to use that at work as a stop-gap before I rewrite the horrow show that feeds the bill printer.
17:43 thowe er horror.  Horror is less horrible when said  like "horrow".  Sounds like saying hello with your mouth full.
17:43 thowe horrow! \o
17:44 jberger "You can't say hippo"
17:45 jberger The few people that know that reference are laughing, everyone else ...
17:45 thowe if you try to you spit?
18:09 nigel joined #mojo
18:18 mattastrophe joined #mojo
18:30 mishanti1 Well, that is two hours I'm never getting back...
18:31 mishanti1 Must sat I like bugs in test-code less than bugs in the code under test.
18:31 mishanti1 s/sat/say/
18:34 ZoffixWork joined #mojo
18:36 ZoffixWork mishanti1, two hours? Pfft.... I once charged $450 for an app that took me 20 minutes to write. Joyous with the success, I went on to test it in IE6... and then spent 14 hours trying to find the bug. What was it? My using '_' character in my local test domain that makes IE ignore CSS :)
18:38 bobkare joined #mojo
18:40 jberger ZoffixWork: :o
18:40 mishanti1 ZoffixWork: Ouch. Ego still hurting from that one?
18:41 ZoffixWork Oh yeah
18:46 asm35 joined #mojo
18:50 mishanti1 The joys of working in tech.
19:16 mudler joined #mojo
19:18 meredith joined #mojo
19:32 Grinnz batman, it's configurable, i set it to 0.5s by default
19:45 jberger a ha! got a working (if untrusted) cert working via letsencrypt
20:05 thowe jberger, \o/
20:27 Janos hi there, got a question, I need to generate a url for route in a mojo app, using url_for at the moment, but this app will be proxied so I need to consider the header X-Forwarded-Proto for the generated url protocol, is there any way for url_for to consider the proxy protocol ? or is there any other function that can provide this ? or should I just write this logic myself ?
20:37 ZoffixWork Janos, it works out of the box for me
20:37 ZoffixWork url_for('/foo')->to_abs results in the correct URL
20:42 Janos ZoffixWork, mm weird, let me double check
20:44 Janos well i'm using the same $c->url_for('/path')->to_abs->to_string
20:44 Janos there might be something wrong the reverse proxy
20:44 nigel joined #mojo
20:44 ZoffixWork I have this code http://bit.ly/1UOysat on http://demo.xtatik.org/ that's reverse-proxied to by apache. If I add a product to cart and follow the checkout process until I see the totals, I see 'http://demo.xtatik.org/cart/' as the value, not 'localhost:3005'
20:45 jberger hypnotoad has proxy => 1 settingh
20:45 jberger actually I'm not sure how that is done with the other servers :s
20:45 * jberger looks
20:46 ZoffixWork Ah, right, I do have that enabled
20:46 ZoffixWork Janos, ^
20:46 ZoffixWork I also have this in my Apache config: RequestHeader set X-Forwarded-Proto "http"
20:46 jberger I guess the assumption is that you wouldn't do reverse proxy to anything else but hypnotoad
20:47 Janos yup proxy => 1, the port part is working correctly, hypnotoad is listening in 3000 and the url has port default
20:48 Janos I have 'proxy_set_header X-Forwarded-Proto $scheme;' on my nginx setup, but maybe it's reaching the toad, is there any way to dump the entire request ?
20:48 Janos it's not*
20:49 Janos I'll print the headers real quick and see
20:57 Janos got it
20:58 Janos I was setting the header twice and mojo did not like it, the header had 2 values both with https
20:59 Janos ya it's working now, thanks a lot :)
21:01 ZoffixWork \o/
21:02 akhasanov joined #mojo
21:02 Grinnz yeah, only hypnotoad has the setting to account for reverse proxies
21:03 Grinnz i kind of would like it to apply to morbo, but i haven't cared enough to look into it yet :)
21:04 ZoffixWork Would be nice. Nice hypnotoad doesn't right on Windows, right? (/me recalls seeing that posted somewhere on teh webs)
21:05 ZoffixWork Not that morbo works any better. Impossible to develop with it. Rarely reloads by itself. And when it doesn't reload, you can't even kill it with CTRL+C, so you have to close the terminal and reopen one and restart it :)
21:06 ZoffixWork s/Nice/Since/; # what a typo 0.o
21:06 Grinnz "Nice hypnotoad doesn't right on Windows" - i think you accidentally some words
21:06 ZoffixWork s/right/run/;
21:06 ZoffixWork I had a few brews :P
21:06 Grinnz but yes, preforking does not work on windows in general
21:06 Janos that's not my experience with morbo, but I only have two simple mojo apps :P
21:06 Grinnz you mean morbo does that on windows?
21:07 ZoffixWork That's my experience with morbo on Windows Server 2008
21:07 Grinnz ah
21:07 ZoffixWork I've not tried it with any other Windows.
21:07 Grinnz yeah thats probably, as morbo also makes use of forking
21:07 Grinnz probable
21:08 jberger morbo is supposed to work on windows, but if there are problems we should look into it
21:08 jberger not that i have any windows I can test on
21:08 Grinnz i have a windows that i could install perl on i guess, but i just dont care enough yet...
21:09 Janos ZoffixWork, you develop mojo apps on windows ?
21:09 ZoffixWork Janos, not usually. I have just this one server where I have a choice between using mojo apps on Windows or using sticks and stone tools....
21:10 Grinnz heh
21:10 Grinnz the sticks and stones would probably cause less problems
21:10 ZoffixWork :)
21:11 Janos I feel for you man /cries
21:12 Janos I mean I do develop some thins on windows, but no using mojo, actually not using anything related to perl at all
21:12 Janos things*
21:12 Janos that would be painful :P
21:15 Grinnz perl works fine on windows. as long as you don't want to do anything related to files, sockets, processes, or case sensitivity
21:24 mishanti1 Grinnz: Hehe. Good one. :)
21:24 Janos yea that pretty much sums it up :P
21:30 sri Grinnz: reverse proxy support for morbo makes no sense
21:30 Grinnz why?
21:30 ZoffixWork sri, how do you run mojo apps on windows?
21:30 sri daemon?
21:30 ZoffixWork Ah, right
21:31 sri do not use morbo in production, ever
21:31 sri it is optimized for portable and fast restarting, not performance
21:32 ZoffixWork I don't know why I immediately thought of morbo when I learned hypnotoad doesn't work on Windows :)
21:32 Grinnz sri, we use the same reverse proxy setup for development as for production, it's required as some assets are served by apache directly
21:32 sri always consider daemon and prefork too
21:33 sri Grinnz: seems odd
21:33 sri but you can do MOJO_PROXY=1
21:33 Grinnz yeah, i thought i remembered something like that
21:33 sri no wait
21:33 sri MOJO_REVERSE_PROXY=1
21:35 Grinnz sri, it's also so that our development sandboxes can be served as subdomains by apache, instead of just ports
21:35 sri using an actual reverse proxy in development, is that a thing?
21:35 sri anyone else doing that?
21:36 ZoffixWork Um.. I *might* be doing it, reverse-proxying for a specific /path/ and getting the cookies.
21:36 ZoffixWork But it's a really edge-case setup, due to the horrid tech I have to work with
21:37 sri horrible setups don't count
21:37 Janos I do use it, I serve my angular front-end with grunt and express and proxy the /api requests to my mojo app, in development
21:37 Grinnz i think having the proxying server serve static assets isn't that rare (though thats actually not what apache is serving for us)
21:37 ZoffixWork :)
21:37 sri if there's more people doing it in a sensible setting, i'm ok with a morbo command line switch
21:38 sri Grinnz: it's easy enough to have mojo serve assets during development
21:38 Grinnz true
21:38 sri and then have nginx serve them in staging/production
21:40 sri worst case, more people start assuming morbo is ok in production because it supports reverse proxies natively
21:41 Grinnz maybe an additional warning in https://metacpan.org/pod/Mojo::Server::Morbo would be good
21:42 sri which is pretty bad, because the folks that get this stuff wrong are also the same that will publish bad benchmarks and complain loudly :)
21:42 ZoffixWork ehehe
21:43 Grinnz it's discussed in the tutorial and in the deployment cookbook section, the cookbook mentions "only use in development" but the tutorial doesn't
21:44 sri "...L<morbo> development web server..."
21:44 sri that't literally how it is introduced in the tutorial
21:48 mishanti1 Whenever I need to test proxy-stuff during development I use hypnotoad. Works just fine. I do that rarely enough that I think proxy-support in morbo might just be confusing, like sri mentioned.
21:52 akhasanov_ joined #mojo
22:25 CromeDome joined #mojo
22:27 Grinnz MOJO_REVERSE_PROXY is sufficient for my purposes, either way
22:32 CromeDome joined #mojo
22:34 mst joined #mojo
22:36 ZoffixWork Bender, trust me
22:36 Bender But I don't trust you in #mojo, ZoffixWork
22:36 ZoffixWork Bender, but I love you!
22:36 ZoffixWork >:)
22:36 nigel joined #mojo
22:46 akhasanov__ joined #mojo
23:02 cpan_mojo XTaTIK-0.004001 by ZOFFIX https://metacpan.org/release/ZOFFIX/XTaTIK-0.004001
23:04 meshl joined #mojo
23:22 Adura joined #mojo
23:33 thowe I just tweeted at mst.  I've clearly had too much beer already.
23:34 Grinnz https://twitter.com/MST_BUS ?
23:34 Grinnz that is an odd account to tweet at :)
23:35 thowe um.  no.
23:35 thowe it would be
23:35 good_news_everyon joined #mojo
23:35 good_news_everyon [mojo] kraih tagged v6.19 at cc0888c: http://git.io/vZKe2
23:35 good_news_everyon left #mojo
23:36 thowe \o/
23:37 good_news_everyon joined #mojo
23:37 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZKeX
23:37 good_news_everyon mojo/master 67bab07 Sebastian Riedel: bump version
23:37 good_news_everyon left #mojo
23:40 sri umm
23:40 sri https://github.com/kraih/mojo/commit/67bab07b39ca0856a4ad00fef1d6225ae4cb3ad2#diff-5f2b9d5eaf8e50899d8ffd7d7de4e6aaR1
23:40 sri Oo
23:40 sri what happened there
23:41 preaction your commith hath a lithp
23:41 good_news_everyon joined #mojo
23:41 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vZKv3
23:41 good_news_everyon mojo/master 028f083 Sebastian Riedel: this file should not exist
23:41 good_news_everyon left #mojo
23:43 sri makes no sense, no typos in my shell history
23:48 ZoffixMobile joined #mojo
23:53 jberger "using an actual reverse proxy in development, is that a thing?" I work remotely and thus develop remotely
23:53 jberger the data is sensitive (medical) and thus ssl is a must
23:53 jberger and ssl termination in nginx is easier (though of course the daemon can do it)
23:54 jberger knowing that the env var exists is good, I don't know how I missed that one :o
23:55 jberger for my purposes, mostly I develop using hypnotoad behind nginx and just do hypnotoad script/app to restart it
23:55 jberger but it might be handy to have morbo again
23:55 jberger (I also have lots of non-standard paths that it would have to watch)
23:56 jberger (so its not a certainty that it would be a whole lot more convenient tbh)
23:57 * ZoffixMobile has mobo-custom in their repo that launches morbo with all the custom watch paths and things
23:59 jberger that's a good point I could do that too
23:59 jberger though at that point I can just use the env var in the script too
23:59 ZoffixMobile true

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