Announcement Announcement Module
Collapse
No announcement yet.
Caching, with memcached or ehcache? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Caching, with memcached or ehcache?

    Hi,

    what do you think which cache will be better, memcached or ehcache.

    ehcache is "inside" your services, so you may have GC Problems
    memcached is outside so you maybe have to change the businesslogic and you have the TCP overhead.

    the situations:

    many single called objects:

    1.000.000 objects to cache, 75% read Requests, 25 % writing

    1.000.000 objects to cache, 50% read Requests, 50 % writing

    1.000.000 objects to cache, 25% read Requests, 75 % writing

    some single called objects:

    1.000 objects to cache, 75% read Requests, 25 % writing

    1.000 objects to cache, 50% read Requests, 50 % writing

    1.000 objects to cache, 25% read Requests, 75 % writing


    some big objects (big object = list with 10.000 objects, reading the list objects, writing only single objects inside the list)

    1.000 big objects to cache, 75% read Requests, 25 % writing

    1.000 big objects to cache, 50% read Requests, 50 % writing

    1.000 big objects to cache, 25% read Requests, 75 % writing

    all this in situatioen where reads and writes counts: 1000 per sec and 1 per sec.


    what type of cache would you prefer and why ? are there other caches for this situations ?

    thank you

    mfg Gideon

  • #2
    Is the cache distributed (ie in a cluster)?

    Is the cache related to a relational database in anyway?

    Do you have persistent requirements?

    Do you need cache listeners for when a cache element is updated?

    There are a whole bunch of different Java caching systems to choose from, many implement different features and of course those features will have their affects on the system performance.

    I just went through a comparison of cache systems and distributed cache systems, and due to my requirements, I wound up with JBossCache, but EhCache was a close second. In fact, we did prototypes of both so that we could benchmark each one.

    Comment


    • #3
      We you able to integrate JBossCache's transaction manager with HibernateTransactionManager?
      From what I've seen JBossCache requires JTA

      Comment

      Working...
      X