Data Loading and Dumping

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

Summary: How an application can load data into the space at some point, and later save it back to other systems.

This page is specific to:
GigaSpaces 5.x

This feature is deprecated as of version 6.0

Overview

There might be situations when an application needs to load data into the space in some point (at the beginning of the day), and save it back to some other systems (at the end of the day or when going through maintenance and upgrade routines). Here are a few suggestions how to dump the space data and load it back:

Build a Custom Query that will execute data dump business logic - read data from the space and write it into a database. This business logic will be invoked by calling readMultiple that will eventually execute the AbstractQueryTask.execute() implementation at the space side. With partitioned topology this will be invoked on all partitions transparently. In order to load the data back into the space a similar Custom Query implementation may be constructed that will read the data from the database and place it back into the space. When having partitioned space each partition should retrieve from the database the relevant data accordingly its hosting space ID and the relevant entry class routing field.

You can map space Entries into a database in the following manner:

  • JavaSpaces API and ORM – To dump the space data the application read the Entries from the space using the GSIterator, and write them into a database. The load the data from the database relevant Query should be constructed. The space Entries mapping to the database tables can be done via an ORM tool (e.g. Hibernate).
  • GigaSpaces JDBC driver – data is read from the database and written to the space using the GigaSpaces JDBC driver. Data written via the JDBC driver can be accessed as an ExternalEntry object, and used by the JavaSpaces API as a regular Entry. The loader application maintains two JDBC driver connections – one with the RDBMS and the other with GigaSpaces. This option is relevant for simple Entries that include only primitive field types.
Using Service Grid for Upgrade Routines
For system upgrade routines, you might consider reallocating the space into a GSC running in another machine. You can reallocate a space into another GSC by moving it manually using the Service Grid UI. Once the space is moved to the new GSC, it recovers its state from its backup space. The new GSC might be running on a new machine with a new version of the system.
Transforming Space Data and Schema Evolution
When upgrading the software you might need to change the space Entries structure. See the Schema Evolution section for more details.

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)