简体   繁体   中英

How to connect to a remote RDBMS on Google App Engine

I understand that GAE uses its own NoSQL Big Table Datastore for persistence. But I'm wondering if it's possible to connect to an external/remote/non-GAE DB.

I see JDBC is not supported , at least as of August 2012. But I'm wondering if there's any other way to hit a remote DB and pull in data.

I'm weak on JDO, but I believe it supports RDBMS connections. So, one potential avenue might be to find a "JDO driver" for the RDBMS (MySQL) and bundle it up with my WAR. Other than that, I'm out of ideas. Any thoughts?

GAE不允许传出连接IIRC(任何人都可以自行纠正),因此,不管JDO(或更好的JDO实现)功能如何,它都不会到达GAE之外。

For any future readers, here's what I've decided. I'm going to host a secure (HTTPS) RESTful web service on a non-GAE server, perhaps Amazon EC2 or Beanstalk, perhaps just a simple GoDaddy server. It doesn't really matter because this part of my app doesn't need to be scaleable.

This web service will wait for a RESTful API call from my GAE app. This call will contain the necessary connection info for the RDBMS it needs to connect to. The web service will contains all the necessary JDBC drivers for the capabilities it needs.

Upon receiving the call, it will connect to the appropriate (remote) RDBMS, pull the data it needs (provided by the instructions inside the call), and then use GoogleSQL's web service to insert the data into my GoogleSQL datastore. Once its in there, my GAE app will have free reign on it.

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