App Engine On Air: Munich

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    6 Favorites & 1 Group

    App Engine On Air: Munich - Presentation Transcript

    1. Google App Engine Flying into Munich
    2. Dion Almaer twitter.com/dalmaer almaer.com
    3. Don't forget, RIA's have rich internet back-ends (RIBs?) Jonathan Schwartz CEO, Sun Microsystems
    4. Google App Engine Running Web Apps on Google’s Infrastructure • Fully-integrated application environment • Language agnostic runtime Python for now • Free quota of 5M pageviews per month code.google.com/appengine
    5. Google App Engine Technical Challenges
    6. Google App Engine Financial and Admin Challenges
    7. Google App Engine Easy to use, Easy to scale, Free to start
    8. Google App Engine Free Quota and Expected Pricing Resource Free Quota Additional CPU 10-12¢ / core-hour Storage Equivalent to 5M 15-18¢ / GB-month pageviews / month Bandwidth, Outgoing for a typical app 11-13¢ / GB transferred Bandwidth, Incoming 9-11¢ / GB transferred 11
    9. Google App Engine Free Quota and Expected Pricing eo rge! an ks G Th Resource Free Quota Additional CPU 1 euro / core-year Storage Equivalent to 5M 1 euro / GB-decade pageviews / month Bandwidth, Outgoing for a typical app 1 euro / PB transferred Bandwidth, Incoming 1 euro / PB transferred 13
    10. Develop locally. Deploy to Google. Launch.
    11. Develop locally. Deploy to Google. Launch. Deploy
    12. Develop locally. Deploy to Google. Launch.
    13. Develop locally. • Google App Engine SDK is open source • Simulates production environment •dev_appserver.py myapp •appcfg.py update myapp
    14. Hello World Simplest output, simplest config # helloworld.py print \"Content-Type: text/html\" print print \"Hello, world!\" # app.yaml application: dalmaer-helloworld version: 1 runtime: python api_version: 1 handlers: - url: /.* script: helloworld.py
    15. loadcontacts var contacts = [ { id: 1, name: ‘Dion Almaer’, ... }, { id: 2, name: ‘Ben Galbraith’, ... }, savecontact ] name=’Dion A Lamer’ email=’dion@almaer.com’ Web Services
    16. threads sockets files foreground the snake is almost there
    17. from django import v0_96 as django
    18. Store data Scalable, and not like a RDBMS Wow, that's a big table!
    19. • No joins • Hierarchies • Indexes
    20. Data Model Just an object from google.appengine.ext import db class Story(db.Model): title = db.StringProperty() body = db.TextProperty(required=True) author = db.UserProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) rating = db.RatingProperty() # Many other types: BlobProperty, ReferenceProperty, EmailProperty, PhoneProperty, IMProperty, PostallAddressProperty, etc.
    21. GQL Our query language SELECT * FROM Story WHERE title = 'App Engine Launch' AND author = :current_user AND rating >= 10 ORDER BY rating, created DESC
    22. Run the queries Beyond GQL Story.gql(GQL_FROM_BEFORE, current_user = users.get_current_user()) query = Story.all() query.filter('title =', 'Foo') .order('-date') .ancestor(key)
    23. Inserts Manipulating the data story = Story( title = 'Morning Glory', body = '....', author = users.get_current_user(), ) story.put() # save or update story.delete() # delete if saved
    24. Call Web Services
    25. URL Fetch API Aint no urllib2 from google.appengine.api import urlfetch some_feed = urlfetch.fetch('http://somesite.com/rss') if some_feed.status_code == 200: self.response.out.write(some_feed.content) 53 421
    26. Authenticate to Google OpenID provider.... available
    27. Users API But you can do your own thing too of course... from google.appengine.api import users current_user = users.get_current_user() if not current_user: self.redirect(users.create_login_url('/ current_url')) nickname = current_user.nickname() email = current_user.email() if users.is_current_user_admin(): ...
    28. Send Email
    29. Email API No SMTP config required from google.appengine.api import mail def post(self): email_body = self.request.get('email_body') sender = users.get_current_user().email mail.send_mail(sender=sender, to='marce@google.com', subject='Wiki Page', body=email_body) self.response.out.write('Email Sent')
    30. Manipulate Images
    31. Image Manipulation API No SMTP config required # in model avatar = db.BlobProperty() # in handler avatar = images.resize(self.request.get(\"img\"), 32, 32) # available resize crop rotate horizontal_flip vertical_flip im_feeling_lucky :)
    32. Memcache Support In-memory distributed cache
    33. Memcache API In-memory distributed cache from google.appengine.api import memcache def get_data(): data = memcache.get(\"key\") if data is not None: return data else: data = self.query_for_data() memcache.add(\"key\", data, 60) return data # Set several values, overwriting any existing values for these keys. memcache.set_multi({ \"USA_98105\": \"raining\", \"USA_94105\": \"foggy\", \"USA_94043\": \"sunny\" }, key_prefix=\"weather_\", time=3600) # Atomically increment an integer value. memcache.set(key=\"counter\", 0) memcache.incr(\"counter\") memcache.incr(\"counter\") memcache.incr(\"counter\")
    34. Google App Engine Areas of Work, Including… • Offline Processing • Rich Media Support – e.g., large file upload / download • Add’l Infrastructure Services • What would you like to see? 40
    35. Use it as you will No need to go whole hog
    36. Your Application Web Services
    37. Google App Engine Announcing Open Signups
    38. Python Runtime Web Configuration Applications Static Files URL Fetch API Google App Engine Email API Users API Memcache API Image API
    39. What if popular JavaScript libraries were available and shared in the browser? 1 Now hosting open source JavaScript libraries at Google Starting with: Prototype, Script.aculo.us, jQuery, Dojo, Mootools Accepting requests for other open source libraries Can access directly: ajax.googleapis.com/ajax/lib/prototype?v=1.6.0.2&packed=false Can access via AJAX API Loader: google.load(“prototype”, “1.6”); 2 Other features Automatic compression Minification of libraries Not tied to Google Code
    40. Python Runtime Web Configuration Applications Static Files URL Fetch API Google App Engine Email API Users API Memcache API Image API

    + diondion, 2 years ago

    custom

    3174 views, 6 favs, 4 embeds more stats

    This is the presentation that I gave on the Europea more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 3174
      • 3029 on SlideShare
      • 145 from embeds
    • Comments 0
    • Favorites 6
    • Downloads 97
    Most viewed embeds
    • 142 views on http://almaer.com
    • 1 views on http://www.hanrss.com
    • 1 views on http://www.almaer.com
    • 1 views on http://static.slideshare.net

    more

    All embeds
    • 142 views on http://almaer.com
    • 1 views on http://www.hanrss.com
    • 1 views on http://www.almaer.com
    • 1 views on http://static.slideshare.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events