Puttzy
Puttzy

Reputation:

Google App engine external database

I've been searching and can't find an answer anywhere. I also haven't had time to try it out either.

Is it possible, using java in the Google App Engine (GAE), to connect to a remote database. Whether it MySql, SQLServer, etc. Will it be allowed to make calls outside of it's domain? Is it possible to even use the required libraries to make such a connection?

Upvotes: 7

Views: 5963

Answers (4)

Krishna Gupta
Krishna Gupta

Reputation: 1309

Dont use HTTP for DB connections as it is less secure.

Use CLoud SQL instead (jdbc type connection, mysql like queries and drivers in jars)

getting started with cloud sql

an easy video for java + cloud sql + app engine

Upvotes: 0

Tom Carchrae
Tom Carchrae

Reputation: 6476

I do this all the time using a REST API on the server that contains the database. Depending on your needs (eg, do you need ad-hoc queries) you may want to choose a REST API with some flexibility.

There are quite a few simple REST-DB libraries around, such as http://phprestsql.sourceforge.net/

Though you may want to simply roll your own using http://www.playframework.org/ or http://guides.rubyonrails.org/getting_started.html#rest

Upvotes: 1

zacheusz
zacheusz

Reputation: 8842

IMHO you can try to tunnel JDBC through HTTP. It is possible. For example here is free solution http://sourceforge.net/projects/sqlgateway/ and here commercial http://www.idssoftware.com/jdbcdrv.html :)

Upvotes: 2

jsight
jsight

Reputation: 28429

The closest thing that you will find is the Google Secure Data Connector. All connections outbound from GAE are HTTP based, so you're very unlikely to get a jdbc type connection to a database server (MySql, SqlServer, etc).

Upvotes: 4

Related Questions