• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Intro to App Engine and AppScale
 

Intro to App Engine and AppScale

on

  • 15,833 views

These slides introduce new users to Google App Engine and AppScale, focusing on the APIs that App Engine offers and how AppScale implements them.

These slides introduce new users to Google App Engine and AppScale, focusing on the APIs that App Engine offers and how AppScale implements them.

Statistics

Views

Total Views
15,833
Views on SlideShare
15,826
Embed Views
7

Actions

Likes
4
Downloads
34
Comments
0

1 Embed 7

http://www.linkedin.com 7

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Intro to App Engine and AppScale Intro to App Engine and AppScale Presentation Transcript

    • 8 build apps faster andb intro easier To > Google K5 app engine developer innovation & Appscale Z x$ ( deploy and scale on any cloud rapid releases Chris bunch chris@appscale.com
    • • You have a cool ideaa • To make it into an app, you need to:common • Setup hardwarepattern • Configure, deploy appOne of several recurringproblems seen in the real services •world today. And you have to do this for every app!
    • Why not Amazon?• You don’t want to deploy and maintain: • Servers • Load balancers • App Servers • Databases• And you don’t want to hire people to do it! www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 3
    • google app engine• 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: chris@appscale.com PAGE 4
    • Supported LanguagesPython Java Go www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 5
    • Programming ModelÑ Everything is a web request Stateless, scalable web server, meaning:( • • No filesystem access Persistence via Datastore / memcache • 60 second time limit on requests • APIs from whitelist only www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 6
    • The DATAstore• Not a relational database, but resembles an object database• You define Kinds of data you want to store• Each object stored is an Entity• Entities can be arranged into Groups www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 7
    • Defining a kindclass Person(ndb.Model): user = ndb.UserProperty() balance = ndb.FloatProperty() phone = ndb.StringProperty() last_login = ndb.DateTimeProperty() www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 8
    • EXTENDING a kindclass Person(ndb.Model): user = ndb.UserProperty() balance = ndb.FloatProperty() phone = ndb.StringProperty() last_login = ndb.DateTimeProperty() login_location = ndb.GeoPt() www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 9
    • Kind, entitiesclass Person(ndb.Model): ...new_person = Person()new_person.put() www.appscale.comPhone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 10
    • transactions• 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) www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 11
    • memcachedata = memcache.get(‘key’)if data: return dataelse: data = db.get(‘key’) memcache.set(‘key’, data, 300) return data www.appscale.comPhone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 12
    • usersuser = users.get_current_user()if user: return user.nickname()else: return None www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 13
    • mailfrom = “Chris Bunch <chris@appscale.com>”to= “You <foo@bar.com>”subject = “Try out AppScale!”body = “http://download.appscale.com”mail.send_mail(sender=from, to=to, subject=subject,body=body) www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 14
    • task queuetaskqueue.add(url=“/path/to/worker”)cron:- description: sends friendly emails url: /path/to/worker schedule: every 24 hours www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 15
    • url fetchr = urlfetch.fetch(“http://www.google.com/”)if r.status_code == 200: do_something_with_result(r.content)else: # retry later www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 16
    • xmppuser = “chris@appscale.com”msg = “Hello there!”status = xmpp.send_message(user, msg)if status != xmpp.NO_ERROR: # decide what to do with the failed msg www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 17
    • enter appscale• 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 doesn’t support?• Then you need AppScale! www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 18
    • run anywhere www.appscale.comPhone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 19
    • datastore• Supports NoSQL datastores via a database agnostic API: • get • put • range_query • delete www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 20
    • we have supported www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 21
    • now focusing on... www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 22
    • load balancing + app servers www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 23
    • API Services www.appscale.comPhone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 24
    • the development cycle• App Engine SDK for rapid development• Limitations: • Many APIs are stubbed out (XMPP, Mail) • Not designed for production workloads• Use AppScale! www.appscale.com Phone: +1(805) 845 0010 | e-mail: chris@appscale.com PAGE 25
    • Demo