1

I have developed an web application using servlets and MySQL. and now am in need of deploying it to Google AppEngine.. But Appengine uses a totally different datastore that need a major modification of the database part..

So I would like to know if there are any light-weight database java library that can be deployed along with the main application..

PS: Database part doesn't involve intense queries.. just simple insert and select queries..

vivek_jonam
  • 3,237
  • 8
  • 32
  • 44
  • You can always go with Google Cloud SQL – Shay Erlichmen Jul 23 '12 at 08:15
  • @ShayErlichmen But google Cloud SQL is not free now.. its priced.. – vivek_jonam Jul 23 '12 at 08:23
  • 1
    There is no free SQL based solution on appengine. You will need to modify you application to support the appengine datastore if you want to deploy on appengine. If the app is as simple as you say "just simple insert and select queries" the it should be simple to port. – Tim Hoffman Jul 23 '12 at 08:53
  • is there any Guide to port simple queries to appengine datastore(JDO or JPA)?? – vivek_jonam Jul 23 '12 at 09:28
  • Have you tried looking at the docs - https://developers.google.com/appengine/docs/java/datastore/jdo/ – Tim Hoffman Jul 23 '12 at 10:42
  • As a side note, you could also consider getting a DB on another server and connect to it with JDBC. – Jon Newmuis Jul 23 '12 at 12:48
  • @Newmuis You could also wrap that server with REST API and connect to it with... anything :) – Lo-Tan Aug 16 '12 at 03:54
  • You mention that your query layer is simple, so I'm not sure why doing this in something like [objectify](http://code.google.com/p/objectify-appengine/) should be an issue. It's a great library and I've used it in the past with no issues. – Lo-Tan Aug 16 '12 at 03:55

3 Answers3

3

Using Google Appengine you can't store anything in local filesystem, only in memory. Also your GAE app don't have dedicated server, code can be executed on any machine, stopped any time, fime minutes on one server, five minutes on another, sometimes in parallel, etc. So, storing data in memory is useless as well.

So, if don't want to rewrite your data access layer, there is only one option: pay for using MySQL on Appengine

Igor Artamonov
  • 35,450
  • 10
  • 82
  • 113
1

After a long research found a convenient solution..

H2GAE

Its is a combination of H2 database and GAEVFS

It overcomes the file system write constrain of Google App Engine with the GAEVFS, a virtual file system for Google App Engine that uses datastore to actually store the file data.

vivek_jonam
  • 3,237
  • 8
  • 32
  • 44
0

You can try using Google Cloud SQL on App Engine.

Google Cloud SQL is a MySQL database that lives in Google's cloud. It has all the capabilities and functionality of MySQL, with a few additional features and a few unsupported features as listed [...] Google Cloud SQL is easy to use, doesn't require any software installation or maintenance and is ideal for small to to medium-sized applications.

Jon Newmuis
  • 25,722
  • 2
  • 45
  • 57