Shaun Abram
Technology and Leadership Blog
Oracle Coherence
I had the chance today to attend a presentation at Oracle about their Coherence product. Basically, Coherence is a data caching tool. More specifically, it is an in-memory data grid solution that allows you to scale applications by partitioning data in memory across multiple servers. Servers can be easily added for better performance and can of course deal with servers going down (planned or unplanned) with no loss of data.
All in all, I have to say that it all looked like a very neat application. It is similar to Gigaspaces, but I suspect that since it is backed by Oracle, it is better supported.
The big question is, would I actually use it in a project? The answer is, if the project required access to a large amount of data and response times, scalability, availability and reliability were all critical requirements, then it would certainly be on the list of possible components. I can think of several real-time, mission critical trading applications that I have worked on in the past where Coherence could have been a useful tool.
One question I had was whether or not Coherence could be used with Hibernate, and in particular if it could be introduced to an existing application. After all, most performance problems don’t arise until well into the development of an application; Often when too much design and coding has been done to do a fundamental redesign.
For example, I am working on a Java/Spring/Hibernate web based application with a small but rapidly growing user base. If, in the future, performance becomes an issue, could Coherence be introduced to provide all the benefits that the folks at Oracle were talking about today? Could we introduce Coherence in to the architecture without fundamentally changing the data access mechanism (which lets face it, is not really an option at any stage other than the design or very early development)?
I think the answer is yes, but with caveats. The solution lies in using Coherence as Hibernate Level 2 Cache. The caveat is that this approach does not bring the same benefits as using Coherence as the primary data source in an application, like you would if you were using Coherence as an original, founding member of your architecture.
However, as the Oracle docs say, Hibernate is ‘the optimal choice for accessing data held in a relational database where performance is not the dominant factor’. So I guess if performace is likely to be an issue, it is best to think about it as early as possible, i.e. before picking the database technologies…
Tags: Oracle
Yes coherence can be configured as L2 cache…
http://download.oracle.com/docs/cd/E15357_01/coh.360/e15830/usehibernateascoh.htm#CHDIFFBI