常è§çjavaç¼åæ¡æ¶æï¼
OSCache
ããOSCacheæ¯ä¸ªä¸ä¸ªå¹¿æ³éç¨çé«æ§è½çJ2EEç¼åæ¡æ¶ï¼OSCacheè½ç¨äºä»»ä½Javaåºç¨ç¨åºçæ®éçç¼å解å³æ¹æ¡ã
ããOSCacheæ以ä¸ç¹ç¹ï¼
ããç¼åä»»ä½å¯¹è±¡ï¼ä½ å¯ä»¥ä¸åéå¶çç¼åé¨åjsp页é¢æHTTP请æ±ï¼ä»»ä½java对象é½å¯ä»¥ç¼åã
ããæ¥æå
¨é¢çAPI--OSCache APIç»ä½ å
¨é¢çç¨åºæ¥æ§å¶ææçOSCacheç¹æ§ã
ããæ°¸ä¹
ç¼å--ç¼åè½éæçåå
¥ç¡¬çï¼å æ¤å
许æè´µçå建ï¼expensive-to-createï¼æ°æ®æ¥ä¿æç¼åï¼çè³è½è®©åºç¨éå¯ã
ããæ¯æé群--é群ç¼åæ°æ®è½è¢«å个çè¿è¡åæ°é
ç½®ï¼ä¸éè¦ä¿®æ¹ä»£ç ã
ããç¼åè®°å½çè¿æ--ä½ å¯ä»¥ææ大é度çæ§å¶ç¼å对象çè¿æï¼å
æ¬å¯æå
¥å¼çå·æ°çç¥ï¼å¦æé»è®¤æ§è½ä¸éè¦æ¶ï¼ã
ããå®æ¹ç½ç«
http://www.opensymphony.com/oscache/Java Caching System
ããJSC(Java Caching System)æ¯ä¸ä¸ªç¨åå¸å¼çç¼åç³»ç»ï¼æ¯åºäºæå¡å¨çjavaåºç¨ç¨åºãå®æ¯éè¿æä¾ç®¡çåç§å¨æç¼åæ°æ®æ¥å éå¨æwebåºç¨ã
ããJCSåå
¶ä»ç¼åç³»ç»ä¸æ ·ï¼ä¹æ¯ä¸ä¸ªç¨äºé«é读åï¼ä½éåå
¥çåºç¨ç¨åºã
ããå¨æå
容åæ¥è¡¨ç³»ç»è½å¤è·å¾æ´å¥½çæ§è½ã
ããå¦æä¸ä¸ªç½ç«ï¼æéå¤çç½ç«ç»æï¼ä½¿ç¨é´ææ§æ´æ°æ¹å¼çæ°æ®åºï¼èä¸æ¯è¿ç»ä¸æçæ´æ°æ°æ®åºï¼ï¼è¢«éå¤æç´¢åºç¸åç»æçï¼å°±è½å¤éè¿æ§è¡ç¼åæ¹å¼æ¹è¿å
¶æ§è½å伸缩æ§ã
ããå®æ¹ç½ç«
http://jakarta.apache.org/turbine/jcs/EHCache
ããEHCache æ¯ä¸ä¸ªçº¯javaçå¨è¿ç¨ä¸çç¼åï¼å®å
·æ以ä¸ç¹æ§ï¼å¿«éï¼ç®åï¼ä¸ºHibernate2.1å
å½å¯æå
¥çç¼åï¼æå°çä¾èµæ§ï¼å
¨é¢çææ¡£åæµè¯ã
ããå®æ¹ç½ç«
http://ehcache.sourceforge.net/JCache
ããJCacheæ¯ä¸ªå¼æºç¨åºï¼æ£å¨åªåæ为JSR-107å¼æºè§èï¼JSR-107è§èå·²ç»å¾å¤å¹´æ²¡æ¹åäºãè¿ä¸ªçæ¬ä»ç¶æ¯æ建å¨æåçåè½å®ä¹ä¸ã
ããå®æ¹ç½ç«
http://jcache.sourceforge.net/ShiftOne
ããShiftOne Java Object Cacheæ¯ä¸ä¸ªæ§è¡ä¸ç³»åä¸¥æ ¼ç对象ç¼åçç¥çJava libï¼å°±åä¸ä¸ªè½»é级çé
ç½®ç¼åå·¥ä½ç¶æçæ¡æ¶ã
ããå®æ¹ç½ç«
http://jocache.sourceforge.net/SwarmCache
ããSwarmCacheæ¯ä¸ä¸ªç®åä¸ææçåå¸å¼ç¼åï¼å®ä½¿ç¨IP multicastä¸åä¸ä¸ªå±åç½çå
¶ä»ä¸»æºè¿è¡é讯ï¼æ¯ç¹å«ä¸ºé群åæ°æ®é©±å¨webåºç¨ç¨åºè设计çãSwarmCacheè½å¤è®©å
¸åç读æä½å¤§å¤§è¶
è¿åæä½çè¿ç±»åºç¨æä¾æ´å¥½çæ§è½æ¯æã
ããSwarmCache使ç¨JavaGroupsæ¥ç®¡çä»å±å
³ç³»ååå¸å¼ç¼åçé讯ã
ããå®æ¹ç½ç«
http://swarmcache.sourceforge.netTreeCache / JBossCache
ã ãJBossCacheæ¯ä¸ä¸ªå¤å¶çäºå¡å¤çç¼åï¼å®å
è®¸ä½ ç¼åä¼ä¸çº§åºç¨æ°æ®æ¥æ´å¥½çæ¹åæ§è½ãç¼åæ°æ®è¢«èªå¨å¤å¶ï¼è®©ä½ è½»æ¾è¿è¡JBossæå¡å¨ä¹é´ çé群工ä½ãJBossCacheè½å¤éè¿JBossåºç¨æå¡æå
¶ä»J2EE容å¨æ¥è¿è¡ä¸ä¸ªMBeanæå¡ï¼å½ç¶ï¼å®ä¹è½ç¬ç«è¿è¡ã
ããJBossCacheå
æ¬ä¸¤ä¸ªæ¨¡åï¼TreeCacheåTreeCacheAOPã
ããTreeCache --æ¯ä¸ä¸ªæ å½¢ç»æå¤å¶çäºå¡å¤çç¼åã
ããTreeCacheAOP --æ¯ä¸ä¸ªâé¢å对象âç¼åï¼å®ä½¿ç¨AOPæ¥å¨æ管çPOJO(Plain Old Java Objects)
ãã注ï¼AOPæ¯OOPç延ç»ï¼æ¯Aspect Oriented Programmingç缩åï¼æææ¯é¢åæ¹é¢ç¼ç¨ã
ããå®æ¹ç½ç«
http://www.jboss.org/products/jbosscacheWhirlyCache
ããWhirlycacheæ¯ä¸ä¸ªå¿«éçãå¯é
ç½®çãåå¨äºå
åä¸ç对象çç¼åãå®è½å¤éè¿ç¼å对象æ¥å å¿«ç½ç«æåºç¨ç¨åºçé度ï¼å¦åå°±å¿
é¡»éè¿æ¥è¯¢æ°æ®åºæå
¶ä»ä»£ä»·è¾é«çå¤çç¨åºæ¥å»ºç«ã