Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Engine Services in Flexible Environment?

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

like image 974
Carl Emmoth Avatar asked Mar 25 '16 06:03

Carl Emmoth


People also ask

What is App Engine flexible environment?

App Engine allows developers to focus on what they do best: writing code. Based on Compute Engine, the App Engine flexible environment automatically scales your app up and down while also balancing the load.

What is the difference between App Engine standard and flexible?

The standard environment can scale from zero instances up to thousands very quickly. In contrast, the flexible environment must have at least one instance running for each active version and can take longer to scale up in response to traffic. Standard environment uses a custom-designed autoscaling algorithm.

What are the advantages of using App Engine flexible environment instead of its standard environment?

Application Execution As Flexible environment supports docker it can support custom runtime or source code written in other programming languages. Allows selection of any Compute Engine machine type for instances so that the application has access to more memory and CPU.

What type of service is App Engine?

App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.


2 Answers

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!

like image 147
Justin Beckwith Avatar answered Sep 30 '22 04:09

Justin Beckwith


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.

like image 35
KevinG Avatar answered Sep 30 '22 04:09

KevinG