Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google Developers Group, Web & Coding Club


Published on

Published in: Technology, News & Politics
1 Comment
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google Developers Group, Web & Coding Club

  1. 1. Introduction To Google app engine
  2. 2. About speaker Speaker: NAGA ROHIT S COnTACT: education: Final Year Under Graudate, Department of CSE, Indian Institute of Technology GuwahatiExperience: The speaker has explored about an year developing applications on Google App Engine.
  3. 3. What we will learn today• Why Cloud ?• Platform as a Service• Who are in the race ? • Why Google App Engine is the Ge3k’s choice ?• Languages Supported• Getting Started• Hello World App• Frameworks • Webapp Framework• Users API• Handling GET & POST • Guest Book App• What’s Next ? • BigTable • GQL (Not SQL) INTRODUCTION • Static Content • Templates & Stuff• Creating & Uploading Your Application• Problems with IITG Proxy• Problems Patched 
  4. 4. Why cloud ?• Scalability• Redundancy• Security• High Initial Investment• Pay As You Grow• Pay only for What You Use•…• Cloud is the future of Internet
  5. 5. Platform as a service
  6. 6. Who are in the race ?• Microsoft Azure  (not free)• Amazon AWS  (free + meh! :P)• Google App Engine  (free + awesome)•…•…
  7. 7. Languages supported• PYTHON [2.5 + 2.7]• GO [EXPERIMENTAL]• JAVA [JAVA 6 JVM]
  8. 8. Getting started• Minimum Requirements • Python 2.5+ • Linux (Windows Fan? Sorry, You are alone )•Download App Engine SDK [Google App Engine SDK for Python]• Extract SDK• cd to google_appengine• Lock and Load!
  9. 9. Hello world app• Inside the google_appengine directory, create a directory with the name helloworld• Create a file named inside helloworld directory.google_appengine/helloworld/ HTTP Header. Never mind! Just accept that you need to write this line when you want to print to the client’s browser This actually goes to the browser
  10. 10. Hello world app• App engine application has a configuration file called app.yaml which tells the app engine about the application being developed and its configuration.• Create a file app.yaml in the helloworld directory.• Wait! What is YAML ? • YAML Ain’t Markup Language • Yet Another Markup Language In short, it’s a more human readable form of data storage.
  11. 11. Hello world appgoogle_appengine/helloworld/app.yaml: Application Identifier Version of the Application you are building Python/Java/Go/whatever Google API version that this application is built on. Basically this is for supporting legacy applications in case APIs change Handles every request of http://localhost/<AnyJunkHere> The script which needs to be run for the above handle match
  12. 12. Hello world app• Summarizing,google_appengine/helloworld/ • • app.yaml• Now, RUN!$ ~/google_appengine/ helloworld/ Starts the server by default on Folder in which the app.yaml port 8080. Can be changed by file for helloworld application resides command line options
  13. 13. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  14. 14. Framework support• Supports any Python-CGI Framework including • Django • CherryPy • Pylons • Web2Py• Natively supports webapp Framework.
  15. 15. Webapp frameworkgoogle_appengine/helloworld/ Import webapp and run_wsgi_app modules Set HeadersHTTP Get Request Print this to browser URL Match Handling Class
  16. 16. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  17. 17. USERS API• Users API uses Google Accounts Sign-Ingoogle_appengine/helloworld/ Import users module If user signs himself using Google Accounts to your web site, do the following Otherwise, redirect to Sign-In/Sign-Up powered by Google Accounts
  18. 18. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  19. 19. Guest book app (hadnling forms)google_appengine/helloworld/ Good Ol’ HTTP Form that POSTs to http://localhost:8080/sign page http://localhost:8080/sign is handled by Guestbook class
  20. 20. Voila! It works!• In your browser, type: http://localhost:8080 ⏎
  21. 21. What’s next ?• Using DataStore • Using GQL Explore!• Using Templates• Using Static Files in App Engine• Uploading Your Application
  22. 22. Uploading application• We use for application deploying• Create and Manage your application at• Click “Create Application”• Follow the instructions and create an Application ID• Application ID is unique throughout App Engine!
  23. 23. Uploading application• Edit app.yaml file from your helloworld directory and change the value of “application:” setting from “helloworld” to your registered ID• Now, RUN!$ ~/google_appengine/ update helloworld/• If you setup a free * domain name, the URL of your application begins with the application ID.
  24. 24. Is that it ?• That’s all ? NO
  25. 25. problems• App Engine SDK doesn’t work with Proxy!! • So, basically, your time is wasted in hearing this lecture!
  26. 26. solution• Kidding!• I have patched an SDK. I will inform you shortly about its download link 
  27. 27. questions
  28. 28. Thanks Drop me a mail