JTraining Blog

Share your knowledge.
Tags >> Caching
sneake75@hotmail.com
sneake75@hotmail.com Introduction:

In part 1 we talked about Caching introduction and some terminologies of caching and in part 2 and part 3 we have seen some implementation of the famous replacement cache algorithms and in part 4 we saw comparisons between some famous caching frameworks and in this part we are going to continue what we started in part 4 and as in part 4 we will concentrate only on memory caching.


The Task:

After programmer 1 released the caching article in “Programming Mania” the geek to geek magazine, he got a lot of threaten mails and terrible messages from caching geeks defending their beloved caching frameworks and warning him if he didn’t make their beloved caching framework win the contest, he will regret the day he became a programmer.

That didn’t scare our programmer and he went on completing the second part of the comparison

. ShiftOne
· WhirlyCache
· SwarmCache
· JBoss Cache

ShiftOne:

ShiftOne or as they call JOCache is a lightweight caching framework that implements several strict object caching policies which comes up with a set of cache algorithm implementations that supports in memory cache.

ShiftOne cache forces two rules for every cache:

  • Max Size - each cache has a hard limit on the number of elements it will contain. When this limit is exceeded, the least valuable element is evicted. This happens immediately, on the same thread. This prevents the cache from growing uncontrollably
  • Element Timeout - each cache has a maximum time that it's elements are considered valid. No element will ever be returned that exceeds this time limit. This ensures a predictable data freshness.

ShiftOne use decorator pattern in order to make it more flexible for the user to use any underneath caching product to maintain the cache.

















Tagged in: Frameworks , Caching , Algorithms
evdh
evdh

There is a dark side to most of the current NoSQL databases, Stephan Schmidt writes. People rarely talk about it. They talk about performance, about how easy schemaless databases are to use. About nice APIs. They are mostly developers and not operation and system administrators. No-one asks those. But it’s there where rubber hits the road.

The three problems no-one talks about:

  • ad hoc data fixing – either no query language available or no skills
  • ad hoc reporting – either no query language available or no in-house skills
  • data export – sometimes no API way to access all data

 


Tagged in: Database , Caching
sneake75@hotmail.com
sneake75@hotmail.com

Introduction:

In part 1 we talked about Caching introduction and some terminologies of caching and in part 2 and part 3 we have seen some implementation of the famous replacement cache algorithms and now in this part we will see comparison between open source java caching frameworks as I am not that rich to buy commercial frameworks :D.
In this part we will talking about OSCache,Ehcache,JCS and Cache4J and we are going to concentrate on memory caching only, there will be performance comparison based on in memory caching by using JBoss caching benchmark framework and other test cases for cache.

The Task:

“Programming Mania” is a famous programming magazine from geeks to geeks every release from the magazine there a section specialized in frameworks comparison like MVC, ORM and so on, this month they decided that they are going to make a comparison about caching frameworks

And as we know the editors have programmatic background, in fact they are real programmers (not fake ones).



Tagged in: Frameworks , Caching , Cache , Algorithms
evdh
evdh

Major news in the world of distributed caching—Terracotta acquires Ehcache, the most widely used cache product in the industry.

Huge Install Base, New Enterprise Features, Seamless Experience

Ehcache is used in hundreds of thousands of deployments, including the vast majority of the Global 1000. Users who value the simplicity, high performance, and flexibility of Ehcache will now have seamless access to additional enterprise distributed caching features such as coherence and operational visibility and control through Terracotta. The combination of Ehcache and Terracotta creates the widest available array of caching capabilities, commercial support models, and professional services delivered in ways that suit the needs of your business and individual application.

More information on the Terracotta website.


Tagged in: Release , Caching
sneake75@hotmail.com
sneake75@hotmail.com Introduction:

In this part we are going to show how to implement some of the famous replacement algorithms as we mentioned in part 1, the code in this article is just for demonstration purpose which means you will have to do some extra effort if you want to make use of it in your application (if you are going to build your own implementation and wont use any caching frameworks)

The Leftover policy:

After programmer 1 read the article he proceeded to review the comments on this article, one of these comments were talking about leftover policy, which is named “Random Cache”

Random Cache:





Tagged in: Java EE , Caching , Algorithms
evdh
evdh

Terracotta's tech lead Alex Miller summarizes a few months of Hibernate performance tuning. A few common things were encountered and in this article he talks about Hibernate query caching.

Alex gives a good overview of the Hibernate Caching, as Hibernate has several levels and kinds of cache. A first level cache of Hibernate specifically to a particular open session. But there is also a second level cache that is shared across session and which contains four types:

  •  Entity
  • Collection
  • Query
  • Timestamp

 


Tagged in: Hibernate , Caching
sneake75@hotmail.com
sneake75@hotmail.com

Introduction:

A lot of us heard the word cache and when you ask them about caching they give you a perfect answer but they don’t know how it is built, or on which criteria I should favor this caching framework over that one and so on, in this article we are going to talk about Caching, Caching Algorithms and caching frameworks and which is better than the other.

The Interview:


Tagged in: Performance , Java SE , Java EE , Frameworks , Caching , Algorithms

Tags:

Sponsers