2011-01-01ãã1å¹´éã®è¨äºä¸è¦§
èªå® ãµã¼ãã§ã¯ããã¯ã¢ããã¯ããªãé©å½ãªæãã ã£ãã®ã§ãããããæ¸ãæºãã¦ããã½ã¼ã¹ã®ç®¡çã¯ãããã®VPSã«ç§»ãããæé¡980åã®å¹´é1ä¸ã¡ãã£ã¨ã§å®å¿ãè²·ããã®ã¯ã¨ã¦ãå®ãã¨æã£ããã¡ã¢ãªã512Mã®ãã©ã³ãªã®ã§ä»ã«ã¯ãã¼ã ãµã¼ãã¨ãã移ãããããâ¦
ãããããã使ããããããªãã®ã§èª¿ã¹ã¦ã¿ãã shard æ¥æ¬èªã«è¨³ãã¨(ã¬ã©ã¹ãè²æ®»ã®) ãç ´çãã¨ãã£ããããªæå³ ãã¼ã¿ãã¼ã¹ãshardã«å解ãã¦è¤æ°ã®ãµã¼ãã«åæ£ãã¦éç¨ããã®ãDB sharding ãã¼ã¿ãã¼ã¹ãã¼ãã£ã·ã§ãã³ã°ã¨ãè¨ããã®ãããï¼ åä¸â¦
ãå®å ¨ç¬ç¿ çµ±è¨å¦å ¥éãå°å³¶å¯ä¹ èããåå¼·ä¸ã§ãä¸è¨ã®ãããªå½é¡ãå®éã«æ¤è¨¼ãã¦ã¿ãã ã³ã¤ã³ãNæåæã«æãã¦(ãããã¯Nåç¶ãã¦æãã¦),ãã®ãã¡ä½æã表ã«ãªã£ããããã¼ã¿ã¨ãã¦è¨é²ããããã®ä½æ¥ãè¨å¤§ã«å®è¡ãã¦ã表ã®ææ°Xã®åºãç¸å¯¾åº¦æ°ã®ãâ¦
ã2011-10-01 00:00:00ãã®ä¸ã¶æåã®Time::Pieceãªãã¸ã§ã¯ããåå¾ãããã¨ãããããªå ´åã«ã$t -= ONE_MONTHãã¿ãããªã³ã¼ããæ¸ãããæå³ããªãçµæã«ãªã£ã¦ãã¾ã£ãã詳ããã¯http://blog.clouder.jp/archives/000409.htmlã«æ¸ãã¦ããéãã以ä¸ã¯â¦
åå¿é²ã«è¨ãããªã¢ã¼ãã®ãµã¼ãã«ãã¼ã«ã«ã®PCããputtyã§ã¢ã¯ã»ã¹ããããã¨ããç¶æ³ã ãµã¼ãã§ssh-keygenã³ãã³ããå®è¡ çæã®éã®ãã¹ãã¬ã¼ãºã¯ãã£ã¦ããªãã¦ãããï¼ï¼ï¼ ~/.ssh/id_rsaã¨~/.ssh/id_rsa.pubãçæãããã mv ~/.ssh/id_rsa.pub ~/.â¦
ã¬ããªã±ã¼ã·ã§ã³ã®ç·´ç¿ããããã¨ããspiderã¨ã³ã¸ã³ã試ãã¦ã¿ããã¨ãã®åæ©ããã£ãã®ã§è¤æ°ã®mysqlãµã¼ããå¿ è¦ã¨ãªã£ãã使ããªããªã£ã¦ä¹ ããPentiumã®PCããµã¼ãã«ããã¨ããèããããã©é¢åãªã®ã§Macã®vmwareã§ãªãã¨ããããã¨æã£ããï¼Gã®ã¡ã¢â¦
æåã³ã¼ãé¢é£ã§ã®è¿½è¨ãã cmakeãå¿ è¦ã«ãªãã®ã§ã¤ã³ã¹ã³ http://www.cmake.org/cmake/resources/software.htmlããã½ã¼ã¹ããã¦ã³ãã¼ã ./bootstrap make make install mysqlã®ã¤ã³ã¹ãã¼ã« WEBä¸ã®ããã¥ã¢ã«ã¯ä¸è¨ãªã³ã¯ http://dev.mysql.com/doc/myâ¦
AnyEvent::JSONRPC::Liteããè¦ç¹ãæãåºãããµã¼ãå é¨ã®condvarãrecvãã¦ããç®æã ãµã¼ãå´ use strict; use warnings; use AnyEvent; use AnyEvent::Handle; use AnyEvent::Socket; use Data::Dumper; tcp_server '127.0.0.1', 8888, sub { my ($fh) â¦
AnyEvent::Handleã®æ±ãã«è¦å´ããã ioãtimerã®ã²ãã£ã¼å¤æ°ã®ããã«undefã§ãè¡ãããåç §ã«ã¦ã³ããæ®ã£ã¦ããã¨ã©ãããããªãã®ãããããAnyEvent::JSONRPC::Liteã§ãweaken $handleã¨ãã£ã¦ããé¨åãã©ããä»ã²ã¨ã¤ç解ã§ããã«ããã®ã ãã大äºã â¦
ããããã¨æ¸ãæ¹ãããï¼ã®ã§è¦å´ããã$handle->destroyããã¨ãããã¨ã¯ã½ã±ããæ¥ç¶ãåãã¨ãããã¨ã§ãããã®ã§ãã©ã®æç¹ã§ããã®ãããã¡ãã¨éä¿¡ãé ã®ä¸ã«æãæµ®ãã¹ãªãã¨ãããªãã ãµã¼ãå´ use strict; use warnings; use AnyEvent; use AnyEvâ¦
AnyEvent::HandleãAnyEvent::Socketã使ããä»åã¯telnetã使ããªãã§tcp_connectã使ã£ã¦ã¿ãã ãµã¼ãå´ãã¨ã³ã¼ããã¯ããæã«æ¹è¡æåãå ¥ããªãã¨ãããããã¯ãã¦ãã¾ãé¨åã§ã¯ã¾ã£ããlineå½¢å¼ã®ãã¼ã¿ã®ããåãã§ã¯æ¹è¡ãå¿ é ãªã®ããªã ãµã¼ãå´â¦
AnyEvent::Handleã使ã£ã¦å¯¾è©±ãããµã¼ããæ¸ã ãµã¼ããç«ã¡ä¸ãã¦telnetã§ã¢ã¯ã»ã¹ããã¨ååãèãããã®ã§çããã次ã«å¹´é½¢ã¾ã§èãã¦ããã®ã§çãã¾ããããã§å¯¾è©±ãçµäºããµã¼ãã®æ¹ããæ¥ç¶ãåã£ã¦ãã¾ããå³åã¯IOç£è¦ã®ä¸ã§ããã«ç£è¦ããã¦ããã¨â¦
æè¿ä½ãæ¸ãã¦ããªãã£ãã®ã§AnyEventã®å¾©ç¿ã§ãè¶ãæ¿ãã AnyEvent::Introã«ãè¼ã£ã¦ãããµã³ãã«ã æ®éã«æ¨æºå ¥åããã®å ¥åãå¾ ã¡åããã¹ã¯ãªããã¨ã©ãéãã®ï¼ã¨ãããããªçåãæã£ã¦ãã¾ããµã³ãã«ã use strict; use warnings; use AnyEvent; uâ¦
ãããã¦å ¬åã«éãã¾ãããã²ã¨ã¾ãç¡äºã§ãã
ãããããã¹ãã¼ãªã¼ã ã£ããã¹ããªãã¥ã¢ã«ãªãã¿ã§ãããã®ã§ããã¹ããªãã¥ã¢ã«ãã¨èããã ãã§æå¦åå¿ãèµ·ãã人ã«ã¯åãã¦ããªããããããªãããç£ç£ã¯ã¯ãªã³ãã»ã¤ã¼ã¹ãã¦ãããªã®ã§ããã©ã³ã¹æè¦ã¯ã¨ã¦ãããä»ä¸ãã£ã¦ããã¨ãæãããã®ä¸ã§â¦
ä»äºæã®ãããè¦ããã¨ã«ããããã¯ãªãã£ããä½äºããã£ããã¯å¥³ã®åã«æ¯ãããã¨ãããããããã¨ãªã®ããªã¨ä»æ´ãªããã«æããææµã«ä¹ã£ã¦ä¸æ°åµæã«ç©äºãé²ããã¨ããã®ãã¢ãªãªãã ããªããã ä¸çªãã£ããã¨æ¥ãã®ã¯ãã¼ãã¼ãã®å¦é·(ãµãã¼ãºï¼)ãâ¦
JSONRPCãµã¼ããç«ã¦ã¦ã¯ã©ã¤ã¢ã³ãããã®ãªã¯ã¨ã¹ããéåæã§è¿ãããã¨ããèª²é¡ ãµã¼ãã®ã¹ã¯ãªããã¯ä»¥ä¸ã®éãã use strict; use warnings; use AnyEvent::JSONRPC::Lite; use Data::Dumper; my $cv = AE::cv; my $server = AnyEvent::JSONRPC::Lite::â¦