Possible to persist data without SQL in Gigaspaces XAP 8?

556 Views Asked by At

Is it possible to persist data in Gigaspaces XAP 8 without resorting to an SQL database ? My application doesn't really have anything to do with SQL, and it would be a huge hassle to restructure everything to mirror the typical SQL design. But in the terrible XAP 8 documentation, only Hibernate/SQL is mentioned as possible persistence.

All I really want is for the data I put in my Space to not disappear when I restart XAP or my Processing Unit.

3

There are 3 best solutions below

0
On

Disclaimer:

In principle, since everything in your space should be serializable (if not, replication wouldn't work), you can simply write everything to a file. But this is a very bad idea, because you would have to serialize everything every time. A database handles the storage format for you, synchronization, it prevents corruption, it provides indexes...

Any non trivial persistence requirement will raise technical issues which would be too expensive to solve "in-house". Database are the right solution to use when persistence is required.


Good news: GigaSpaces provides you what you are looking for is Space Dump and Reload, based on the space copy API.

If you look at the end of the page, you see the following note:

Make sure the Space Dump utility has the /gigaspaces-xap-root/lib/platform/jdbc/h2.jar as part of its classpath.

In fact, it is backed by a database, H2SQLDB, which is probably populated through reflection

1
On

I suggest that you ask Gigaspaces customer support. This could be a feature that you have to pay for.


It's not, I looked at the features that are 'for sale'.

I suggest you ask anyway. Using one of the non-free editions may get you access to technical support, forums and/or better documentation.

Alternatively, you could "bite the bullet" and do the extra database-related work that you are trying to avoid doing.

2
On

GigaSpaces persistence is pretty generic and extendable. Persistence is provided using External Data Source. More information about External Data Source API is here, http://www.gigaspaces.com/wiki/display/XAP8/External+Data+Source+API

Above page also has a simple example. Example implementations for NoSQL Databases (MongoDB and Cassandra) are in GigaSpaces Best Practices Wiki, http://www.gigaspaces.com/wiki/display/SBP/NoSQL+External+DataStore