hands on app engine
TRANSCRIPT
What is App Engine?An integrated software
architecture and full managed by
google~
CloudDatastore
CloudSQL
CloudStorage
Runtime
Cloud Endpoints Task Queues
App Engine ArchitectureClosest Google
Data Center
Edge Cache
Google Frontend
App Engine Data Center
App Master(App Engine Management Layer)
Static Servers
App Engine
Frontend
App Servers
Application Instances
Application Instances
Application Instances
Google’s FiberISP
MemcacheGAE
User
Datastore
Task Queues
GAE
Scheduled TasksGAE
Search APIGAE
Logs APIGAE
Run use CLI locallyUsing “gcloud preview app”
# cd $your-project
# gcloud preview app run ./app.yaml
DatastoreUnlimited store with transaction
support and high replicate
class Employee(db.Model): name = db.StringProperty(required=True) hire_date = db.DateProperty()
e = Employee(name="Antonio Salieri")e.hire_date = datetime.datetime.now().date()e_key = e.put()
scalable and reliable storage
query
transactions
Bigtable
Megastore
Datastore
Memcache from google.appengine.api import memcache...
value = memcache.get(key)
if value is None:value = get_value_from_db(key) if not memcache.add(key, value): logging.error('Memcache add failed.')...
Improve Application Performance
Reduce Application Cost
Task QueueTask Queue
Web Requests Worker
/process_form?status=processed&form_data=...
Ancillary Services
External APIs
Task Queue
queue:
- name: push-queue-1
rate: 1/s
- name: pull-queue-1
mode: pull
queue = taskqueue.Queue("Qname")
task = taskqueue.Task(...)
queue.add(task)