SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Ruby on Google App Engine
  Upgrade to Google App “Turbo” Engine




                            Joseph Ku (Chieh-Fang Ku)
                               chiehfang.ku@gmail.com
Outline
What’s Google App    Be prepared
Engine?
                     What’s JRuby
Why Google App
Engine?              Why Sinatra and why
                     not Rails?
  Free quotas and
  limits             Hack! Hack! Hack!

  Significant         References
  features

                                                  v1.2.0
                                     Build 201105111230
Who am I?
Joseph Ku (Chieh-Fang Ku)(@josephku)

  Male

     Single, but not rich

A Linux user since 1996

Fed by embedded Linux and Android

Ruby lover and Guitar Hero rocker
Before we start...

Don’t take any notes. This slide will be
published with CC BY-NC-ND.

Don’t judge my look and shape. It’s cold, and
I need Calories.

Don’t play Angry Birds during my presentation

  ...including Angry Birds Seasons edition
Before we start...


You CAN interrupt me anytime.

You CAN take pictures anytime.

You CAN go to the toilet anytime.
What’s Google App Engine?


 GAE (Google App Engine) lets you run your
 web apps on Google's infrastructure.

 Reliable PaaS (Platform as a Service)

 Easy to use, maintain and scale

 Almost free!
What’s Google App Engine?

 GAE (Google App Engine) lets you run your
 web apps on Google's infrastructure.

 Typical PaaS (Platform as a Service)

 Only supports Python and Java runtime
 environments

 Who did choose GAE?...
Why Google App Engine?


 World-class infrastructure

 Light-weight PaaS

 Booming of Client-Side JavaScript

 Obey its limitations
Free quotas and limits
Free Quotas (without   1 GB shared
enabling 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
Reduced again and
 again...and again?
Free quotas and limits
Limits

   10 apps for          150 MB app code
   developer account    size

   30 sec per request   1,000 deployments

   10 MB HTTP           200 indexes
   response size
Significant features
Schedule tasks        Google account
                      integration
  Schedule tasks -
  Like Cron service   URL fetch

     Every minutes!   Mail

     Up to 20 tasks   Memcache

Task queues - only    Image manipulation
support Python
What’s URL Shortener?
 Such as:

   TinyURL.com

   bit.ly

   goo.gl

   t.co

   fb.me
Create your own URL
     shortener
I want this: http://mrku.co/j3Rs7k

Base 62 (0-9, a-z, A-Z)

Generated by O(1) algorithm

I want my service fast

I don’t wanna pay

I   Ruby!
Why this happen?

You just said GAE could only support Python
and Java...

  Mighty JVM

  JRuby

  DataMapper

  appengine-jruby project (John Woodell)
Be Prepared

Java SE Development Kit (JDK)

Ruby

RubyGems

JRuby

(...Wh...Where is GAE?)
Be Prepared


Install 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)
Be Prepared


Create a GAE app and test it:

$ appcfg.rb generate_app myapp

$ dev_appserver.rb myapp

Go and check http://localhost:8080/
...That’s all?
Wake up!!
This world is NOT
     perfect!
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
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
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"
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_appserver.rb myapp

  Go and check http://localhost:8080/
What’s JRuby
100% Java implementation of the Ruby
programming language

  We could call Ruby MRI, “CRuby.”

Open source, Started in 2001

Always aiming for compatibility with current
Ruby version

  Latest release: 1.6.1 (update to 2011.05.11)
Why Sinatra and why
     not Rails
Sinatra is lighter than Rails

Sinatra’s CGI-friendly is more close to GAE

Tons of problems while trying to deploy a
Rails app to GAE

Big performance issues in Rails apps on GAE

Besides...
Why Sinatra and why
     not Rails
There is Heroku!!

$ gem install heroku

$ heroku create myapp

$ git push heroku master

Go and check http://myapp.heroku.com
Hack! Hack! Hack!
References

Google App Engine: Quotas

  http://code.google.com/intl/en/appengine/
  docs/quotas.html

JRuby

  http://www.jruby.org/
References


DataMapper

  http://datamapper.org/

appengine-jruby project

  http://code.google.com/p/appengine-jruby/

  John Woodell (woodie@google.com)
References
RVM: Ruby Version Manger

  http://rvm.beginrescueend.com/

Pik: Ruby version manager for Windows

  https://github.com/vertiginous/pik/

Sinatra

  http://www.sinatrarb.com/
Any questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
 
Headless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationHeadless BDD & Responsive Test Automation
Headless BDD & Responsive Test Automation
 
Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016Experiences building apps with React Native @DomCode 2016
Experiences building apps with React Native @DomCode 2016
 
Going Native With React
Going Native With ReactGoing Native With React
Going Native With React
 
What's New in JHipsterLand - DevNexus 2017
What's New in JHipsterLand - DevNexus 2017What's New in JHipsterLand - DevNexus 2017
What's New in JHipsterLand - DevNexus 2017
 
Cloud Native PWAs (progressive web apps with Spring Boot and Angular) - DevNe...
Cloud Native PWAs (progressive web apps with Spring Boot and Angular) - DevNe...Cloud Native PWAs (progressive web apps with Spring Boot and Angular) - DevNe...
Cloud Native PWAs (progressive web apps with Spring Boot and Angular) - DevNe...
 
Creating books app with react native
Creating books app with react nativeCreating books app with react native
Creating books app with react native
 
Power of React Native
Power of React NativePower of React Native
Power of React Native
 
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
 
Testing Angular Applications - Jfokus 2017
Testing Angular Applications - Jfokus 2017Testing Angular Applications - Jfokus 2017
Testing Angular Applications - Jfokus 2017
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSH
 
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo MeetupWordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
 
Spring Bootを触ってみた
Spring Bootを触ってみたSpring Bootを触ってみた
Spring Bootを触ってみた
 
GWT
GWTGWT
GWT
 
Using JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot apps
 
More than nexus, better than nexus.
More than nexus, better than nexus.More than nexus, better than nexus.
More than nexus, better than nexus.
 
All About GitHub Pull Requests
All About GitHub Pull RequestsAll About GitHub Pull Requests
All About GitHub Pull Requests
 
Mojolicious and REST
Mojolicious and RESTMojolicious and REST
Mojolicious and REST
 
Memaksimalkan Non-Blocking IO pada Node.js
Memaksimalkan Non-Blocking IO pada Node.jsMemaksimalkan Non-Blocking IO pada Node.js
Memaksimalkan Non-Blocking IO pada Node.js
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
 

Andere mochten auch

NCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-core
NCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-coreNCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-core
NCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-core
Mikaël Meyer, BAA, MSc, ITIL, COBIT
 
Ccna 3 v 4.0 final-exam-17-07-2010
Ccna 3 v 4.0 final-exam-17-07-2010Ccna 3 v 4.0 final-exam-17-07-2010
Ccna 3 v 4.0 final-exam-17-07-2010
irbas
 
Presentación teléfono bilal y igor
Presentación teléfono bilal y igorPresentación teléfono bilal y igor
Presentación teléfono bilal y igor
josetecnologies
 
Reunión FAPA Rioja de 29 de enero de 2009
Reunión FAPA Rioja de 29 de enero de 2009Reunión FAPA Rioja de 29 de enero de 2009
Reunión FAPA Rioja de 29 de enero de 2009
ampavicenteochoa
 
035.02.08 sk scheur rapportage
035.02.08 sk scheur rapportage035.02.08 sk scheur rapportage
035.02.08 sk scheur rapportage
Hendrik Haafkens
 
Labsurlab cooperaciones
Labsurlab cooperacionesLabsurlab cooperaciones
Labsurlab cooperaciones
Guerrerasolar
 
Tema 3. prehistoria (nacimiento del hombre 3000 a. c)
Tema 3. prehistoria (nacimiento del hombre  3000 a. c)Tema 3. prehistoria (nacimiento del hombre  3000 a. c)
Tema 3. prehistoria (nacimiento del hombre 3000 a. c)
Candela De Cruz Romero
 

Andere mochten auch (20)

JavaじゃないあたりのGAE事情
JavaじゃないあたりのGAE事情JavaじゃないあたりのGAE事情
JavaじゃないあたりのGAE事情
 
Web エンジニアが postgre sql を選ぶ 3 つの理由
Web エンジニアが postgre sql を選ぶ 3 つの理由Web エンジニアが postgre sql を選ぶ 3 つの理由
Web エンジニアが postgre sql を選ぶ 3 つの理由
 
Camera di Commercio Italiana per la Svizzera
Camera di Commercio Italiana per la SvizzeraCamera di Commercio Italiana per la Svizzera
Camera di Commercio Italiana per la Svizzera
 
114 NariñO InstitucióN Educativa San Bartolomé Q
114 NariñO  InstitucióN Educativa San Bartolomé Q114 NariñO  InstitucióN Educativa San Bartolomé Q
114 NariñO InstitucióN Educativa San Bartolomé Q
 
Semana Santa Calpe 2015
Semana Santa Calpe 2015Semana Santa Calpe 2015
Semana Santa Calpe 2015
 
Clausula
ClausulaClausula
Clausula
 
NCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-core
NCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-coreNCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-core
NCA-#1985747-v3B-ARCHIVE_Memorundum_of_Understanding_Core_vs_non-core
 
Ccna 3 v 4.0 final-exam-17-07-2010
Ccna 3 v 4.0 final-exam-17-07-2010Ccna 3 v 4.0 final-exam-17-07-2010
Ccna 3 v 4.0 final-exam-17-07-2010
 
Marketing inbound para empresas B2B
Marketing inbound para empresas B2BMarketing inbound para empresas B2B
Marketing inbound para empresas B2B
 
Presentación teléfono bilal y igor
Presentación teléfono bilal y igorPresentación teléfono bilal y igor
Presentación teléfono bilal y igor
 
Mobile Mastery
Mobile MasteryMobile Mastery
Mobile Mastery
 
Reunión FAPA Rioja de 29 de enero de 2009
Reunión FAPA Rioja de 29 de enero de 2009Reunión FAPA Rioja de 29 de enero de 2009
Reunión FAPA Rioja de 29 de enero de 2009
 
035.02.08 sk scheur rapportage
035.02.08 sk scheur rapportage035.02.08 sk scheur rapportage
035.02.08 sk scheur rapportage
 
Labsurlab cooperaciones
Labsurlab cooperacionesLabsurlab cooperaciones
Labsurlab cooperaciones
 
Cecot Xarxes Socials Marius Cirera
Cecot   Xarxes Socials   Marius CireraCecot   Xarxes Socials   Marius Cirera
Cecot Xarxes Socials Marius Cirera
 
7 abilitites of a linchpin
7 abilitites of a linchpin7 abilitites of a linchpin
7 abilitites of a linchpin
 
Neubau AM PULS Alt-Maxglan, Salzburg
Neubau AM PULS Alt-Maxglan, SalzburgNeubau AM PULS Alt-Maxglan, Salzburg
Neubau AM PULS Alt-Maxglan, Salzburg
 
Ex118119 sp 68014902001a
Ex118119 sp 68014902001aEx118119 sp 68014902001a
Ex118119 sp 68014902001a
 
Elaine Muir (Plan Vivo)-Carbon Offsetting Case Study
Elaine Muir (Plan Vivo)-Carbon Offsetting Case StudyElaine Muir (Plan Vivo)-Carbon Offsetting Case Study
Elaine Muir (Plan Vivo)-Carbon Offsetting Case Study
 
Tema 3. prehistoria (nacimiento del hombre 3000 a. c)
Tema 3. prehistoria (nacimiento del hombre  3000 a. c)Tema 3. prehistoria (nacimiento del hombre  3000 a. c)
Tema 3. prehistoria (nacimiento del hombre 3000 a. c)
 

Ähnlich wie Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
catherinewall
 
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Kyle Drake
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
mdc11
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? O
ikailan
 

Ähnlich wie Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine (20)

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::SynchronyFast, concurrent ruby web applications with EventMachine and EM::Synchrony
Fast, concurrent ruby web applications with EventMachine and EM::Synchrony
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
Ruby And The Cloud
Ruby And The CloudRuby And The Cloud
Ruby And The Cloud
 
Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Mobile Development integration tests
Mobile Development integration testsMobile Development integration tests
Mobile Development integration tests
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Gentle App Engine Intro
Gentle App Engine IntroGentle App Engine Intro
Gentle App Engine Intro
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? O
 
What is Google App Engine?
What is Google App Engine?What is Google App Engine?
What is Google App Engine?
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
Cloud Computing Bootcamp On The Google App Engine [v1.1]
Cloud Computing Bootcamp On The Google App Engine [v1.1]Cloud Computing Bootcamp On The Google App Engine [v1.1]
Cloud Computing Bootcamp On The Google App Engine [v1.1]
 
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product..."Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
 
JRuby and Google App Engine
JRuby and Google App EngineJRuby and Google App Engine
JRuby and Google App Engine
 

Mehr von Joseph Ku (7)

R&B: When Ruby Met Bitcoin
R&B: When Ruby Met BitcoinR&B: When Ruby Met Bitcoin
R&B: When Ruby Met Bitcoin
 
Swift Introduction to Swift in Ruby
Swift Introduction to Swift in RubySwift Introduction to Swift in Ruby
Swift Introduction to Swift in Ruby
 
第一次去 WWDC 就上手
第一次去 WWDC 就上手第一次去 WWDC 就上手
第一次去 WWDC 就上手
 
手機遊戲開發的兩三事
手機遊戲開發的兩三事手機遊戲開發的兩三事
手機遊戲開發的兩三事
 
RubyMotion Gets A Cool New Friend: mruby on iOS
RubyMotion Gets A Cool New Friend: mruby on iOSRubyMotion Gets A Cool New Friend: mruby on iOS
RubyMotion Gets A Cool New Friend: mruby on iOS
 
RubyMotion: Hack Your iOS App Like Never Before
RubyMotion: Hack Your iOS App Like Never BeforeRubyMotion: Hack Your iOS App Like Never Before
RubyMotion: Hack Your iOS App Like Never Before
 
iOS Game Development: When Cocoa Met Cocos...
iOS Game Development: When Cocoa Met Cocos...iOS Game Development: When Cocoa Met Cocos...
iOS Game Development: When Cocoa Met Cocos...
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

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

  • 1. Ruby on Google App Engine Upgrade to Google App “Turbo” Engine Joseph Ku (Chieh-Fang Ku) chiehfang.ku@gmail.com
  • 2. Outline What’s Google App Be prepared Engine? What’s JRuby Why Google App Engine? Why Sinatra and why not Rails? Free quotas and limits Hack! Hack! Hack! Significant References features v1.2.0 Build 201105111230
  • 3. Who am I? Joseph Ku (Chieh-Fang Ku)(@josephku) Male Single, but not rich A Linux user since 1996 Fed by embedded Linux and Android Ruby lover and Guitar Hero rocker
  • 4. Before we start... Don’t take any notes. This slide will be published with CC BY-NC-ND. Don’t judge my look and shape. It’s cold, and I 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 Google's 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 Google's 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 limits Free Quotas (without 1 GB shared enabling 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 limits Limits 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 features Schedule tasks Google account integration Schedule tasks - Like Cron service URL fetch Every minutes! Mail Up to 20 tasks Memcache Task queues - only Image manipulation support Python
  • 13.
  • 14. What’s URL Shortener? Such as: TinyURL.com bit.ly goo.gl t.co fb.me
  • 15. Create your own URL shortener I want this: http://mrku.co/j3Rs7k Base 62 (0-9, a-z, A-Z) Generated by O(1) algorithm I want my service fast I don’t wanna pay I Ruby!
  • 16. Why this happen? You just said GAE could only support Python and Java... Mighty JVM JRuby DataMapper appengine-jruby project (John Woodell)
  • 17. Be Prepared Java SE Development Kit (JDK) Ruby RubyGems JRuby (...Wh...Where is GAE?)
  • 18. Be Prepared Install 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)
  • 19. Be Prepared Create a GAE app and test it: $ appcfg.rb generate_app myapp $ dev_appserver.rb myapp Go and check http://localhost:8080/
  • 21. Wake up!! This world is NOT perfect!
  • 22. 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
  • 23. 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
  • 24. 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"
  • 25. 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_appserver.rb myapp Go and check http://localhost:8080/
  • 26. What’s JRuby 100% Java implementation of the Ruby programming language We could call Ruby MRI, “CRuby.” Open source, Started in 2001 Always aiming for compatibility with current Ruby version Latest release: 1.6.1 (update to 2011.05.11)
  • 27. Why Sinatra and why not Rails Sinatra is lighter than Rails Sinatra’s CGI-friendly is more close to GAE Tons of problems while trying to deploy a Rails app to GAE Big performance issues in Rails apps on GAE Besides...
  • 28. Why Sinatra and why not Rails There is Heroku!! $ gem install heroku $ heroku create myapp $ git push heroku master Go and check http://myapp.heroku.com
  • 30. References Google App Engine: Quotas http://code.google.com/intl/en/appengine/ docs/quotas.html JRuby http://www.jruby.org/
  • 31. References DataMapper http://datamapper.org/ appengine-jruby project http://code.google.com/p/appengine-jruby/ John Woodell (woodie@google.com)
  • 32. References RVM: Ruby Version Manger http://rvm.beginrescueend.com/ Pik: Ruby version manager for Windows https://github.com/vertiginous/pik/ Sinatra http://www.sinatrarb.com/