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.

Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine


Published on

Published in: Technology, Business
  • Be the first to comment

Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine

  1. 1. Ruby on Google App Engine Upgrade to Google App “Turbo” Engine Joseph Ku (Chieh-Fang Ku)
  2. 2. OutlineWhat’s Google App Be preparedEngine? What’s JRubyWhy Google AppEngine? Why Sinatra and why not Rails? Free quotas and limits Hack! Hack! Hack! Significant References features v1.0.6 Build 201104022100
  3. 3. Who am I?Joseph Ku (Chieh-Fang Ku)(@josephku) Male Single, but not richA Linux user since 1996Fed by embedded Linux and AndroidRuby lover and Guitar Hero rocker
  4. 4. Before we start...Don’t take any notes. This slide will bepublished with CC BY-NC-ND.Don’t judge my look and shape. It’s cold, andI need Calories.Don’t play Angry Birds during my presentation ...including Angry Birds Seasons edition
  5. 5. Before we start...You CAN interrupt me anytime.You CAN take pictures anytime.You CAN go to the toilet anytime.
  6. 6. What’s Google App Engine? GAE (Google App Engine) lets you run your web apps on Googles infrastructure. Reliable PaaS (Platform as a Service) Easy to use, maintain and scale Almost free!
  7. 7. What’s Google App Engine? GAE (Google App Engine) lets you run your web apps on Googles infrastructure. Typical PaaS (Platform as a Service) Only supports Python and Java runtime environments Who did choose GAE?...
  8. 8. Why Google App Engine? World-class infrastructure Light-weight PaaS Booming of Client-Side JavaScript Obey its limitations
  9. 9. Free quotas and limitsFree Quotas (without 1 GB sharedenabling billing) Datastore/ Blobstore size 43,200,000 requests per day 6.5 CPU-hours per day 45,200 requests per minute 1 GB shared bandwidth in/out per day
  10. 10. Reduced again and again...and again?
  11. 11. Free quotas and limitsLimits 10 apps for 150 MB app code developer account size 30 sec per request 1,000 deployments 10 MB HTTP 200 indexes response size
  12. 12. Significant featuresSchedule tasks Google account integration Schedule tasks - Like Cron service URL fetch Every minutes! Mail Up to 20 tasks MemcacheTask queues - only Image manipulationsupport Python
  13. 13. What’s URL Shortener? Such as:
  14. 14. Create your own URL shortenerI want this: 62 (0-9, a-z, A-Z)Generated by O(1) algorithmI want my service fastI don’t wanna payI Ruby!
  15. 15. Why this happen?You just said GAE could only support Pythonand Java... Mighty JVM JRuby DataMapper appengine-jruby project (John Woodell)
  16. 16. Be PreparedJava SE Development Kit (JDK)RubyRubyGemsJRuby(...Wh...Where is GAE?)
  17. 17. Be PreparedInstall all packages we need:$ gem install google-appengine(rack, jruby-rack, jruby-jars, appengine-rack, appengine-apis,appengine-sdk, bundler08, rubyzip, appengine-tools, google-appengine)
  18. 18. Be PreparedCreate a GAE app and test it:$ appcfg.rb generate_app myapp$ dev_server.rb myappGo and check http://localhost:8080/
  19. 19. ...That’s all?
  20. 20. Wake up!!This world is NOT perfect!
  21. 21. Be prepared for the real world Java SE Development Kit (JDK) 6 Ruby 1.8.7-p330 or 1.8.7-p334 RubyGems 1.3.7 JRuby 1.5.6
  22. 22. Be prepared for the real world Suggestions: Use “RVM” to deploy your Ruby environment on Linux or Mac Use “Pik” to deploy your Ruby environment on Windows
  23. 23. Be prepared for the real world Install all packages we need: $ gem install google-appengine And do some tricks... $ gem uninstall appengine-sdk $ gem install appengine-sdk -v "1.4.0"
  24. 24. Be prepared for the real world Create a GAE app and test it: $ appcfg.rb generate_app myapp $ echo “gem jruby-rack, < 1.0.6” >> myapp/ Gemfile $ dev_server.rb myapp Go and check http://localhost:8080/
  25. 25. What’s JRuby100% Java implementation of the Rubyprogramming language We could call Ruby MRI, “CRuby.”Open source, Started in 2001Always aiming for compatibility with currentRuby version Latest release: 1.6.0 (update to 2011.03.15)
  26. 26. Why Sinatra and why not RailsSinatra is lighter than RailsSinatra’s CGI-friendly is more close to GAETons of problems while trying to deploy aRails app to GAEBig performance issues in Rails apps on GAEBesides...
  27. 27. Why Sinatra and why not RailsThere is Heroku!!$ gem install heroku$ heroku create myapp$ git push heroku masterGo and check
  28. 28. Hack! Hack! Hack!
  29. 29. ReferencesGoogle App Engine: Quotas docs/quotas.htmlJRuby
  30. 30. ReferencesDataMapper project John Woodell (
  31. 31. ReferencesRVM: Ruby Version Manger Ruby version manager for Windows
  32. 32. Any questions?