I'm writing a Web Application with a Java back-end running on a Tomcat server and a JavaScript client.
In the backend I have to process a large int[][][] array, which holds the information of a CT-Scan. Size is approx. 1024x1024x200.
I want to load this array into memory only when it's needed to process new data like image slices, and store it in some kind of database for the remaining time.
Things I tried so far:
Using JDBM3 to store a String, int[][][] Hashmap, runs into out of memory error
Serializing object and save it into PostgreSQL-DB using bytea[] data type, stores correctly but is getting memory error while loading again.
So my first question is, how can I save such a big array (which db, method)? It should load fast, and there should be some kind of multi-user access security because multiple users will be able to use front-end and therefore load the int[][][] into the back-end. The database should have a non-commercial license eg. GPL, MIT, Apache...
Second question, I know I could save the array serialized in the file system and keep the link in the db, but is the access safe for multiple users?