简体   繁体   中英

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?

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).

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 :)

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM