Database Cache and Persistency

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

Section Summary: How to persist a space to durable storage, access a space using the Hibernate API, and perform write-through or read-through to RDBMS.

Overview

The space can load data from external data sources, store data into external data sources, and persist data into a relational database or an indexed file.

A space can interact with an external data source, such as a database, in order to extend or back up the physical memory of the process running the space. When searching for desired objects, the space uses both its process memory (cache), and its persistent media files. When the space is restarted, data from the media files can be loaded into the space cache.

The space can also be used as a Hibernate or JDO second level cache.

Persistency Architecture

GigaSpaces provides several persistency models, which allow different modes of interaction with a database.

Expand this...

JDBC Storage Adapter

Persists space operation into RDBMS. Mapping is done using the classic class-to-table approach. Data in the database is owned by GigaSpaces and may not be modified by external applications; it can be accessed directly via database interfaces in read-only mode. The JDBC SA option supports any RDBMS and using the JDBC driver to interact with the database.

This option supports implicit data recovery from the database when a space is started, stores Entry meta data and notify templates, and persists a redo log, providing reliable asynchronous replication.

CacheLoader & CacheStore

When an object is written to the space, the CacheStore implementation is used to update the external data source with space destructive operations (write, update and take). This method is used to store the object's content in the database table. When an application attempts to read data from the space, and it does not exist within the space, the CacheLoader or CacheIteratorFactory implementation is called.

Expand this...

Hibernate CacheLoader & CacheStore

Enables mapping of space objects to database tables using Hibernate configuration files. In this case, the Entry class should implement getter and setter methods for the relevant fields. You may also use POJO classes and have the space class mapping, using annotations or gs.xml space mapping configuration files. gs.xml configuration files can be generated via Hibernate mapping files to speed up the mapping process.

The Hibernate CacheLoader/CacheStore is supported both by the Map API and the JavaSpaces API.

Hibernate Cache Plugin

The space is accessed via the Hibernate API. Hibernate query results and data are saved in the space. Repeated query results are fetched from the space, not from the database.
This option mostly boosts database read operations.

Mirror Service

Expand this...

Indexed File

Expand this...

Section Contents


Wiki Content Tree


Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels

 
(None)