Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

Reloading embedded database

$
0
0
Hello All,

Look for advice/suggestion to our current issue.

Overview:
We have implemented something of a service bus where a server receives requests and delegates the request to respective modules which then consume and reply. There is a requirement for the server and modules to be placed in a DMZ and that no sensitive data be persisted to disk. All persisted sensitive data is written back through DMZ to database. This has been successfully implemented.
Now at stage two, we want to enhance the performance and functionality of the modules. To that end, we foresee providing them with a proprietary cache containing data for which they are solely responsible. The data itself will need to be readily accessible (fast retrieval) and may require occasional updating (few times a day).
The intention is to use the repository features of spring data.

The Issue:
On module initialization, the module specific data (if it exists) is to be retrieved from the database as a large object by the server and passed to the module. The module would then unwrap the object to an embedded database. Herein lies the problem. Though dumping the database to allow persistence is not ideal, we have found a way to achieve that. However, thus far we haven't found a way to bulk load data to an embedded database. Of the three databases on offer (H2, Derby and HSQL), H2 is out of the picture due to a bug that doesn't allow us to load a large number of associative records. Of the other two, Derby appears to allow directory source reloading by adding the "ReloadFrom" option to the url. That said, the DerbyEmbeddedDatabaseConfigurer precludes setting this value and hard codes the conflicting "create=true". Have yet to find a reasonable solution for HSQL.

With respect to the cache, would like to:
  1. hold to using the spring data repository implementation as it lends itself well to the module specific data
  2. use the embedded database for the performance gain
  3. limit its disk exposure as much as possible though the module cache data is not sensitive


Am I looking at writing my own version of DerbyEmbeddedDatabaseConfigurer?
There has been mention of Neo4j as a possible way around the persisting issue - though we may have to concede on not saving to disk.

Appreciate any feedback on this.

Roger

Viewing all articles
Browse latest Browse all 297

Trending Articles