Starlet ã HTTP/1.1 ã«å¯¾å¿ãã¾ãããããã«ããã§nginxã®upstream keepaliveãªã©ãæãã¨æããã¾ã https://metacpan.org/release/Starlet https://github.com/kazuho/Starlet ãªãããStarletã¯HTTP/1.0 + keepaliveãªãµã¼ãã§ããããversion 0.20ã«ã¦HTTP/1.1ã«å¯¾å¿ãã¾ãããå ·ä½çã«å¯¾å¿ããã¹ããã¯ã¯ä»¥ä¸ã HTTP/1.1 keepalive Transfer-Encoding: chunked (Request & Response) Expect HTTP Pipelining StarmanãMonocerosã¨ã ãããåãåããããããã«ãªã£ã¦ããã¨æããã¾ãã ãªããå°å ¥ã«ããã£ã¦ã¯ããªãã¼ã¹ãããã·çã¨çµã¿åãããå ´åã®åä½ãã¿ã¼ã³
PSGI/Plack/PSGIã¢ããªã±ã¼ã·ã§ã³ãåããæã«ä¸çªä½¿ããã¦ããã®ã¯ plackup ã§ãããã $ cat app.psgi use Plack::Builder; use MyApp; my $app = MyApp->psgi_app; builder { enable 'ServerStatus::Lite', => ..; $app; }; $ plackup -E production -s Starlet --max-workers 30 --port 5000 -a app.psgi plackup ã³ãã³ãã® -s ã«ãã³ãã©åãæå®ãã¦èµ·åãã¾ããæ¬çªç°å¢ã§ã¯ -E ã $ENV{PLACK_ENV} ãæå®ãã¦StackTraceãLintã¨ãã£ãéçºã«ä¾¿å©ãªPlack::Middlewareã追å ãããªãããã«ããå¿ è¦ãããã¾ããã Starmanã®å ´åã¯
Monoceros ã¨ããPSGI/Plackãµã¼ãæ¸ãã¾ãã https://metacpan.org/release/Monoceros https://github.com/kazeburo/Monoceros StarmanãStarletã®ãããªPreforkãªã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã§ã¯ãã³ãã¯ã·ã§ã³ã®ç¶æã¤ã³ã¼ã«ããã»ã¹ã®å æãªã®ã§ãHTTPã®KeepAliveã¯ç¡å¹ã«ããã®ãä¸è¬çã§ãããè² è·ã®é«ããµã¼ãã¹ã§ã¯TIME_WAITç¶æ ã®ã½ã±ãããæºã¾ã£ãããSYN-ACKã®åéåé¡ãªã©ãããKeepAliveã使ãããã¨ãã欲æ±ããã£ãããªãã£ãããã¾ãã Monoceros ã¯ãªã¯ã¨ã¹ããå¦çããworkerã®ä»ã«ãã¤ãã³ãããªãã³ã§åãã³ãã¯ã·ã§ã³ç®¡çããã»ã¹ãç«ã¦ã¦ãã¯ã©ã¤ã¢ã³ãããã®æ¥ç¶ã½ã±ãããunix domain socketã使ãããã»ã¹éã§ããã¨ããã¾ããå¾ æ©
Starmanã¨Starletã®éãã¯ããã¤ãããã¾ãããStarletã«ããã¤ãæãå ãããã¨ãé度ã¯ã©ããªã£ã¦ããã®ãæ¯è¼ãã¦ã¿ãã ãªãã以ä¸ã®è¨äºã¯Hello Worldã®ãã³ããã¼ã¯ãªã®ã§ãå®éã®ã¢ããªã±ã¼ã·ã§ã³ã®ããã©ã¼ãã³ã¹ã«ã¯ãã¾ãå½±é¿ããªãã¨æããã¾ãã åã½ããã¦ã§ã¢ã®ãã¼ã¸ã§ã³ã¯ä»¥ä¸ã Plack-1.0023 Starman-0.3008 Starlet-0.18 Starletã®ãã³ããã¼ã¯ã¨ã»ã¼åãã¢ããªã±ã¼ã·ã§ã³ãæ¸ãã¦ãµã¼ããèµ·åãã use Plack::Builder; use Plack::Request; my $length = 12; my $body = 'x'x$length; builder { enable 'AccessLog', logger => sub { }; sub { my $env = shift; my $req = P
æè¿ã®Plackã¨Starletã«ã¯ããã©ã¼ãã³ã¹æ¹åã®ãã次ã®ãããªå¤æ´ãå ãããã¦ãã¾ãã Plackã«å¯¾ããå¤æ´ã(ã«ãã³å ã¯ãã¼ã¸ã§ã³) Plack::Request::query_parameters ã®æé©åã(1.0018) Plack::Middleware::AccessLog ã« Apache::LogFormat::Compilerã®å°å ¥ (1.0023) Starletã«å¯¾ããå¤æ´ local $SIG{..} ãç¡ãããrt_sig* system call ãå¼ã°ããåæ°ãåæ¸ (0.17_01) headerã¨bodyãçµåãã¦ä¸åº¦ã«åºåããé¾å¤ã1024ãã8192ã«å¤æ´ (0.18) ãã³ããã¼ã¯ ãããã®å¤æ´ã®å¹æã確èªããããã«ã次ã®ãã³ããã¼ã¯ãå®è¡ãã¦ã¿ã¾ã ã¾ãã¢ããªã±ã¼ã·ã§ã³ã¯ãããªæã use Plack::Builder; use Plac
ãããããã¼ãªè² è·ãåãã¦ããPSGIã¢ããªã±ã¼ã·ã§ã³ã§ããªãã§ããã§è² è·ããããã®ï¼ãçãªç¾è±¡ããã£ãã®ã§äºã¤ã»ã©Tipããã¡ãªã¿ã«ãã㯠2013/03/06æç¹ã§ã®è©±ãªã®ã§ããããããããªãã大åå°æ¥ã«èªãã§ããã®ãªããç¶æ³ã«å¤æ´ããªããã¡ããã¨ç¢ºèªãããã¨ï¼ ã¾ããã®ã話ã®åæï¼mod_perlãªã¢ããªãPSGIã«ç§»è¡ãããã£ããã¢ããªã¯mod_perlãã³ãã©ã§æ¸ããã¦ããã®ã§ãApache::RequestãPlack::Requestã«æ¸ãæãããããã³ãã©é¨åããªãã¸ã§ã¯ãã«ãã¦ãã¬ã¤ã«ãããããã§ãåºæ¬çãªæ§é ã¯ä½ãå¤ãã¦ãªãï¼âãããã¤ã³ãï¼ããã¨ã¯Apacheå´ã¨ãè¨å®ãããããããã£ã¦ãPSGIãã¡ã¤ã«ãæ¸ãã¦ãStarletã§ãããã¤ãã¦ãããã©ã¼ãã³ã¹ã30%ãããæªããªã£ãããã¦ãç¯äººã¯èª°ã§ãããï¼ ã¾ãã¢ããªã±ã¼ã·ã§ã³ãçµãå´ãããã£ã¡ã¾ã£ããªãï¼ããªä»¶ï¼P
https://metacpan.org/module/Plack::Middleware::AxsLog Plack::Middleware::AccessLog ã¿ãããªãã¤ã ãã©ããããã¯ã·ã§ã³ç°å¢ã§ã¤ãããããããã«ã¤ãããã¦ãããã©ã¼ãããã®ã«ã¹ã¿ãã¤ãºãããã¾ã§ããªããã©ãéãã¨ããã®ãä¸çªã®ã¡ãªããã§ããã ã¢ã¯ã»ã¹ãã°ãå ¨é¨ã®ãªã¯ã¨ã¹ãã«ã¤ãã¦ã¨ãã®ã¯ããã©ãã£ãã¯ããããµã¤ãã®å ´åã«ã¯ãã¤ããã ãã©ãããããå ´åã¨ãã«ãã¤ãããããã«ãªã£ã¦ã¾ãã ãã¨ã©ã¼ã®ã¨ãã ããã°ãã¯ããã¨ããã®ã¨ãã¬ã¹ãã³ã¹ãããã®ã«æéããã£ãã¨ãã ããã°ãã¯ããã¨ããã®ãã§ããã®ã§ãmultilog ã«ãªããã¦ããã¦ãªããã¦ãã ãã§åé¡ç¹ããã£ã¨ææ¡ã§ãã¦ä¾¿å©ã§ãã kazeburo++
https://github.com/fujiwara/Plack-Middleware-GTop-ProcMem Plack ã¢ããªã±ã¼ã·ã§ã³ããã©ããã®å¦çã§ã¡ã¢ãªã使ãããã¦ããã»ã¹ã太ãããããã§ããããã©ã®URLãå¦çããã¨ããªã®ããåãããªããã¨ããå ´åã«ãã㪠Middleware ã使ãã°èª¿ã¹ãããããªã¨ããã®ã§æ¸ãã¦ã¿ãã GTop.pm ã使ã£ã¦ããã®ã§ãlibgtop ã使ããç°å¢ã§ãªãã¨åãã¾ããã 使ãå´ã¯ callback ã« app å¦çéå§åå¾ã® GTop::ProcMem ãªãã¸ã§ã¯ãã渡ã£ã¦ããã®ã§ããããåç §ãã¦ãã°ã«åããªãããããªã«ããæãã§ã use Plack::Builder; use Plack::Request; use Log::Minimal; builder { enable 'GTop::ProcMem', callback =>
以åhttp://tech.naver.jp/blog/?p=1369ã®è¨äºãèªãã ã®ã ããã©ãããã¾ã§ã«processã®ç¥èãç¡ãã£ãããã¦ãã¾ã£ããç解ã§ãã¾ããã§ãããããã§Working with UNIX ProcessesãServer::Starterã®ä¸èº«ãå¼ãã§ããããhot deployã®ä»çµã¿ãç解ã§ãã(æ°ã«ãªã£ã¦ãã)ã®ã§ãServer::Starterã®å®è£ ã追ããªããããããã¾ã¨ãã¦ã¿ã¾ãã hot deployã¨ã¯ hot deployã¨ã¯ãåèµ·åã®æã«ãªã¯ã¨ã¹ãã®å¦çãç¶ããªãããå¤æ´ã®å 容ãåæ ããããã®æ段ãã§ãã é常serverãrestartãããã¨ãã¯ãstop -> startã®æµãã«ãªãã¨æãã¾ããããã®å ´åstopãã¦ãããstartåºæ¥ãã¾ã§ã®æéã«ãªã¯ã¨ã¹ããå¦çã§ããªãæéãçºçãã¾ãããã®æéãªãã«deployããä»çµã¿ãhot
ã¢ããªã±ã¼ã·ã§ã³ã§å©ç¨ããã¢ã¸ã¥ã¼ã«ã¯ãã§ããéãå èªã¿(preload)ãã¦ãããããå èªã¿ãã¦ããã°ãã¢ããªã±ã¼ã·ã§ã³å ¨ä½ã®ã¡ã¢ãªæ¶è²»ãæããããããé 延ãã¼ã(Lazy Load)ã®ã³ã¹ãããªããªãã¾ãã ã¢ã¸ã¥ã¼ã«ã®å èªã¿ã¯ãä¾ãã°ä»¥ä¸ã®ããã«è¡ãã¾ãã starman --preload-app MyApp app.psgi or starman -MFoo -MFoo::Bar -MBaz::DBI app.psgi ããã¦é 延ãã¼ãããã¨ããå ´åãé¤ãã¦ãå èªã¿ã¯è¡ã£ã¦æã¯ãªãã¯ã(å°ããã¢ããªã ã¨ãå¹æã¯å°ããã§ãã ^-^)ã Plack::Middleware::Debug::LazyLoadModules æ示çã« use ããã¢ã¸ã¥ã¼ã«ç¾¤ã®ããã¯ã¢ããã¯ããããããªã«ãæ示ããã¦ãããããããããæé»ã«é 延ãã¼ãããã¦ãã¢ã¸ã¥ã¼ã«ãã©ã¤ãã©ãªã¯èª¿ã¹ã¦ã¿ãã¨å¤ãè¦ã¤ã
id:tokuhiromãHTML::Pictogram::MobileJpã¨ããã¢ã¸ã¥ã¼ã«ããªãªã¼ã¹ãã¦ããã®ã§ãããã使ã£ãPlack::Middlewareãä½ã£ã¦ã¿ã¾ããã http://github.com/hirose31/Plack-Middleware-Pictogram-MobileJp ãã¢ãã¤ã«ç¨ã®HTMLã®ãã§ãã¯ãå®æ©ãFireMobileSimulatorã§ããããã®ã ãã©ã&#xXXXX;ã§çµµæåãæå®ããã¨ãã³ã¢ä»¥å¤ã®ã¯ã©ã¤ã¢ã³ãã§çµµæåã表示ãããªãã®ã§ãã§ãã¯ã«ãªããªãã ã¨ãããããªå ´åã«ããã®Middlewareãä»ãã¦è¡¨ç¤ºããã°ãã¯ã©ã¤ã¢ã³ãã®User-Agentãã¿ã¦ãã£ãªã¢ã«å¿ããçµµæåã®ã³ã¼ããã¤ã³ãã«å¤æãã¦ã³ã³ãã³ããè¿ãã¦ãããã®ã§ä¾¿å©ãªããããªããã¨æãã¾ãã ããã·ã³ãã«ã§ããããããªæãã§ä½¿ãã¾ãã # psgi use Plac
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
Plack is a superglue for Perl web frameworks that provides a common interface called PSGI (Perl Server Gateway Interface). PSGI allows any web application that returns status, headers, and content to work with any PSGI-compliant web server without needing server-specific code. Plack provides middleware, servers, and tools to develop and run PSGI applications. It allows frameworks like Catalyst, Da
ã¬ã¹ãã³ã¹ãããã«ExpiresãCache-Controlã追å ãããã¨ã§ããã©ã¦ã¶ã®ãã£ãã·ã¥ãæå¹æ´»ç¨ãããã¦ã³ãã¼ãã®æéããªããäºã§ã¦ã§ãã®é«éåãå®ç¾ã§ãã¾ããã¾ããµã¼ãå´ã«ã¨ã£ã¦ããªã¯ã¨ã¹ãæ°ãæ¸ããäºãã§ããè² è·ã®åæ¸ã«ããªãã¾ã Apacheã«ã¯ExpiresãCache-Controlãä»å ããmod_expiresã¨ããã¢ã¸ã¥ã¼ã«ãããã¾ãããPlackã«ã¯ã¾ã ãªãã£ãã®ã§ä½ã£ã¦ã¿ã¾ãããVarnishã®ããã«Webãµã¼ãæ©è½ãæããªããªãã¼ã¹ãããã·ã使ãå ´åã«ã¯ã便å©ãªããããªãããªãã¨æãã¾ã CPANã«ãªãªã¼ã¹æ¸ã¿ã§ã http://search.cpan.org/dist/Plack-Middleware-Expires/ 使ãæ¹ builder { enable 'Expires', content_type => [ 'text/css', 'appli
æè¿ãå¼ç¤¾ã§ãããã¤ãã®ãµã¼ãã¹ã§Starmanãåãå§ãã¦ã¾ãããªã½ã¼ã¹ç£è¦å¨ã¨ãã¦StarmanãStarletã¨ãã£ãPreforkãªPlackãµã¼ãã«ããã¦ãApacheã®mod_statusåæ§ã使ç¨ããã¦ããããã»ã¹æ°ãã¢ã¤ãã«ä¸ã®ããã»ã¹æ°ãå½ç¶ç¥ãããããã§ããCloudForecastã§ã°ã©ãã«ãããããã§ãã ãã§ã«cho45æ°ããã®æ©è½ãå®ç¾ãã¦ãã¾ããcho45++ã§ãããã ãã¹ãã¼ã¿ã¹è¡¨ç¤ºãè¡ãMiddlewareã®ä»ã«ã¹ãã¼ã¿ã¹æ å ±ã®å¤æ´ãè¡ãããã«StarmanãStarletã®æ¬ä½ã«æãå ¥ãã¦ãããè¥å¹²ä½¿ãã«ããã¨ããå°è±¡ãæã£ã¦ãã¾ãããããã§Middlewareã ãã§ãMiddlewareã®ã§ããç¯å²ã§ã¹ãã¼ã¿ã¹ãå¤æ´ã»è¡¨ç¤ºããPlack::Middleware::ServerStatus::Liteãæ¸ãã¦ã¿ã¾ãããã½ã¼ã¹ã³ã¼ãã¯githubã«push
my $app = sub { [ 200, [ "Content-Type", "text/plain" ], [ "Hello World" ] ]; }; Sunaba is an experimental service powered by Plack, Twiggy and Tatsumaki running on a linode VPS box of Tatsuhiko Miyagawa. Sandbox perl environment is powered by Dan Kogai's lleval Ajax API and all restrictions apply. Services can be interrupted, shutdown or blocked at any time at their own will. NO WARRANTY. Use at
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
æè¿ãå³ã®ãããã§ãã°ãã«ãããå ¥ãã¾ããã 大å¤æ°ã®äººã¯å¿é ããã¦ãã ãã£ã¦ãããããã®ã§ãããããä¸é¨ã®æ¥µééãããããç»åãé£æãã¦ç¬ããã¦ãããããã§å ¨æ²»ã大åå ã«ãªãããã§ãã ããã°ãã¯ã å æ¥ããã¢ãã¤ã«ãªãã©ãããã©ã¼ã ã§ã® OAuth Signature ã®æ¤è¨¼ãã£ã¦ã¨ã³ããªã¼ãæ¸ããéã«Plack::Middlewareã¨ãã§ããã¹ãã¨ãæ¸ãã¦ããã¦æ¾ç½®ãã¦ããã®ã§ãããæ極éããã¨ã£ã¨ã¨æ¸ããªãã¨ç¬ããã¦ãã°ãã¸ãæããï¼ãããï¼ãã¨è ãã¦ããã®ã§ãµã¯ãã¨æ¸ãã¾ããã GitHubã«ç½®ãã¦ããã¾ãã Plack-Middleware-Auth-OAuth 使ãæ¹ã¯ç°¡åã use Plack::Builder; my $app = sub { return [200, ['Content-Type' => 'text/plain'], ['Hello World']];
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}