On Tue, Aug 4, 2009 at 5:38 AM, Marek Gregor<[email protected]> wrote: > > I am just curious about usage of H2 on GAE, as memory-only database > with keep the content as long as the virtual machine is alive > (DB_CLOSE_DELAY=-1). > Database will be small approx 10MB with requirement to have top > performance. > > On daily manner I would like to do the backup of complete database to > external store which is on my local computer. So there are question: > > 1) Is it possible to access this database on GAE remotely using TCP/IP > or SSL/TLS (An example database URL is: jdbc:h2:tcp://localhost/ > mem:db1) ?
No. GAE does not allow applications to open network ports, nor does it allow applications to create background threads. Either of these limitations would prevent H2 from running in Server Mode. > 2) If not is it possible to generate backup (like by SQL commands > BACKUP, SCRIPT) and not to store it on local file system but sent it > e.g. like backup-servlet response ? > 3) Last possible way I thing will work is that I program the backup > manually querying every table as a response of backup-servlet. > > 4) I have I fundamental question if H2 can be runned as memory-only > database on GAE, I do not know if GAE is not running my application as > cluster on several JVM's so then H2 in memory-only mode is not > functional because it can be used only on the same JVM/class loader > (mentioned in > http://www.h2database.com/html/features.html#memory_only_databases: > Accessing the same database in this way only works within the same > virtual machine and class loader environment.) That is correct. GAE may launch several instances of your web application, each instance running within a separate JVM. However, you have no way of knowing (and no control over) how many instances are running at any given time. If you use H2 in memory-only mode, each instance of your web application--in its separate JVM--will have a separate in-memory copy of H2. If your database is read-only then this will work, but as soon as you write to the database your separate web application instances will be using different data. Our goal for the H2-GAE project is to get H2 working properly within the GAE distributed environment using the GaeVFS virtual file system: http://code.google.com/p/gaevfs/wiki/H2GAE We still have a lot of work to do before we can claim success, but the results so far are encouraging. > > thanks for reponse: can save me time to start work on something which > is not possible > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
