python 关于使用 Google App Engine 的反馈?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/110186/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 19:30:36  来源:igfitidea点击:

Feedback on using Google App Engine?

pythondjangogoogle-app-engine

提问by agartzke

Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this:

希望做一个非常小的、快速的、肮脏的副项目。我喜欢 Google App Engine 在 Python 上运行并内置 Django 的事实 - 给了我尝试该平台的借口……但我的问题是:

Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback.

有没有人使用应用程序引擎解决玩具问题以外的任何问题?我看到一些很好的示例应用程序,所以我认为这对于真正的交易来说已经足够了,但想得到一些反馈。

Any other success/failure notes would be great.

任何其他成功/失败说明都会很棒。

采纳答案by Anurag Uniyal

I have tried app engine for my small quake watch application http://quakewatch.appspot.com/

我已经为我的小型地震监测应用程序尝试了应用引擎 http://quakewatch.appspot.com/

My purpose was to see the capabilities of app engine, so here are the main points:

我的目的是看看应用引擎的能力,所以这里是要点:

  1. it doesn't come by default with Django, it has its own web framework which is pythonic has URL dispatcher like Django and it uses Django templates So if you have Django exp. you will find it easy to use
  2. You can not execute any long running process on server, what you do is reply to request and which should be quick otherwise appengine will kill it So if your app needs lots of backend processing appengine is not the best way otherwise you will have to do processing on a server of your own
  3. My quakewatch app has a subscription feature, it means I had to email latest quakes as they happend, but I can not run a background process in app engine to monitor new quakes solution here is to use a third part service like pingablity.com which can connect to one of your page and which executes the subscription emailer but here also you will have to take care that you don't spend much time here or break task into several pieces
  4. It provides Django like modeling capabilities but backend is totally different but for a new project it should not matter.
  1. 它不是 Django 默认的,它有自己的 web 框架,它是 pythonic,有像 Django 这样的 URL 调度程序,它使用 Django 模板所以如果你有 Django exp。你会发现它很容易使用
  2. 你不能在服务器上执行任何长时间运行的进程,你所做的是回复请求,这应该很快,否则 appengine 会杀死它所以如果你的应用程序需要大量的后端处理 appengine 不是最好的方法,否则你将不得不进行处理在你自己的服务器上
  3. 我的地震监测应用程序有订阅功能,这意味着我必须在最新的地震发生时通过电子邮件发送,但我无法在应用程序引擎中运行后台进程来监控新的地震解决方案是使用第三方服务,例如 pingablity.com,它可以连接到您的页面之一并执行订阅电子邮件,但在这里您也必须注意不要在这里花费太多时间或将任务分成几部分
  4. 它提供了类似 Django 的建模功能,但后端完全不同,但对于新项目来说应该无关紧要。

But overall I think it is excellent for creating apps which do not need lot of background processing.

但总的来说,我认为它非常适合创建不需要大量后台处理的应用程序。

Edit: Now task queuescan be used for running batch processing or scheduled tasks

编辑:现在任务队列可用于运行批处理或计划任务

Edit: after working/creating a real application on GAE for a year, now my opnion is that unless you are making a application which needs to scale to million and million of users, don't use GAE. Maintaining and doing trivial tasks in GAE is a headache due to distributed nature, to avoid deadline exceeded errors, count entities or do complex queries requires complex code, so small complex application should stick to LAMP.

编辑:在 GAE 上工作/创建真正的应用程序一年后,现在我的观点是,除非您正在制作需要扩展到数百万用户的应用程序,否则不要使用 GAE。由于分布式特性,在 GAE 中维护和做一些琐碎的任务是一件令人头疼的事情,为了避免超过期限错误,统计实体或做复杂的查询需要复杂的代码,所以小型复杂的应用程序应该坚持使用 LAMP。

Edit: Models should be specially designed considering all the transactions you wish to have in future, because entities only in same entity group can be used in a transaction and it makes the process of updating two different groups a nightmare e.g. transfer money from user1 to user2 in transaction is impossible unless they are in same entity group, but making them same entity group may not be best for frequent update purposes.... read this http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine

编辑:模型应该特别设计考虑到您希望将来拥有的所有交易,因为只有在同一实体组中的实体才能在交易中使用,这使得更新两个不同组的过程成为一场噩梦,例如从用户 1 向用户 2 转账除非它们在同一个实体组中,否则在事务中是不可能的,但是对于频繁更新的目的,使它们相同的实体组可能不是最好的......阅读这个http://blog.notdot.net/2009/9/Distributed-Transactions-应用引擎上

