Thursday, January 10, 2008

Why Coherence?

  • So Why do you use a Database? When we solution architect a system and consider a database, what is the core motive of doing so? Data Persistence - A common response. But is that really true? If I have a hard-disk and I save a file in it but somehow for some funky reason if my application cannot access that file, even though the process of persistence might have succeeded, it is of no use because I can not access it. So really as a "solution" its not about persistence it is about availability. Data availability is the real reason why we consider a database. Of course other goodies come along with it. Databases take the approach of persistence to address the problem of data availability.
    When we talk about Cache though our perception changes. Its a small short-lived "local space" from where we can access the data Faster. Hmm! So really a Cache and a database they both revolve around the data availability but with different approaches and different problem space. One around Persistence and the other around speed. Oracle Coherence fills the gap. If we can guarantee the All-data availability with faster access why would you ever consider going to a database to fetch it? This problem space is where Data Grids feed. The features of the Cache with the goodies of Database. Of course it is not this straight forward but at a very high level it is. A set of interconnected memory heaps managing Objects, working together with infrastructures of Data Queryability(sp?), managing object life, failover and continuous availability is what Oracle Coherence has to offer.

  • Is this a replacement of an ORM? - No. This is not a replacement of anything. It addresses the gaps of many technologies - Application Servers, Database servers, Messaging but it does not replace any. ORM only addresses the Impedance mismatch between a relational data-model and hierarchal domain-model. Coherence only manages the in memory serialized data. The data can be loaded from a relational database or LDAP or Flat files. It does offer to integrate Hibernate or Toplink with the Grid through CacheStore though.

  • If we have different kind of machines in a grid, Is the Speed of Grid same as the slowest node? Have you downloaded a movie from a P2P system? The chunk of data you fetch or put from/on a slower system will be slower but the data fetched from a faster system will be faster. Coherence is a P2P implementation. Yes, homogeneity matters and is important with your network switches. We can connect any type of system to a Grid either as active members or Extend Clients (decision after system analysis).

  • You only wish to conjoin a Rail engine with a Corvette to achieve Performance and Capacity in one system. It does not work that way. Enabling and Disabling "High Performance with High Capacity" is not a Checkbox option. This is a development process. If you need high speed magnetic train, you need to build it that way. This is the reason why the programming model of Coherence is manual use of APIs.
  • No comments: