Chris Donati edited this page May 25, 2015 · 4 revisions

Executive Summary: Configures and deploys services needed to run Google App Engine apps.

Why do we need it?

Google App Engine applications enable roughly a dozen APIs, each of which utilize some type of scalable service (e.g., Datastore, Memcache). Each of these services need to be configured and deployed, automatically, in a possibly distributed environment. To avoid making the user (or AppScale administrator) manually do this work, the AppController fills this role.

What does it do, and how does it do it?

The AppScale Tools starts the AppController on the node designated controller in the ips.yaml file (or master for advanced deployments), and once it has started, the Tools sends this AppController the ips.yaml file. This AppController then starts up AppController processes on the other nodes. Finally, each AppController starts all services that should run on its node (as specified in the ips.yaml file), typically by calling start_<servicename>.

When does it do it?

Throughout AppScale's startup process, and periodically after AppScale has finished starting up.

Where does it do it?

An AppController runs on each node within an AppScale deployment, and changes the services that it runs:

  • Once when it initially is started (when no other services are running).
  • In response to a request to start or stop a service from another AppController.

Developer stuff

The AppController is written in Ruby, and its code can be found in appscale/AppController. The main AppController daemon is called djinn.rb (name originating from Godel, Escher, Bach), and the SOAP server that exposes its methods is found in djinnServer.rb.

Tests are written with test/unit and flexmock. Run the current unit test suite from appscale with $ rake appcontroller:test.