回答by mainsocial

I am using GAE to host several high-traffic applications. Like on the order of 50-100 req/sec. It is great, I can't recommend it enough.

我正在使用 GAE 来托管多个高流量应用程序。就像 50-100 req/sec 的数量级。太棒了,我不能推荐它。

My previous experience with web development was with Ruby (Rails/Merb). Learning Python was easy. I didn't mess with Django or Pylons or any other framework, just started from the GAE examples and built what I needed out of the basic webapp libraries that are provided.

我之前的 Web 开发经验是使用 Ruby(Rails/Merb)。学习 Python 很容易。我没有使用 Django 或 Pylons 或任何其他框架,只是从 GAE 示例开始,并从提供的基本 webapp 库中构建了我需要的东西。

If you're used to the flexibility of SQL the datastore can take some getting used to. Nothing too traumatic! The biggest adjustment is moving away from JOINs. You have to shed the idea that normalizing is crucial.

如果您习惯了 SQL 的灵活性,数据存储可能需要一些时间来适应。没有什么太创伤!最大的调整是远离 JOIN。你必须摆脱规范化至关重要的想法。

Ben

回答by el2iot2

One of the compelling reasons I have come across for using Google App Engine is its integration with Google Apps for your domain. Essentially it allows you to create custom, managed web applications that are restricted to the (controlled) logins of your domain.

我发现使用 Google App Engine 的一个令人信服的原因是它与您域的 Google Apps 集成。本质上,它允许您创建自定义的、受管的 Web 应用程序,这些应用程序仅限于您域的(受控)登录。

Most of my experience with this code was building a simple time/task tracking application. The template engine was simple and yet made a multi-page application very approachable. The login/user awareness api is similarly useful. I was able to make a public page/private page paradigm without too much issue. (a user would log in to see the private pages. An anonymous user was only shown the public page.)

我对这段代码的大部分经验是构建一个简单的时间/任务跟踪应用程序。模板引擎很简单,但使多页应用程序非常平易近人。登录/用户感知 api 也同样有用。我能够在没有太多问题的情况下制作公共页面/私人页面范例。(用户将登录以查看私人页面。匿名用户仅显示公共页面。)

I was just getting into the datastore portion of the project when I got pulled away for "real work".

当我被拉去进行“真正的工作”时,我才刚刚进入项目的数据存储部分。

I was able to accomplish a lot (it still is not done yet) in a very little amount of time. Since I had never used Python before, this was particularly pleasant (both because it was a new language for me, and also because the development was still fast despite the new language). I ran into very little that led me to believe that I wouldn't be able to accomplish my task. Instead I have a fairly positive impression of the functionality and features.

我能够在很短的时间内完成很多事情(它还没有完成)。因为我以前从未使用过 Python,所以这特别愉快(既因为它对我来说是一门新语言,也因为尽管是新语言,开发仍然很快)。我遇到的很少让我相信我将无法完成我的任务。相反,我对功能和特性有相当积极的印象。

That is my experience with it. Perhaps it doesn't represent more than an unfinished toy project, but it does represent an informed trial of the platform, and I hope that helps.

这就是我的经验。也许它代表的只是一个未完成的玩具项目,但它确实代表了对该平台的知情试验,我希望能有所帮助。

回答by sutee

The "App Engine running Django" idea is a bit misleading. App Engine replaces the entire Django model layer so be prepared to spend some time getting acclimated with App Engine's datastore which requires a different way of modeling and thinking about data.

“运行 Django 的 App Engine”想法有点误导。App Engine 替换了整个 Django 模型层,因此准备好花一些时间来适应 App Engine 的数据存储,这需要以不同的方式建模和思考数据。

回答by Alexander Kojevnikov

I used GAE to build http://www.muspy.com

我使用 GAE 构建http://www.muspy.com

It's a bit more than a toy project but not overly complex either. I still depend on a few issues to be addressed by Google, but overall developing the website was an enjoyable experience.

这不仅仅是一个玩具项目,但也不过分复杂。我仍然依赖 Google 解决的一些问题,但总体而言,开发该网站是一种愉快的体验。

