Guest
Welcome login


TIBCOmmunity > Blogs > ActiveSpaces > 2009 > June > 30
Home   Members Communities

ActiveSpaces

ActiveSpaces

Previous Next
4

One of the first things I want to address on the subject of datagrids is a mistake that I have heard way too many people make: a distributed cache is NOT a Datagrid!

 

Many people use the two terms interchangeably because I believe they focus only on the 'distributed' part which both types of systems have in common but doing so, they totally forget about the implications of the 'cache' part:

 

A cache can not be used as a System Of Record.

 

One of the properties of a cache is that it can evict entries that have been previously put in it, in order to make room for newer entries. And when a cache evicts an entry, it does it quietly and without telling any of it's clients about it. This means that you can not 'trust your data' to a cache as it could disappear from it at any time, but rather you have to use it in a 'cache-aside' architecture to cache a proper System Of Record. Querying a cache does not give you an authoritative answer like a System Of Record would: if there is nothing in the cache that matches your query you do not know if that is because matching data was never put in it, or because there was something but it was evicted and you therefore need to perform the same query again in the System Of Record (thereby negating the performance advantage of using a cache) to get it.

 

ActiveSpaces however can be used as a System Of Record because it will not evict entries from the Spaces, even if this means that a new call to insert data into a Space can fail if there is not enough memory currently available in the cluster to store a new tuple in the Space. Fortunately, ActiveSpaces makes it very easy to increase the amount of memory available to a Space: just launch another instance of your application or an agent process, no reconfiguration needed, no down-time required.

Comments

Click to view A. Kevin Bailey's profile
Enthusiast
Posted by A. Kevin Bailey

Jean-Noel,

 

You mention that you can launch another instance to increase the memory to the Space. But what about failures. I would think that ActiveSpaces would have to redistribute all the data when you add another instance to keep the Space fault-tolerant. Is this true?

 

Also, can ActiveSpaces persist its data to disk in case you need to bring all of the instances down?

 

Click to view Jean-Noel Moyne's profile
Dabbler
Posted by Jean-Noel Moyne in response to: A. Kevin Bailey

Kevin, yes of course ActiveSpaces has the ability to deal with sudden node failures!

 

One of the attributes of a Space is the 'degree of replication': how many times do you want the data handled by a node to be replicated on another node (i.e. how many nodes can fail at once without any data being lost). You can also specify whether the replication is handled in a synchronous or asynchronous manner. But I'll talk more about distribution in the next blog post, so stay tuned for more details on this.

 

As for disk persistence, while not part of the 1.0 release (because AS makes it actually pretty easy to implement it in your application code and we concentrated our resources on implementing some other more interesting features first) rest assured that it will be addressed very shortly thereafter.

 

Disk persistence is also not necessarily as required as most people would think: where is the data coming from? Where is it going to? How are you using the space? What is the data's lifespan? Will you ever need to bring down absolutely every single instance, and all of the ActiveSpace agents at the same time? Those are questions that one should answer first before coming to the conclusion that persistence is absolutely needed.

 

Also, keep in mind that replication and fault-tolerance do not depend on disk persistence (unlike a lot of messaging servers for examples)

Click to view Pankaj Arora's profile
Dabbler
Posted by Pankaj Arora in response to: Jean-Noel Moyne

Jean-Noel,

 

How is disaster recovery scenario handled. How will service/date be restored in the case of data center swing from primary to backup data center.

Click to view Jean-Noel Moyne's profile
Dabbler
Posted by Jean-Noel Moyne in response to: Pankaj Arora

Pankaj,

 

DR (as opposed to 'simple' fault-tolerance) has to be implemented at the application level with 1.0, but we will have a built-in solution (or more than a single solution) to that particular problem shortly thereafter.