0% found this document useful (0 votes)
58 views26 pages

Intro: Google App Engine & Appscale

This document discusses Google App Engine and AppScale. Google App Engine allows developers to build apps faster by hosting them on Google's servers and avoiding server maintenance. However, App Engine has limitations in the APIs it supports and where apps can be deployed. AppScale addresses these limitations by allowing App Engine apps to run on any cloud or in private data centers while supporting additional APIs. It also discusses how AppScale replicates key App Engine services like the datastore, task queues, and users API.

Uploaded by

Manish Dwibedy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views26 pages

Intro: Google App Engine & Appscale

This document discusses Google App Engine and AppScale. Google App Engine allows developers to build apps faster by hosting them on Google's servers and avoiding server maintenance. However, App Engine has limitations in the APIs it supports and where apps can be deployed. AppScale addresses these limitations by allowing App Engine apps to run on any cloud or in private data centers while supporting additional APIs. It also discusses how AppScale replicates key App Engine services like the datastore, task queues, and users API.

Uploaded by

Manish Dwibedy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

intro

To
Google
app engine
&
Appscale
build apps
faster and
easier
developer
innovation
K
rapid
releases
Z
deploy and
scale on any
cloud
x
Chris bunch
[email protected]
(
b
8
5
$
>
a
common
pattern
One of several recurring
problems seen in the real
world today.

You have a cool idea

To make it into an app, you


need to:

Setup hardware

Congure, deploy app


services

And you have to do this


for every app!
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
PAGE
Why not Amazon?
3

You dont want to deploy and maintain:

Servers

Load balancers

App Servers

Databases

And you dont want to hire people to do it!


www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
PAGE
google app engine
4

A web application hosting service

Never log into a server

Crystallizes web service best practices

Share common services between apps

Focus on writing your app


www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
PAGE
Supported Languages
5
Go
Python
Go
Java
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
Programming Model
(

6
Everything is a web request
Stateless, scalable web server, meaning:

No lesystem access

Persistence via Datastore / memcache

60 second time limit on requests

APIs from whitelist only


PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
The DATAstore
7

Not a relational database, but resembles an


object database

You dene Kinds of data you want to store

Each object stored is an Entity

Entities can be arranged into Groups


PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
Defining a kind
8
class Person(ndb.Model):
user = ndb.UserProperty()
balance = ndb.FloatProperty()
phone = ndb.StringProperty()
last_login = ndb.DateTimeProperty()
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
EXTENDING a kind
9
class Person(ndb.Model):
user = ndb.UserProperty()
balance = ndb.FloatProperty()
phone = ndb.StringProperty()
last_login = ndb.DateTimeProperty()
login_location = ndb.GeoPt()
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
Kind, entities
10
class Person(ndb.Model):
...
new_person = Person()
new_person.put()
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
transactions
11

Updating an Entity happens in a Transaction

Apps tell App Engine which Entities will be updated together by putting
them into an Entity Group

Transactions can only occur within an Entity Group*


def f():
person = db.get(key1)
person.balance = 100.00
person.put()
db.run_in_transaction(f)
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
memcache
12
data = memcache.get(key)
if data:
return data
else:
data = db.get(key)
memcache.set(key, data, 300)
return data
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
users
13
user = users.get_current_user()
if user:
return user.nickname()
else:
return None
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
mail
14
from = Chris Bunch <[email protected]>
to= You <[email protected]>
subject = Try out AppScale!
body = http://download.appscale.com
mail.send_mail(sender=from, to=to, subject=subject,
body=body)
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
task queue
15
taskqueue.add(url=/path/to/worker)
cron:
- description: sends friendly emails
url: /path/to/worker
schedule: every 24 hours
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
url fetch
16
r = urlfetch.fetch(http://www.google.com/)
if r.status_code == 200:
do_something_with_result(r.content)
else:
# retry later
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
xmpp
17
user = [email protected]
msg = Hello there!
status = xmpp.send_message(user, msg)
if status != xmpp.NO_ERROR:
# decide what to do with the failed msg
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
enter appscale
18

But what if you need:

To fail over to a private cloud?

To run your App Engine app in-house?

To use APIs App Engine doesnt support?

Then you need AppScale!


PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
run anywhere
19
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
datastore
20

Supports NoSQL datastores via a database


agnostic API:

get

put

range_query

delete
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
we have supported
21
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
now focusing on...
22
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
load balancing + app servers
23
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
API Services
24
PAGE
www.appscale.com
Phone: +1(805) 845 0010 | e-mail: [email protected]
the development cycle
25

App Engine SDK for rapid development

Limitations:

Many APIs are stubbed out (XMPP, Mail)

Not designed for production workloads

Use AppScale!
Demo

You might also like