If you don't want to deal with hosting issues, server administration, etc, I can definitely recommend it. Especially if you already know Python and Django.

如果您不想处理托管问题、服务器管理等,我绝对可以推荐它。特别是如果您已经了解 Python 和 Django。

回答by afternoon

I think App Engine is pretty cool for small projects at this point. There's a lot to be said for never having to worry about hosting. The API also pushes you in the direction of building scalable apps, which is good practice.

我认为 App Engine 在这一点上对于小型项目来说非常酷。有很多话要说,永远不必担心托管。该 API 还推动您朝着构建可扩展应用程序的方向发展,这是一种很好的做法。

  • app-engine-patchis a good layer between Django and App Engine, enabling the use of the auth app and more.
  • Google have promised an SLA and pricing model by the end of 2008.
  • Requests must complete in 10 seconds, sub-requests to web services required to complete in 5 seconds. This forces you to design a fast, lightweight application, off-loading serious processing to other platforms (e.g. a hosted service or an EC2 instance).
  • More languages are coming soon! Google won't say which though :-). My money's on Java next.
  • app-engine-patch是 Django 和 App Engine 之间的一个很好的层,支持使用 auth 应用程序等。
  • Google 已承诺在 2008 年底之前提供 SLA 和定价模型。
  • 请求必须在 10 秒内完成,对 Web 服务的子请求需要在 5 秒内完成。这迫使您设计一个快速、轻量级的应用程序,将严肃处理卸载到其他平台(例如托管服务或 EC2 实例)。
  • 更多语言即将推出!谷歌不会说哪个:-)。我的钱接下来要花在 Java 上。

回答by rowly

This question has been fully answered. Which is good. But one thing perhaps is worth mentioning. The google app engine has a plugin for the eclipse ide which is a joy to work with.

这个问题已经得到了充分的回答。哪个好。但有一件事也许值得一提。谷歌应用引擎有一个 eclipse ide 插件,使用起来很愉快。

If you already do your development with eclipse you are going to be so happy about that.

如果您已经使用 eclipse 进行了开发,那么您会对此感到非常高兴。

To deploy on the google app engine's web site all I need to do is click one little button - with the airplane logo - super.

要部署在谷歌应用引擎的网站上,我需要做的就是点击一个小按钮 - 带有飞机标志 - 超级。

回答by David Gruzman

I used GAE to build a simple application which accepts some parameters, formats and send email. It was extremely simple and fast. I also made some performance benchmarks on the GAE datastore and memcache services (http://dbaspects.blogspot.com/2010/01/memcache-vs-datastore-on-google-app.html). It is not that fast. My opinion is that GAE is serious platform which enforce certain methodology. I think it will evolve to the truly scalable platform, where bad practices simply not allowed.

我使用 GAE 构建了一个简单的应用程序,它接受一些参数、格式和发送电子邮件。它非常简单和快速。我还在 GAE 数据存储和内存缓存服务 ( http://dbaspects.blogspot.com/2010/01/memcache-vs-datastore-on-google-app.html)上做了一些性能基准测试。它没有那么快。我的观点是 GAE 是一个严格的平台,它强制执行某些方法。我认为它将演变为真正可扩展的平台,在这种平台上根本不允许不良做法。

回答by Josh Patton

I used GAE for my flash gaming site, Bearded Games. GAE is a great platform. I used Django templates which are so much easier than the old days of PHP. It comes with a great admin panel, and gives you really good logs. The datastore is different than a database like MySQL, but it's much easier to work with. Building the site was easy and straightforward and they have lots of helpful advice on the site.

我在我的 Flash 游戏网站Bearded Games 中使用了 GAE 。GAE 是一个很棒的平台。我使用了 Django 模板,它比过去的 PHP 容易得多。它带有一个很棒的管理面板,并为您提供非常好的日志。数据存储与 MySQL 等数据库不同,但使用起来要容易得多。建立网站简单明了,他们在网站上有很多有用的建议。

回答by Joe Skora

Take a look the the sql game, it is very stable and actually pushed traffic limits at one point so that it was getting throttled by Google. I have seen nothing but good news about App Engine, other than hosting you app on servers someone else controls completely.

看一看sql 游戏,它非常稳定,并且实际上一度推动了流量限制,因此它被谷歌限制了。除了在其他人完全控制的服务器上托管您的应用程序之外,我只看到了关于 App Engine 的好消息。