专用MySql服务器与应用程序引擎一起工作 [英] Dedicated MySql server works with app engine

查看:98
本文介绍了专用MySql服务器与应用程序引擎一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道AppEngine应用程序在受限制的沙盒环境中运行,因此它可以访问有限的资源,例如


请求执行时间限制为60秒(用于速度优化目的)

从外部文件,但无法写入等等


AppEngine提供了一个很好的高复制数据存储,它非常适合存储数据,但它很难管理quires的数量来执行简单的操作,如插入,更新,删除和更新,因为它使用NoSql(基本上是jpa和jdo)。

因此,我们决定去与Mysql,我知道谷歌本身提供云$ sql
使用Mysql5.6,我搜索了很多SO,并在一些职位,我发现它可能与一些限制,而一些职位说,这是不可能的,因为限制的沙箱环境,所以很混乱。

Durin g开发人员可以使用本地mysql实例,详细信息参见此链接 ,但我们希望使用托管在ourserver上的外部mysql实例



可能使用专用(外部/本地)MySql服务器与应用程序引擎(用于生产而不用于开发) ?



在此先感谢!!!!!!

解决方案

Google App Engine有一个套接字API,允许支付应用程序的出站套接字,因此可以使用外部MySQL服务。为此,请按照您提供的链接中的说明进行操作,但始终 使用 com.mysql.jdbc.Driver JDBC驱动程序和URL例如 jdbc:mysql:// your_external_mysql_server:3306 / database_name?user = your_user& password = 1234 。确保您的外部MySQL服务器已打开端口3306.



正如其他人所提到的,这可能不是明智之举,因为数据存储或Google Cloud SQL的性能会大幅下降。您还将失去Google App Engine带来的可靠性和扩展性。此外,托管一个专用的MySQL实例并为其支付带宽费用可能比单纯使用Datastore或Cloud SQL更昂贵。


I know AppEngine application runs in a restricted "sandbox" environment so that it can access limited resources like

request execution time limit 60 sec (which is for speed optimization purpose)
read from external file but can not write ,etc

AppEngine provides a good high replication Datastore ,which is so good to store data but it is hard to mange number of quires to perform simple operation like insert, update, delete and update as it uses NoSql(basically jpa and jdo).

Because of this we decide to go with Mysql,I know google itself provide cloud sql instance which uses Mysql5.6 ,I searched alot on SO and in some post I found that it is possible with some restriction while some post says it is not possible because of limitation of sandbox environment,so it is confusing .

During development one can use local mysql instance as detail provide on this link ,but we want to use External mysql instance which is hosted on ourserver

It possible use Dedicated (External/Local) MySql server with app engine(for production not for development)?

thanks in advance!!!!!!

解决方案

Google App Engine has a socket API that allows outbound sockets for paid apps, so it is possible to use an external MySQL service. To do this, follow the instructions at the link you provide, but always use the com.mysql.jdbc.Driver JDBC driver, and a URL like jdbc:mysql://your_external_mysql_server:3306/database_name?user=your_user&password=1234. Ensure your external MySQL server has port 3306 open.

As mentioned by others this may not be advisable as it will have substantially worse performance that the Datastore or Google Cloud SQL. You will also lose the reliability and scaling that Google App Engine brings. Moreover hosting a dedicated MySQL instance and paying for bandwidth to it is likely to end up more expensive than simply using Datastore or Cloud SQL.

这篇关于专用MySql服务器与应用程序引擎一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