Ò»£º¶ÓÁеĸÅÄî¡¢Êý¾Ý½á¹¹
¶ÓÁУ¨Queue£©ÊÇÔËËãÊܵ½ÏÞÖƵÄÒ»ÖÖÏßÐÔ±í¡£Ö»ÔÊÐíÔÚ±íµÄÒ»¶Ë½øÐвåÈ룬¶øÔÚÁíÒ»¶Ë½øÐÐɾ³ýÔªËصÄÏßÐÔ±í¡£¶Ó⣨rear£©ÊÇÔÊÐí²åÈëµÄÒ»¶Ë¡£¶ÓÍ·£¨front£©ÊÇÔÊÐíɾ³ýµÄÒ»¶Ë¡£¿Õ¶ÓÁÐÊDz»º¬ÔªËØµÄ¿Õ±í¡£
¼ÙÉèÓиö¶ÓÁÐQ=£¨a1£¬a2£¬¡£¬an£©£¬Ôòa1Ϊ¶ÓÍ·ÔªËØ£¬anΪ¶ÓβԪËØ¡£ÔªËØÈë¶ÓµÄ´ÎÐòΪa1£¬a2£¬¡£¬an£¬¶ø³ö¶ÓµÄ´ÎÐòΪa1£¬a2£¬¡£¬an¡£¿É¼û¶ÓÁеIJÙ×÷ÊÇ°´ÕÕÏȽøÏȳöµÄÔÔò½øÐеġ£
ÆäËûÏêϸµÄ½éÉÜÇëÔÚÍøÉÏËÑË÷ºÜ¶à×ÊÁÏ¡£
¶þ£ºPHPµÄ¶ÓÁÐ
ÔÚPHPÖжÓÁÐÒÔÊý×éµÄÐÎʽ±íÏÖ¡£Êý×éÖеĵÚÒ»¸öÔªËØ×÷Ϊ¶ÓÍ·£¬×îºóÒ»¸öÔªËØ×÷Ϊ¶Ó⣬ÕâÑù¾Í¿ÉÒÔ²Ù×÷Õâ¸ö¶ÓÁÐÁË¡£
½á¹û¾ÍÊÇ
ÍøÉÏÓкܶà·â×°ºÃµÄÀ࣬¿ÉÒÔÖ±½ÓʹÓá£
array_push£º½«Ò»¸ö»ò¶à¸öµ¥ÔªÑ¹ÈëÊý×éµÄĩ⣨ÈëÕ»£©
array_unshift£ºÔÚÊý×鿪ͷ²åÈëÒ»¸ö»ò¶à¸öµ¥Ôª
array_pop£º½«Êý×é×îºóÒ»¸öµ¥Ôªµ¯³ö£¨³öÕ»£©
array_shift£º½«Êý×鿪ͷµÄµ¥ÔªÒƳöÊý×é
Èý£ºRuby Starling
StarlingÊÇÒ»¸öÖ§³ÖMemCacheÐÒéµÄÇáÁ¿¼¶³Ö¾Ã»¯·þÎñÆ÷¡£StarlingÊÇÈô´½¨ÍøÂç·ÃÎʶÓÁлòÕ߶à¸ö¶ÓÁÐÒì³£¼òµ¥£¬Ò²¾ÍÊÇ˵¶àµã ºÍ¶ą̀»úÆ÷¼äµÄÒì²½¹¤×÷½ø³Ì¡£ËüÊÇÖøÃû΢²©¿ÍÍøÕ¾Twitter¿ª·¢ÓÃÀ´´¦Àí´óÁ¿µÄ¶ÓÁÐÏûÏ¢£¬ÒÔ¼°±£³Ö·þÎñµÄÏìÓ¦¡£StarlingÒѾÔÚÉú²ú»·¾³ÖÐʹ Ó㬲»½öÊÇTwitterÔÚʹÓã¬FiveRunsͬÑùÔÚʹÓá£FiveRunsÉõÖÁ»¹¸ù¾Ý×Ô¼ºµÄÓ¦ÓÃ×öÁ˸Ľø¡£
StarlingºÍMemcacheʹÓõÄÊÇÒ»¸öÐÒéÖ»ÊǶ˿ڲ»Ò»Ñù¡£StarlingʹÓõÄÊÇ22122¶Ë¿Ú£¬MemcacheʹÓõÄÊÇ11211¶Ë¿Ú¡£
Ruby tar xzvf ruby-1.9.1-p0.tar.gz cd ruby-1.9.1-p0 ./configure --prefix=/usr/local/huiyangruby make make install Gem tar -zxvf rubygems-1.3.6.tgz cd rubygems-1.3.6 ruby setup.rb Starling gem install memcache-client starling starling starling & //ºǫִ́ÐÐ starling_top //²é¿´PSÐÅÏ¢
½ÓÏÂÀ´Äã¾Í¿ÉÒÔʹÓöÓÁÐ×ö×Ô¼ºµÄÊÂÇéÀ²¡£StarlingºÍMemcacheÓ÷¨Ò»Ñù£¬Á½ÕßÅäºÏ´¦Àí¸ü¼Ñ¡£
ʹÓÃMemcache£º£ºaddServer¿ÉÒÔ½¨Á¢Ò»¸ömemcacheÁ¬½Ó³Ø¡£Ëû²»Í¬ÓÚconnectÓëpconnectËûÊÇÔÚÓÐÇëÇóÊDzÅÁ¬½Ó£¬ÎÞÔò¶Ë¿ÚÁ¬½Ó¡£
Memcache£º£ºconnect -- ´ò¿ªÒ»¸öµ½MemcacheµÄÁ¬½Ó¡£
Memcache£º£ºpconnect -- ´ò¿ªÒ»¸öµ½MemcacheµÄ³¤Á¬½Ó¡£
Memcache£º£ºclose -- ¹Ø±ÕÒ»¸öMemcacheµÄÁ¬½Ó¡£
Memcache£º£ºset -- ±£´æÊý¾Ýµ½Memcache·þÎñÆ÷ÉÏ¡£
Memcache£º£ºget -- ÌáÈ¡Ò»¸ö±£´æÔÚMemcache·þÎñÆ÷ÉϵÄÊý¾Ý¡£
Memcache£º£ºreplace -- Ìæ»»Ò»¸öÒѾ´æÔÚMemcache·þÎñÆ÷ÉϵÄÏîÄ¿£¨¹¦ÄÜÀàËÆMemcache£º£ºset£©¡£
Memcache£º£ºdelete -- ´ÓMemcache·þÎñÆ÷ÉÏɾ³ýÒ»¸ö±£´æµÄÏîÄ¿¡£
Memcache£º£ºflush -- Ë¢ÐÂËùÓÐMemcache·þÎñÆ÷Éϱ£´æµÄÏîÄ¿£¨ÀàËÆÓÚɾ³ýËùÓеı£´æµÄÏîÄ¿£©¡£
Memcache£º£ºgetStats -- »ñÈ¡µ±Ç°Memcache·þÎñÆ÷ÔËÐеÄ״̬¡£
ËÄ£ºÕÅÑç×÷Æ·HTTPSQS
HTTPSQS£¨HTTP Simple Queue Service£©ÊÇÒ»¿î»ùÓÚ HTTP GET/POST ÐÒéµÄÇáÁ¿¼¶¿ªÔ´¼òµ¥ÏûÏ¢¶ÓÁзþÎñ£¬Ê¹Óà Tokyo Cabinet µÄ B+Tree Key/Value Êý¾Ý¿âÀ´×öÊý¾ÝµÄ³Ö¾Ã»¯´æ´¢¡£
ÓÐÐËȤµÄ¿ÉÒÔ¿´¿´ÍøÖ·£ºhttp://blog.s135.com/httpsqs_1_2/
Î壺¶ÓÁеÄÓ¦ÓÃ
¶ÓÁпÉÒԺܺõØÒì²½´¦ÀíÊý¾Ý´«Ëͺʹ洢£¬µ±ÄãƵ·±µØÏòÊý¾Ý¿âÖвåÈëÊý¾Ý¡¢Æµ·±µØÏòËÑË÷ÒýÇæÌá½»Êý¾Ý£¬¾Í¿É²ÉÈ¡¶ÓÁÐÀ´Òì²½²åÈë¡£ÁíÍ⣬»¹¿ÉÒÔ½«½ÏÂýµÄ ´¦ÀíÂß¼¡¢Óв¢·¢ÊýÁ¿ÏÞÖƵĴ¦ÀíÂß¼£¬Í¨¹ýÏûÏ¢¶ÓÁзÅÔÚºǫ́´¦Àí£¬ÀýÈçFLVÊÓƵת»»¡¢·¢ËÍÊÖ»ú¶ÌÐÅ¡¢·¢Ë͵ç×ÓÓʼþµÈ¡££¨ÎÄ/ºî»ÝÑô PHPer.yang£©
ÎҵIJ©¿Í£ºhttp://hi.baidu.com/phper_yang £¨http://www.phpx.in PHP½»Á÷£©
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