Thursday, June 28, 2012
plack middleware and dancer
19:36]  I think with most deploys a front end reverse proxy like nginx is used for static content, but some application frameworks like dancer also support including static stuff
[19:37] == Raugturi [~Raugturi@unaffiliated/raugturi] has quit [Quit: WeeChat 0.3.7]
[19:37] == hemanth [~hemanth@182.71.223.66] has quit [Read error: Connection reset by peer]
[19:38] == hemanth [~hemanth@182.71.223.66] has joined #perl
[19:39]  dancer yeah I heard that is very nice
[19:39]  trying to outdo catalyst
[19:39]  eh
[19:39]  we do static files
[19:39]  but generally we don't recommend it
[19:39]  I work @ ruby rails shop
[19:39]  its nice it seems but eats RAM
[19:39]  like mofo
[19:40]  not because dancer can't handle it, but because you shouldn't be putting your assets on the webapp layer, going through all the stack
[19:40]  let memcached handle them?
[19:40]  or varnish?
[19:40]  instead you should either be putting them on your varnish (cache server), your nginx (reverse-proxy) or in a plack middleware
[19:40]  or mogileFS?
[19:40]  in plaq middleware?
[19:40] == Jayefuu [~Jayefuu@96.26.101.103] has quit [Ping timeout: 250 seconds]
[19:40]  and dancer supports middlewares fully
[19:40]  why there?
[19:40]  yes
[19:40]  there's a nice one that handles assets nicely
[19:41]  https://metacpan.org/module/Plack::Middleware::Assets
[19:41]  concatenates, minifies, has expires
[19:41]  this helps quite a bit
[19:41] == zellio [~zellio@rrcs-72-43-96-54.nyc.biz.rr.com] has joined #perl
[19:41]  rails supports that too, but you have to go through the stack with your request
[19:42]  the plack middleware handles it before dancer (or whatever other framework you're using)
[19:42]  also, it's above the framework, so you can switch frameworks and it will still work seamlessly
[19:42]  also, it's 5:40am and i think i should probably go to sleep
[19:42]  no shit
[19:42]  nice
[19:42]  yeah
[19:42]  can it call to mogileFS?
[19:43]  and in dancer you can set up middlewares already in the config and it loads automatically
[19:43]  wat u think of ha proxy v perlbal
                                
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment