简体   繁体   English

灵活环境中的App Engine服务?

[英]App Engine Services in Flexible Environment?

How do I use the App Engine features with Flexible Environment (former Managed VMs)? 如何将App Engine功能灵活环境 (以前的托管VM)一起使用?

For instance, my old app uses the Image API . 例如,我的旧应用使用Image API How do I util that API in a Fleixble Environment? 如何在Fleixble环境中利用该API?

List of features in App Engine: https://cloud.google.com/appengine/docs/about-the-standard-environment App Engine中的功能列表: https : //cloud.google.com/appengine/docs/about-the-standard-environment

Image API: https://cloud.google.com/appengine/docs/about-the-standard-environment#images 图片API: https//cloud.google.com/appengine/docs/about-the-standard-environment#images

Compatible App Engine APIs in Flexible Environment: https://cloud.google.com/appengine/docs/flexible/java/migrating-an-existing-app 灵活环境中兼容的App Engine API: https//cloud.google.com/appengine/docs/flexible/java/migrating-an-existing-app

When moving from standard to flexible, only a subset of the App Engine APIs will continue to work: 从标准版本迁移到灵活版本时,只有一部分App Engine API将继续起作用:

  • Datastore 数据存储
  • Logging 记录中
  • Memcache 记忆快取
  • Search 搜索
  • Task Queue 任务队列
  • URL Fetch 网址提取
  • Users 用户数

For something like the Images API - it was needed in App Engine standard, where including your own library was... challenging. 对于类似Images API的东西-App Engine标准中需要它,在其中包含您自己的库非常困难。 With flexible, you should be able to import any image editing package you like, and just use that instead of the proprietary API. 使用flexible,您应该能够导入所需的任何图像编辑包,而仅使用它而不是专有API。 For example, imgscalr may be a good option: 例如,imgscalr可能是一个不错的选择:

https://github.com/thebuzzmedia/imgscalr https://github.com/thebuzzmedia/imgscalr

Hope this helps! 希望这可以帮助!

Justin Beckwith's answer was correct for Managed VM's (VM : true)using a compat runtime, but this has been completely deprecated. 贾斯汀·贝克威斯(Justin Beckwith)的答案对于使用Compat运行时的托管虚拟机(VM:true)是正确的,但是已经完全弃用了此方法。 (His answer was 100% correct when he wrote the response.) (当他写答复时,他的回答是100%正确的。)

The new flexible app engine (env : flex) can't use any of the standard app engine's libraries, so all of the features listed above require some changes to your code at a minimum, and significant changes in some cases. 新的灵活应用引擎(env:flex)无法使用任何标准应用引擎的库,因此上面列出的所有功能都至少需要对代码进行一些更改,并且在某些情况下需要进行重大更改。

For example, the cloud storage API has changed and you will need to update your code to reflect that. 例如,云存储API已更改,您将需要更新代码以反映这一点。 But if you used Objectify to access the datastore, then you're really going to be writing significant chunks of code. 但是,如果您使用Objectify来访问数据存储,那么您实际上将要编写大量的代码。 Also, memcache is not currently supported. 此外,当前不支持内存缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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