• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Aloha on-rails-2009
 

Aloha on-rails-2009

on

  • 1,053 views

 

Statistics

Views

Total Views
1,053
Views on SlideShare
1,042
Embed Views
11

Actions

Likes
0
Downloads
2
Comments
0

2 Embeds 11

http://speakerrate.com 7
http://www.slideshare.net 4

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Aloha on-rails-2009 Aloha on-rails-2009 Presentation Transcript

    • Tuesday, October 13, 2009
    • Ship your App in a Container JRuby on Google App Engine John Woodell Oct 5, 2009 2 Tuesday, October 13, 2009
    • Rails Deployment Roadmap • 2004 - FastCGI on Apache or Lighttpd “a rocket that sometimes blows up in strange ways” • 2006 - Mongrel clusters behind Apache mod_proxy “high throughput, but requires multiple moving parts” • 2008 - Phusion Passenger on Apache “simply upload files, rack-based, REE/COW” • 2010 - Rails3 or Sinatra + DataMapper in a servlet container “powerful/portable/scalable, rack-based, JRuby” 3 Tuesday, October 13, 2009
    • Why JRuby? • Outperforms MRI in many cases... 2x to 10x • Gem extensions written in Java (no more segfaults) • A wealth of integration options available • Already works on App Engine with supported APIs 4 Tuesday, October 13, 2009
    • Why Rails3? • More modular, load only what you need for each request • Intelligent gem management and deployment tools • First-class integrations with “other” ORMs like DataMapper • Better routing and Rack integration • Better Javascript integration and options • Rails conventions! 5 Tuesday, October 13, 2009
    • Why Sinatra? • No learning curve... a simple and elegant DSL • Some data-driven apps don’t require MVC or ActionView • No need to extract the components we can’t use • New application instances can spin up quickly 6 Tuesday, October 13, 2009
    • Why DataMapper? • Data mapped in your model, auto-migrations or no migrations • Text fields treated like associations, lazy-load by default • Create concise queries without using method_missing • Supports validations and legacy AR finders • Already works with dm-appengine wrapper 7 Tuesday, October 13, 2009
    • Why a Servlet Container? • Various app servers to choose from • Everything you need in in the container • JRuby-Rack dispatches to Rack while providing access to servlet features • Access to Google App Engine APIs for Java via Ruby APIs that are feature compatible • Our tools allow you to develop in the container with the ability to integrate Java servlets 8 Tuesday, October 13, 2009
    • JRuby on App Engine 9 Tuesday, October 13, 2009
    • Install it Now sudo gem install google-appengine Everything you need installs as gems 10 Tuesday, October 13, 2009
    • What is Google App Engine? • A cloud-computing platform • We provide the container and services • Run your web apps on Google’s infrastructure • Pay-as-you-go, with free quota to get started 11 Tuesday, October 13, 2009
    • App Engine JRuby APIs • AppEngine::Users • AppEngine::Datastore • AppEngine::Memcache • AppEngine::Mail • AppEngine::URLFetch • AppEngine::Images • AppEngine::Logger • AppEngine::Testing • AppEngine::XMPP • AppEngine::Labs::TaskQueue 12 Tuesday, October 13, 2009
    • Dev_AppServer • Customized Jetty server • Local implementation of services – LRU memcache – Disk-backed datastore – HttpClient-backed URLFetch • Emulates the production environment – Sandbox restrictions may be inconsistent, so run tests on production servers as well 13 Tuesday, October 13, 2009
    • Deployment • Your app lives at – <app_id>.appspot.com, or – Custom domain with Google Apps • Deploying uploads – Static files – Resource files – Other metadata (datastore indexes, cron jobs) • Admin Console – dashboards – manage multiple versions – view logs 14 Tuesday, October 13, 2009
    • App Engine Architecture Incoming Requests Load App Engine App Engine App Engine Balancer Front End Front End Front End AppServer AppServer AppServer Other Google AppServer Infrastructure API Layer - Bigtable - Google Accounts - Memcache App App App - Image manipulation 15 Tuesday, October 13, 2009
    • WhiteHouse.gov/openforquestions 16 Tuesday, October 13, 2009
    • Quotas and Billing Resource Provided Free Additional Cost CPU 6.5 hours/day $0.10/hour Bandwidth In 1GByte/day $0.10/GByte Bandwidth Out 1GByte/day $0.12/GByte Stored Data 1 GB $0.005/GB-day Emails sent 2000/day to users $0.0001/email 50000/day to admins 17 Tuesday, October 13, 2009
    • Demo run lambda { |env| [200, {}, 'Aloha'] } 18 Tuesday, October 13, 2009
    • Resources • John Woodell, woodie@google.com • Google App Engine for JRuby – http://code.google.com/p/appengine-jruby/ • Google Group – http://groups.google.com/group/appengine-jruby • Blog: JRuby on App Engine Blog – http://jruby-appengine.blogspot.com/ 19 Tuesday, October 13, 2009
    • Tuesday, October 13, 2009