如何加快 Java Google App Engine 部署速度?

发布于 2024-11-09 01:28:43 字数 236 浏览 0 评论 0原文

我正在使用 GWT+Java-AppEngine 开发一个测试应用程序,部署非常繁重且缓慢。

我读到了有关最小化排列或 GWT 并行编译的内容,但我的互联网连接不太好,我认为我正在将大量文件上传到 App Engine 服务器。

我该如何优化这个?我可以检查一下瓶颈在哪里吗?

我需要多次部署的原因是因为我通过 OAuth 使用 Google API,并且无法将 localhost 设置为回调(我可以吗?)。

I'm developing a test app with GWT+Java-AppEngine and the deploys are so heavy and slow.

I read about minimize permutations or parallel compilation of GWT, but my internet connection is not so good and I think that I'm uploading heavy files to App Engine Server.

How can I optimize this? Can I check where is the bottleneck?

The reason that I need several deployments is because I'm using Google API's through OAuth and I can't set localhost as a callback (I do?).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇纵 2024-11-16 01:28:43

我不完全确定你的情况,所以我会尝试猜测你的意图。

出于开发目的,您确实应该在本地服务器上工作,它附带了所有 API 和存根,用于用户登录等操作。那是瞬间的。一旦您对本地应用程序感到满意并且需要上传,那么如果 AppEngine 霸主由于 AppSize/缓慢的连接/服务中断/随机的饮食行为而决定花费一些时间,则几乎无能为力。

考虑到并不是每小时都进行部署,我认为您的时间最好花在应用程序上,而不是调整上传时间。

我假设您已经关注 http://code.google.com/ appengine/docs/java/gettingstarted/uploading.html

我个人接触过appengine,但使用的是python版本,可能需要几分钟的时间,但一旦上传完成,你就可以开始了。

<块引用>

也许您可以为您的本地计算机指定一个 dyndns 主机名并使其可通过互联网进行访问? –

我认为 Bastian 的意思如下(假设开发服务器实际上可以为域提供服务 - 我对此不确定)

  1. 让您的域名托管服务商(example.com)维护指向您的开发计算机 IP 地址的“A”记录 [因此当你做 example.com,你的开发机器作为服务器响应]
  2. 这意味着如果你设置 DNS 记录指向 ghs.google.com 或其他什么,你将必须更改它们(DNS 记录需要一段时间才能传播,具体取决于主机)
  3. 一旦你快乐了,你想要在 google 上进行测试,您仍然需要“上传”,然后才能在 appspot.com 上尝试,当然还要再次更改 DNS 条目,以便 example.com 可以在 google 服务器上运行。

我认为工作太多了。最好在本地计算机上使用开发服务器。

上传时请稍事休息。吃一块 KitKat 来消磨时间:)

I am not entirely sure about your scenario, so I will try to guess your intentions.

For development purposes, you really should be working on the local server, it comes with all the API's and stubs for things like user login and what not. That is instantaneous. Once you are happy with your local app and it is time to upload, then if AppEngine overlord decides to take time due to AppSize/Slow Connection/Service outage/random act of diety, there is little one can do.

Considering that one doesn't deploy every hour, I think your time would be better spent on the app, instead of tuning the upload time.

I am assuming you are already following http://code.google.com/appengine/docs/java/gettingstarted/uploading.html

I personally have dabbled with appengine but the python version, and it may take a few mins but once upload is complete, you are good to go.

maybe you could get your local machine a dyndns hostname and make it accessible from the internet ? –

I think what Bastian meant was as follows (assuming Dev server can actually serve domains - i am not sure about that)

  1. Have your domain host (example.com) maintain an 'A' record pointing to your development machine IP address [hence when you do example.com, your dev machine responds as the server]
  2. This means if you setup DNS records to point to ghs.google.com or whatever, you will have to change them (DNS records take a while to propagate depending on host)
  3. Once you are happy, and you want to test on google, you still have to 'upload' before you can try it on appspot.com and ofcourse change DNS entries again so example.com works off google servers.

Too much work in my opinion. Better to use dev server in local machine.

Have a break while you are uploading. Have a KitKat to kill time :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文