2 Replies Latest reply on May 6, 2010 7:33 AM by 807574

    java distributed cache


      I want to start using distributed cache in my web application. My web application is running in cluster, currently on 5 computers.
      I want to use cache for:
      - pregenerated fragments of web pages
      - shared objects(home page text), which are stored in database
      - images - in my application I store user's images in database(for easyer backups). So I want to load all images at start of the application to cache on hardisk and then only load these images from hardisk on request

      All of these could be changed by users of application. So I have to be able to reload objects in cache on all machines. User of application will change object on one machine and all machines will reload this object from database.

      My application is running on tomcat, using hibernate to access postgres. Now I don't want to use cache for hibernate.

      I have find several cache frameworks, but I don't know, which one is the best. EHcache looks good, but I am not sure, if it is able to store cached objects to hardrive.

        • 1. Re: java distributed cache
          You may want to check out Hazelcast . It is an open source distributed, transactional distributed cache for Java. Hibernate second level cache plug-in is also available .

          Hazelcast is released under Apache license. It also have distributed lock, topic, multimap, queue and executor service implementations. [This 10 minute video|http://www.hazelcast.com/screencast.jsp] is very good to get started.

          • 2. NCache, the distributed Cache for JAVA

            I'll suggest you to use NCache which is a famous distributed caching product which support both .net and java. Apart from this you can also use NCache as 2nd level cache for Hibernate . it is extremely fast and scalable which allow you to add or remove data at run time. NCache is also famous for its wide range of topologies(Partition, Partition-Replica, Bridge Topology) which gives you an option to use it according to your requirement.