Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Google App Engine

Introduction to Google App Engine

An introduction to Google App Engine. Presented @ Google Developer Group North East.


Omer Dawelbeit

July 29, 2016

More Decks by Omer Dawelbeit

Other Decks in Technology


  1. We’re sorry Our servers are over capacity and certain pages

    may be temporarily unavailable. We’re working quickly to resolve the issue.
  2. Key id firstName lastName dateOfBirth age Person:1219989 1219989 John Smith

    10/07/1976 40 Person:1529889 1529889 Jane Doe 23/01/1985 Person Kind vs. Table Indexed Property vs. Column Key vs. Primary key Entity vs. Row namespace:Kind:ancestor_path:id
  3. App Engine App Engine Flexible What VM means for customers

    Execution Environment Where the code runs Optimised Sandbox Secured 0 to N scaling GA GCE VM-Based Docker containers based in Beta Flexibility Any language, framework, or library Performance Up to 32 vCPUS or 208 GB of mem Networking stack Custom Cloud Platform networking stack One network • VPN, direct, carrier connection options • Connect App Engine instances to Compute Engine on private network Load balancer Autoscaler Custom Cloud Load Balancer Cloud Autoscaler More control Configure lower-level infrastructure services as necessary NoSQL Tasks & cron Integrated Decoupled More control • Access NoSQL Datastore from any compute product • Utilize Task Queues or Pub/Sub to facilitate intra-project communication Managed runtime support constrained Fully open-source compliant New runtimes Managed Node.js, Python 3, Java 8, PHP, Go
  4. • Docker images hosted on gcr.io • Pure openjdk8: deploy

    a jar • Springboot, Vertx, SparkJava, etc… • Simple app.yaml • Pure Servlet 3.1: deploy a war • Jetty9, collaboration with the Jetty project • Simple app.yaml • For GAE Standard Apps: Jetty9 +Sandbox compatibility layer • Run Standard apps as is, • needs appengine-web.xml
  5. The Java 8 Runtime Dockerfile FROM gcr.io/google_appengine/openjdk8 ADD myspringbootapp.jar /app

    app.yaml runtime: custom / java vm: true api_version: 1 runtime_config: jdk: openjdk8 The Java 8 / Jetty 9.3 Runtime Dockerfile FROM gcr.io/google_appengine/jetty9 ADD root.war $JETTY_BASE/webapps/ app.yaml runtime: custom / java vm: true api_version: 1 runtime_config: jdk: openjdk8 server: jetty9 The Java 8 / Jetty 9.3 Compact Runtime Dockerfile FROM gcr.io/google_appengine/jetty9-compat ADD . /app/ appengine-web.xml <vm>true</vm>
  6. app.yaml now controls Java runtimes (The compat runtime still needs

    appengine-web.xml) runtime: java vm: true api_version: 1 handlers: - url: .* script: dynamic resources: cpu: .5 memory_gb: 1.3 disk_size_gb: 10 automatic_scaling: min_num_instances: 1 max_num_instances: 20 cool_down_period_sec: 60 cpu_utilization: target_utilization: 0.5 env_variables: OAUTH2_CALLBACK: http://your-project-id.appspot.com/oauth2callback LOG_PATH: /var/log/app_engine/custom_logs
  7. New tooling • Cloud SDK • fingerprinting • deploy app.yaml

    configurations • Maven Plugin for Cloud SDK • Automatic staging phase for GAE sandbox compat applications • or put app.yaml and Dockerfile in src/main/appengine directory <plugin> <groupId>com.google.appengine</groupId> <artifactId>gcloud-maven-plugin</artifactId> <version></version> <configuration> <version>purejetty9vmtrue</version> </configuration> </plugin> <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>0.1.1-beta</version> <configuration> </configuration> </plugin>