Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 TIBCO ActiveSpaces Fundamentals : What is a Space?

What is a Space?
A space provides shared virtual storage for data. A space is:
A shared entity.
Many applications can access a space concurrently and each application has the same view of the data contained in the space. The spaces in ActiveSpaces are called tuple spaces, and the items stored in them are called tuples.
A space can proactively notify applications of changes in the data contained in the space as changes happen (push model), and can therefore be used as a coordination mechanism for building distributed systems.
A virtual entity.
A space is distributed and implemented collaboratively by a group of processes located on multiple hosts and communicating over the network.
ActiveSpaces handles changes in the set of processes automatically: processes may join or leave the group at any time without requiring any user intervention. A space automatically scales up as the number of processes in the group increases, and scales down when processes suddenly disappear from the group or network. There is no negative impact on the data contained in the space when processes leave the space.
Differences Between ActiveSpaces and a Distributed Cache
ActiveSpaces is a data grid product implementing a distributed in-memory tuple space; it is not just a distributed cache. Although the terms are sometimes used interchangeably, there are important differences between ActiveSpaces and a distributed cache:
A cache can evict entries at any time if it needs to make room for new entries, but a tuple space data grid does not evict entries Therefore, a distributed cache (like all caches) can only be used in a cache-aside architecture to cache a system of record, and, unlike a data grid, can never be used as a system of record itself.
Although it is possible to use ActiveSpaces as a distributed cache (in a cache-aside or in a cache-through architecture), the reverse is not true: a distributed cache cannot be used as a system of record.
Space Storage Options and Persistence
ActiveSpaces is a distributed data store that provides several options for storing space data on physical media:
RAM Storage
Data can be stored purely in RAM on the machines running seeder processes. Although RAM is the fastest storage medium and therefore provides the fastest reads and writes, it is the most ephemeral storage medium.
If the seeder process (or the machine on which the process is running) goes down, the subset of data held in the process' memory also disappears. Although the ActiveSpaces mechanism enables recovery from individual process or machine failures, if all of the seeder processes of a space go down (because they all crash, or because the machine is in maintenance), then the data disappears from the space along with the last seeder.
To avoid having the data stored in a space, other, more persistent, data storage mediums can be used.
When durable storage of the data stored in a space is desired, the space should be configured to use a persistent data storage medium. There are two options available for persistent data storage:
When you implement persistence, you can use RAM to store either all of the data, or just a most recently used subset of the data. In this case, the persistence layer holds all of the data stored in the space but the RAM of the seeder processes is used as a transparent in-line cache of a configurable size.
If you implement external shared-all persistence, your application must implement code to handle reads to and writes from the external persistent storage medium. You can use a traditional RDBMS (or any other centralized disk-based data store) as the persistent storage medium.
In this mode of operation:
When you use built-in shared-nothing persistence, your application does not need to implement code to take care of persistence — ActiveSpaces seeders use any file system accessible to them (for example local solid state or disk drives) as the storage (and ) medium.
When combined with in-memory indexing, shared-nothing persistence allows you to use ActiveSpaces as a true distributed data store using local disks for persistent data storage and RAM as a truly transparent in-line caching layer.
With built-in shared-nothing persistence, if you define indexes on the fields used in a query, ActiveSpaces has a unique ability: because the key fields and indexes for all of the records in the data store are kept in RAM, queries return not just the matching records that are cached in RAM, but also records that have been evicted from the space.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved