Your SlideShare is downloading. ×
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

2,733
views

Published on

Published in: Technology, Business

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,733
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
91
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Ruby on Google App Engine Upgrade to Google App “Turbo” Engine Joseph Ku (Chieh-Fang Ku) chiehfang.ku@gmail.com
  • 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. 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. 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. Before we start...You CAN interrupt me anytime.You CAN take pictures anytime.You CAN go to the toilet anytime.
  • 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. 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. Why Google App Engine? World-class infrastructure Light-weight PaaS Booming of Client-Side JavaScript Obey its limitations
  • 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. Reduced again and again...and again?
  • 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. 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. What’s URL Shortener? Such as: TinyURL.com bit.ly goo.gl t.co fb.me
  • 14. Create your own URL shortenerI want this: http://mrku.co/j3Rs7kBase 62 (0-9, a-z, A-Z)Generated by O(1) algorithmI want my service fastI don’t wanna payI Ruby!
  • 15. Why this happen?You just said GAE could only support Pythonand Java... Mighty JVM JRuby DataMapper appengine-jruby project (John Woodell)
  • 16. Be PreparedJava SE Development Kit (JDK)RubyRubyGemsJRuby(...Wh...Where is GAE?)
  • 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. Be PreparedCreate a GAE app and test it:$ appcfg.rb generate_app myapp$ dev_server.rb myappGo and check http://localhost:8080/
  • 19. ...That’s all?
  • 20. Wake up!!This world is NOT perfect!
  • 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. 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. 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. 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. 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. 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. Why Sinatra and why not RailsThere is Heroku!!$ gem install heroku$ heroku create myapp$ git push heroku masterGo and check http://myapp.heroku.com
  • 28. Hack! Hack! Hack!
  • 29. ReferencesGoogle App Engine: Quotas http://code.google.com/intl/en/appengine/ docs/quotas.htmlJRuby http://www.jruby.org/
  • 30. ReferencesDataMapper http://datamapper.org/appengine-jruby project http://code.google.com/p/appengine-jruby/ John Woodell (woodie@google.com)
  • 31. ReferencesRVM: Ruby Version Manger http://rvm.beginrescueend.com/Pik: Ruby version manager for Windows https://github.com/vertiginous/pik/Sinatra http://www.sinatrarb.com/
  • 32. Any questions?