5
votes

How do I use the App Engine features with Flexible Environment (former Managed VMs)?

For instance, my old app uses the Image API. How do I util that API in a Fleixble Environment?

List of features in 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

Compatible App Engine APIs in Flexible Environment: https://cloud.google.com/appengine/docs/flexible/java/migrating-an-existing-app

2

2 Answers

5
votes

When moving from standard to flexible, only a subset of the App Engine APIs will continue to work:

  • 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. With flexible, you should be able to import any image editing package you like, and just use that instead of the proprietary API. For example, imgscalr may be a good option:

https://github.com/thebuzzmedia/imgscalr

Hope this helps!

4
votes

Justin Beckwith's answer was correct for Managed VM's (VM : true)using a compat runtime, but this has been completely deprecated. (His answer was 100% correct when he wrote the response.)

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.

For example, the cloud storage API has changed and you will need to update your code to reflect that. But if you used Objectify to access the datastore, then you're really going to be writing significant chunks of code. Also, memcache is not currently supported.