google-app-engine

Topics related to google-app-engine:

Getting started with google-app-engine

There are two ways to get the GAE SDK (the standalone GAE SDK vs Google Cloud SDK gcloud). There are slight differences when the deploying the app using gcloud. If you are using gcloud, you can use gcloud app deploy ~/my_app/app.yaml. The behaviour is different from using the old appcfg.py. If you prefer using appcfg.py, you will find that it is not available. It is because for some reasons, Google decided to hide it from the developer. However, the appcfg.py is, in fact, installed in the directory google-cloud-sdk/platform/google_appengine/. Other useful scripts such as bulkloader.py are there as well.

EdgeCache

Details

How EdgeCache works

EdgeCache is a reverse proxy cache that stores data for a certain period of time, and returns it quickly upon seeing the same request as long as the cache is still valid.

Here is a diagram from this video from the App Engine team about how EdgeCache works:

EdgeCache Diagram

The "Google Front End" data centers are located around the world and can store cached data to be returned quickly upon request without ever having to run any of your App Engine code (which runs on the "App Engine Front End").

See this StackOverflow answer for more information about reverse proxies in general.

Current Situation

Unfortunately, the current state of knowledge about GAE's EdgeCache is pretty bad. The extent of the documentation on this secretive feature can be found in this forum post (read it now!) from 2011 and the 24 seconds between 11:11 and 11:35 in this video from Google.

More Resources

Below is the list of more resources we've found pertaining to App Engine's EdgeCache feature:

Python Runtime Examples for Google Appengine

Unit testing with datastore

Google App Engine Quickstart for Java

Quick start with Users Python API, App Engine Authentication

The Users API allows:

  • Detect whether the current user has signed in.
  • Redirect the user to the appropriate sign-in page to sign in.
  • Request that your application user create a new Google account if they don't have one already.

Reference and more details


Important elements into the view:

Import:

from google.appengine.api import users

User-object and methods:

user = users.get_current_user()

Note: the implementation of jinja2 is optional, but into the article is used to explaining the completely workflow.