Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

»º´æϵͳMemCachedµÄJava¿Í»§¶ËÓÅ»¯Àú³Ì

來Ô´£ºhttp://www.infoq.com/cn/articles/memcached-java
×÷Õß




á¯Îijõ

·¢²¼ÓÚ
2008Äê9ÔÂ27ÈÕ ÉÏÎç12ʱ38·Ö

ÉçÇø
Java
Ö÷Ìâ
¼¯ÈºÓ뻺´æ
Memcached ÊÇʲô£¿
MemcachedÊÇÒ»ÖÖ¼¯ÖÐʽCache£¬Ö§³Ö·Ö²¼Ê½ºáÏòÀ©Õ¹¡£ÕâÀïÐèÒª½âÊÍ˵Ã÷һϣ¬ºÜ¶à¿ª·¢Õß¾õµÃMemcachedÊÇÒ»ÖÖ·Ö²¼Ê½»º´æϵͳ£¬
µ«ÊÇÆäʵMemcached·þÎñ¶Ë±¾ÉíÊǵ¥ÊµÀýµÄ£¬Ö»ÊÇÔÚ¿Í»§¶ËʵÏÖ¹ý³ÌÖпÉÒÔ¸ù¾Ý´æ´¢µÄÖ÷¼ü×ö·ÖÇø´æ´¢£¬¶øÕâ¸öÇø¾ÍÊÇMemcached·þÎñ¶ËµÄÒ»¸ö»ò
Õ߶à¸öʵÀý£¬Èç¹û½«¿Í»§¶ËÒ²ÄÒÀ¨µ½MemcachedÖУ¬ÄÇô¿ÉÒÔ²¿·Ö¸ÅÄîÉÏ˵ÊǼ¯ÖÐʽµÄ¡£Æäʵ»Ø¹Ëһϼ¯ÖÐʽµÄ¹¹¼Ü£¬ÎÞ·ÇÁ½ÖÖÇé¿ö£ºÒ»Êǽڵã¾ùºâµÄÍø×´
£¨JBoss Tree
Cache£©£¬ÀûÓÃJGroupµÄ¶à²¥Í¨ÐÅ»úÖÆÀ´Í¬²½Êý¾Ý£»¶þÊÇMaster-Slavesģʽ£¨·Ö²¼Ê½Îļþϵͳ£©£¬ÓÉMasterÀ´¹ÜÀíSlave£¬±È
ÈçÈçºÎÑ¡ÔñSlave£¬ÈçºÎǨÒÆÊý¾ÝµÈ¶¼ÊÇÓÉMasterÀ´Íê³É£¬µ«ÊÇMaster±¾ÉíÒ²´æÔÚµ¥µãÎÊÌâ¡£ÏÂÃæÔÙ×ܽἸ¸öËüµÄÌصãÀ´Àí½âÒ»ÏÂÆäÓŵãºÍÏÞÖÆ¡£
ÄÚ´æ´æ´¢
£º²»ÑÔ¶øÓ÷£¬Ëٶȿ죬µ«¶ÔÓÚÄÚ´æµÄÒªÇó¸ß¡£ÕâÖÖÇé¿ö¶ÔCPUÒªÇóºÜµÍ£¬ËùÒÔ³£³£²ÉÓý«
Memcached·þÎñ¶ËºÍһЩCPU¸ßÏûºÄÄÚ´æ¡¢µÍÏûºÄÓ¦Óò¿ÊðÔÚÒ»Æð¡££¨ÎÒÃǵÄij¸ö²úÆ·ÕýºÃÓÐÕâÑùµÄ»·¾³£¬ÎÒÃǵĽӿڷþÎñÆ÷Óжą̀£¬ËüÃǶÔCPUÒªÇó
ºÜ¸ß——Ô­ÒòÔÚÓÚWS-SecurityµÄʹÓ㬵«ÊǶÔÓÚÄÚ´æÒªÇóºÜµÍ£¬Òò´Ë¿ÉÒÔÓÃ×÷MemcachedµÄ·þÎñ¶Ë²¿Êð»úÆ÷£©¡£
¼¯ÖÐʽ»º´æ£¨Cache£©
£º±Ü¿ªÁË·Ö²¼Ê½»º´æµÄ´«²¥ÎÊÌ⣬µ«ÊÇÐèÒª·Çµ¥µãÀ´±£Ö¤Æä¿É¿¿ÐÔ£¬Õâ¸ö¾ÍÊǺóÃ漯³ÉÖÐËù
×÷µÄ¼¯Èº£¨Cluster£©¹¤×÷£¬¿ÉÒÔ½«¶à¸öMemcached×÷Ϊһ¸öÐéÄâµÄ¼¯Èº£¬Í¬Ê±¶ÔÓÚ¼¯ÈºµÄ¶ÁдºÍÆÕͨµÄMemcachedµÄ¶ÁдÐÔÄÜûÓвî±ð¡£
·Ö²¼Ê½À©Õ¹
£ºMemcachedºÜÍ»³öµÄÒ»¸öÓŵã¾ÍÊDzÉÓÃÁË¿É·Ö²¼Ê½À©Õ¹µÄģʽ¡£¿ÉÒÔ½«²¿ÊðÔÚһ̨»úÆ÷ÉϵĶà¸ö
Memcached·þÎñ¶Ë»òÕß²¿ÊðÔÚ¶à¸ö»úÆ÷ÉϵÄMemcached·þÎñ¶Ë×é³ÉÒ»¸öÐéÄâµÄ·þÎñ¶Ë£¬¶ÔÓÚµ÷ÓÃÕßÀ´ËµÔòÊÇÍêÈ«ÆÁ±ÎºÍ͸Ã÷µÄ¡£ÕâÑù×ö¼ÈÌá¸ßÁ˵¥
»úµÄÄÚ´æÀûÓÃÂÊ£¬Ò²ÌṩÁËÏòÉÏÀ©ÈÝ£¨Scale Out£©µÄ·½Ê½¡£
SocketͨÐÅ£º
Õâ¶ùÐèҪעÒâ´«ÊäÄÚÈݵĴóСºÍÐòÁл¯µÄÎÊÌ⣬ËäÈ»Memcachedͨ³£»á±»·ÅÖõ½ÄÚÍø×÷Ϊ
»º´æ£¬Socket´«ÊäËÙÂÊÓ¦¸Ã±È½Ï¸ß£¨µ±Ç°Ö§³ÖTCPºÍUDPÁ½ÖÖģʽ£¬Í¬Ê±¸ù¾Ý¿Í»§¶ËµÄ²»Í¬¿ÉÒÔÑ¡ÔñʹÓÃNIOµÄͬ²½»òÕßÒì²½µ÷Ó÷½Ê½£©£¬µ«ÊÇÐòÁл¯
³É±¾ºÍ´ø¿í³É±¾»¹ÊÇÐèҪעÒâ¡£ÕâÀïÒ²ÌáÒ»ÏÂÐòÁл¯£¬¶ÔÓÚ¶ÔÏóÐòÁл¯µÄÐÔÄÜÍùÍùÈôó¼ÒÍ·Í´£¬µ«ÊÇÈç¹û¶ÔÓÚͬһÀàµ


