Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Google AppEngine Workshop

2,281 views

Published on

Published in: Technology, News & Politics
  • Be the first to comment

Google AppEngine Workshop

  1. 1. Google AppEngine Workshop<br />A crash course<br />
  2. 2. Google AppEngine<br />Not Google Apps<br />
  3. 3. Why Google AppEngine?<br />
  4. 4. Scalable<br />Scales very very very easily<br />automagically<br />
  5. 5.
  6. 6. Infrastructure as a Service<br />Rent-a-car<br />
  7. 7. Platform as a Service<br />Taxi<br />
  8. 8. Google AppEngine is PaaS<br />Images demo<br />
  9. 9. Who’s on AppEngine<br />Optimizely.com, BestBuy.com,<br />
  10. 10. Languages<br />Python, Java, Go (Experimental)<br />
  11. 11. Objective<br />Gain a basic knowledge of Google AppEngine<br />
  12. 12. Output<br />Your own app<br />
  13. 13. Questions<br />
  14. 14. Setup<br />https://coderbuddy1.appspot.com/testingentrance?group=albertsclass<br />
  15. 15. Setup<br />Create an app on http://appengine.google.com<br />Default options; High Replication Datastore<br />
  16. 16. Hello World!<br />
  17. 17. Services<br />Datastore, URLFetch, Users, Email, Memcache (if we have time)<br />
  18. 18. Project URL Shortener<br />
  19. 19. Create Page<br />index.html<br />
  20. 20. Datastore<br />Really really fast storage<br />
  21. 21. Storing Data<br />
  22. 22. Create a Model<br />Class Record(db.Model):<br /> name = db.StringProperty()<br /> data = db.TextProperty()<br />
  23. 23. Queries<br />query = Link.all()<br />query.filter(‘url_hash’,’cKj4d’)<br />results = query.fetch(20)<br />
  24. 24. 15mins<br />Shorten some URL’s<br />
  25. 25. URLFetch<br />Interact with other websites<br />
  26. 26. URLFetch<br />response = urlfetch.fetch(url=url)<br />status = response.status_code<br />content= response.content<br />
  27. 27. Verify those URL’s<br />Fetch ‘em first!<br />
  28. 28. Users API<br />Google Accounts<br />
  29. 29. Users API<br />app.yaml<br />login: required<br />
  30. 30. Users API<br />user = users.get_current_user()<br />user.nickname()<br />user.email()<br />user.user_id()<br />
  31. 31. Users API<br />db.UserProperty()<br />
  32. 32. Users API<br />user_id is unique at all times<br />
  33. 33. Create History List for Users<br />Let users see list of their previously shortened url’s<br />
  34. 34. Email<br />
  35. 35. Email<br />mail.send_mail(<br />sender=admin@app.com, <br />to=user@example.com,<br />subject=”hi”,<br />body=”hello!”)<br />
  36. 36. Shorten a link<br />And tweet/facebook/plus it<br />
  37. 37. Click and flood!<br />
  38. 38. Memcache<br />Need for speed<br />(saves you money too!)<br />
  39. 39. Memcache<br />Need for speed<br />(saves you money too!)<br />
  40. 40. Memcache<br />memcache.set(key,data)<br />result = memcache.get(key)<br />
  41. 41. Speed ‘em up!<br />
  42. 42. That’s it!<br />It’s your time to shine now…<br />
  43. 43. Albert Padin<br />SpellDial.com<br />@albertpadin<br />ph.albertpadin<br />

×