Ïà¹ØÎĵµ£º

JAVA¶ÁÈ¡PDFÎļþ

ÔÚjavaÖÐÒª¶ÁÈ¡pdfÎļþÄÚÈÝ£¬ÎÒÃÇ¿ÉÒÔ½èÖúµÚÈý·½Èí¼þʵÏÖ¡£³£ÓõÄÊÇxpdf£¬±¾Îľͼòµ¥½éÉÜÔÚlinuxÏÂÈçºÎ°²×°xpdf£¬¼°ÔÚjavaÖÐÈçºÎÀûÓÃxpdf¶ÁÈ¡pdfÎļþÄÚÈÝ¡£
Ò».°²×°xpdf
       ÔÚfcϵÁÐÏ£¬²»Óð²×°£¬¿ÉÒÔÖ±½Óyum£¬µ«ÊDZÊÕß½¨Ò黹ÊÇÏÂÔØ°²×°µÄºÃ£¬ÒòΪ±ÊÕßÔø¾­Åöµ½¹ýÕâÑùµÄÎÊÌ⣬¿Í»§·þÎñ ......

java ×¢Êӹ淶

  ×ª×Ô£ºhttp://gyhgc.javaeye.com/blog/225039
  ÔÚÈí¼þ¿ª·¢µÄ¹ý³ÌÖÐ×ÜÊÇÇ¿µ÷×¢Ê͵Ĺ淶£¬µ«ÊÇûÓÐÒ»¸ö¾ßÌåµÄ±ê×¼½øÐÐ˵Ã÷£¬Í¨³£¶¼ÊÇÔÚ´úÂë±àд¹æ·¶Öмòµ¥µÄÃèÊö¼¸¾ä£¬²»ÄÜ×÷Ϊһ¸ö´úÂë×¢Êͼì²éµÄ±ê×¼ºÍÒÀ¾Ý£¬×öʲô¶¼ÒªÓÐÒ»¸öÒÀ¾ÝÂð:),ÏÖÔÚÎÒÌØÕûÀíÁËÒ»¸ö¡¶JavaµÄ×¢Ê͹淶¡·£¬ÄÚÈÝÀ´×ÔÍøÂç¡¢Êé¼®ºÍ×Ô¼ºµÄ ......

java´æ´¢Í¼Æ¬µ½Êý¾Ý¿â

1   mysql´æ´¢´óÈÝÁ¿µÄ¶þ½øÖÆÎļþµÄ¸ñʽÊÇblob£¬Æäʵ³ýÁËͼƬ»¹¿ÉÒÔ´æ±ðµÄ
2   ÒªÏòÊý¾Ý¿â´æ´¢¶þ½øÖƵÄÎļþÒ»¶¨Òª°ÑÒª´æ´¢µÄÊý¾Ýת»»³É¶þ½øÖÆÁ÷
·Ï»°¾Í²»¶à˵ÁË£¬´ó¼Ò¿´¿´´úÂëºÜÈÝÒ×Ã÷°×£¬ÏÈÀ´¿´Ò»¸öapp³ÌÐò£¬µ±È»Ê×ÏÈÄúÒªÔÚÊý¾Ý¿âÖÐÏȽ¨Á¢Ò»¸öÓÃÓÚ±£´æͼƬµÄ±íºÍÏàÓ¦µÄÁУ¬Êý¾Ý¸ñʽΪblob
package ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