SlideShare uma empresa Scribd logo
1 de 22
Wednesday, November 25, 2009
JRuby on Google App Engine
           Extending the Java Platform & APIs
           John Woodell
           Nov 27, 2009




             2



Wednesday, November 25, 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




             3



Wednesday, November 25, 2009
WhiteHouse.gov/openforquestions




             4



Wednesday, November 25, 2009
Quotas and Billing
                   Resource        Provided Free      Additional Cost
                   CPU time        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

             5



Wednesday, November 25, 2009
JRuby on App Engine
             6



Wednesday, November 25, 2009
Current Issues with JRuby on App Engine
           • Several seconds to “spin-up” a new JRuby instance
           • Some gems still need their extensions ported to Java
           • Not officially supported , but you have all that you need




                               +                          =       ?
             7



Wednesday, November 25, 2009
$ sudo gem install google-appengine
           Successfully installed appengine-rack-0.0.4
           Successfully installed appengine-jruby-jars-0.0.6
           Successfully installed appengine-sdk-1.2.6
           Successfully installed appengine-tools-0.0.6
           Successfully installed google-appengine-0.0.6
           5 gems installed
           Installing ri documentation for appengine-rack-0.0.4...
           Installing ri documentation for appengine-jruby-jars-0.0.6...
           Installing ri documentation for appengine-sdk-1.2.6...
           Installing ri documentation for appengine-tools-0.0.6...
           Installing ri documentation for google-appengine-0.0.6...
           Installing RDoc documentation for appengine-rack-0.0.4...
           Installing RDoc documentation for appengine-jruby-jars-0.0.6...
           Installing RDoc documentation for appengine-sdk-1.2.6...
           Installing RDoc documentation for appengine-tools-0.0.6...
           Installing RDoc documentation for google-appengine-0.0.6...




             8



Wednesday, November 25, 2009
App Engine Gems
           • Development Gems
             – appengine-rack
             – appengine-tools      dev_appserver.rb & appcfg.rb
             – appengine-sdk
             – appengine-jruby-jars
           • Runtime Gems
           – appengine-rack
           – dm-appengine
           – appengine-apis




             9



Wednesday, November 25, 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




            10



Wednesday, November 25, 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



            11



Wednesday, November 25, 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



Wednesday, November 25, 2009
Users API
           • Existing User Account
           • Restrict your app to a domain


          map '/src' do
            use AppEngine::Rack::AdminRequired
            use AppEngine::Rack::SSLRequired
            run ActionController::Dispatcher.new
          end

          map '/' do
            run ActionController::Dispatcher.new
          end
            13



Wednesday, November 25, 2009
XMPP API




            14



Wednesday, November 25, 2009
Memcache API
           • No configuration required
           • Same API as Ruby-Memcache
           • Keys can be any Symbol or String
           • Can store any Marshalable or Serializable object


          cache = AppEngine::Memcache.new
          cache.set_many({:a => 1, :foo => 1..5})
          a, foo = cache.get(:a, :foo)




            15



Wednesday, November 25, 2009
URL Fetch API
           • Drop-in replacement for Net::HTTP


          AppEngine::URLFetch.fetch(url, options={})

          :method
          :payload
          :headers
          :allow_truncated
          :follow_redirects
          :deadline




            16



Wednesday, November 25, 2009
Small & Modular Frameworks
           • Rack
           • Sinatra
           • Merb/Rails3*
           • Duby




              * Currently unreleased

            17



Wednesday, November 25, 2009
DataMapper Finders
          # Comparisons you’d expect
          Zoo.first(:name => 'Galveston')

          # The 'gt/lt' means greater/less-than.
          Person.all(:age.gt => 30)
          Person.all(:age.lt => 40)

          # The 'gte/lte' means greather/less-than-or-equal-to.
          Person.all(:age.gte => 30)
          Person.all(:age.lte => 40)

          # The value of a pair is an Array
          Person.all(:name => 'Sam', :id => [ 1, 2, 3, 4, 5 ])
          Person.all(:name => [ 'bob', 'rick', 'steve' ])

          # Ordering
          Person.all(:order => [ :age.desc ])

            18



Wednesday, November 25, 2009
DataMapper Associations
           • has n, has 1
           • belongs_to, many_to_one

          class Post
          include DataMapper::Resource
            property :id, Serial
            property :message, Text
            has n, :comments
          end

          class Comment
            include DataMapper::Resource
            property :id, Serial
            property :message, Text
            belongs_to :post
          end

            19



Wednesday, November 25, 2009
Demo



Wednesday, November 25, 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/




            21



Wednesday, November 25, 2009
Wednesday, November 25, 2009

Mais conteúdo relacionado

Mais procurados

modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
 
We All Live in a Yellow (Serverless) Submarine
We All Live in a Yellow (Serverless) SubmarineWe All Live in a Yellow (Serverless) Submarine
We All Live in a Yellow (Serverless) SubmarineFITC
 
Optimizing training on Apache MXNet
Optimizing training on Apache MXNetOptimizing training on Apache MXNet
Optimizing training on Apache MXNetAmazon Web Services
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpOntico
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefMatt Ray
 
Advanced Scheduling with Amazon ECS (September 2017)
Advanced Scheduling with Amazon ECS (September 2017)Advanced Scheduling with Amazon ECS (September 2017)
Advanced Scheduling with Amazon ECS (September 2017)Julien SIMON
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleIsaac Christoffersen
 
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'rmcleay
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker, Inc.
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon Web Services
 
Introduction to ansible galaxy
Introduction to ansible galaxyIntroduction to ansible galaxy
Introduction to ansible galaxyIvan Serdyuk
 
Rackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerRackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerMarc Cluet
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!Jeff Geerling
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansiblefmaccioni
 
Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Richard Donkin
 
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleLocal Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleJeff Geerling
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation EasyPeter Sankauskas
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon Web Services
 

Mais procurados (20)

modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
We All Live in a Yellow (Serverless) Submarine
We All Live in a Yellow (Serverless) SubmarineWe All Live in a Yellow (Serverless) Submarine
We All Live in a Yellow (Serverless) Submarine
 
Optimizing training on Apache MXNet
Optimizing training on Apache MXNetOptimizing training on Apache MXNet
Optimizing training on Apache MXNet
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with Chef
 
Advanced Scheduling with Amazon ECS (September 2017)
Advanced Scheduling with Amazon ECS (September 2017)Advanced Scheduling with Amazon ECS (September 2017)
Advanced Scheduling with Amazon ECS (September 2017)
 
Deep Dive into AWS Fargate
Deep Dive into AWS FargateDeep Dive into AWS Fargate
Deep Dive into AWS Fargate
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
Carlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD ParisCarlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD Paris
 
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in Production
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
 
Introduction to ansible galaxy
Introduction to ansible galaxyIntroduction to ansible galaxy
Introduction to ansible galaxy
 
Rackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & PackerRackspace Hack Night - Vagrant & Packer
Rackspace Hack Night - Vagrant & Packer
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
 
Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)Go Faster with Ansible (PHP meetup)
Go Faster with Ansible (PHP meetup)
 
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleLocal Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation Easy
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
 

Semelhante a JRubyConf 2009

Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby ConferenceJohn Woodell
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009John Woodell
 
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 GaelykGuillaume Laforge
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsCameron Dutro
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Nilesh Panchal
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with ChefMatt Ray
 
Cloudfoundry Overview
Cloudfoundry OverviewCloudfoundry Overview
Cloudfoundry Overviewrajdeep
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemYi-Ting Cheng
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackMatt Ray
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Rails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineRails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineDavid Keener
 
Puppet getting started by Dirk Götz
Puppet getting started by Dirk GötzPuppet getting started by Dirk Götz
Puppet getting started by Dirk GötzNETWAYS
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 SummitMatt Ray
 
Gaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGuillaume Laforge
 
MongoDB Use Cases and Roadmap
MongoDB Use Cases and RoadmapMongoDB Use Cases and Roadmap
MongoDB Use Cases and RoadmapMongoDB
 

Semelhante a JRubyConf 2009 (20)

Rubypalooza 2009
Rubypalooza 2009Rubypalooza 2009
Rubypalooza 2009
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 
RubyConf 2009
RubyConf 2009RubyConf 2009
RubyConf 2009
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009
 
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
 
App Engine Meetup
App Engine MeetupApp Engine Meetup
App Engine Meetup
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails Apps
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with Chef
 
Cloudfoundry Overview
Cloudfoundry OverviewCloudfoundry Overview
Cloudfoundry Overview
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStack
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Rails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineRails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search Engine
 
Puppet getting started by Dirk Götz
Puppet getting started by Dirk GötzPuppet getting started by Dirk Götz
Puppet getting started by Dirk Götz
 
Logging & Docker - Season 2
Logging & Docker - Season 2Logging & Docker - Season 2
Logging & Docker - Season 2
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 Summit
 
Chef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdfChef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdf
 
Gaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume LaforgeGaelyk - JFokus 2011 - Guillaume Laforge
Gaelyk - JFokus 2011 - Guillaume Laforge
 
MongoDB Use Cases and Roadmap
MongoDB Use Cases and RoadmapMongoDB Use Cases and Roadmap
MongoDB Use Cases and Roadmap
 

Mais de John Woodell

Deploying and Maintaining an Enterprise OpenLDAP Directory
Deploying and Maintaining an Enterprise OpenLDAP DirectoryDeploying and Maintaining an Enterprise OpenLDAP Directory
Deploying and Maintaining an Enterprise OpenLDAP DirectoryJohn Woodell
 
Enterprise Mail and Calendaring with Open Software
Enterprise Mail and Calendaring with Open SoftwareEnterprise Mail and Calendaring with Open Software
Enterprise Mail and Calendaring with Open SoftwareJohn Woodell
 
Appengine ja-night-10
Appengine ja-night-10Appengine ja-night-10
Appengine ja-night-10John Woodell
 

Mais de John Woodell (7)

Deploying and Maintaining an Enterprise OpenLDAP Directory
Deploying and Maintaining an Enterprise OpenLDAP DirectoryDeploying and Maintaining an Enterprise OpenLDAP Directory
Deploying and Maintaining an Enterprise OpenLDAP Directory
 
Enterprise Mail and Calendaring with Open Software
Enterprise Mail and Calendaring with Open SoftwareEnterprise Mail and Calendaring with Open Software
Enterprise Mail and Calendaring with Open Software
 
Appengine ja-night-10
Appengine ja-night-10Appengine ja-night-10
Appengine ja-night-10
 
Rejectkaigi 2010
Rejectkaigi 2010Rejectkaigi 2010
Rejectkaigi 2010
 
Jrubykaigi 2010
Jrubykaigi 2010Jrubykaigi 2010
Jrubykaigi 2010
 
Oscon 2010
Oscon 2010Oscon 2010
Oscon 2010
 
Railsconf 2010
Railsconf 2010Railsconf 2010
Railsconf 2010
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

JRubyConf 2009

  • 2. JRuby on Google App Engine Extending the Java Platform & APIs John Woodell Nov 27, 2009 2 Wednesday, November 25, 2009
  • 3. 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 3 Wednesday, November 25, 2009
  • 4. WhiteHouse.gov/openforquestions 4 Wednesday, November 25, 2009
  • 5. Quotas and Billing Resource Provided Free Additional Cost CPU time 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 5 Wednesday, November 25, 2009
  • 6. JRuby on App Engine 6 Wednesday, November 25, 2009
  • 7. Current Issues with JRuby on App Engine • Several seconds to “spin-up” a new JRuby instance • Some gems still need their extensions ported to Java • Not officially supported , but you have all that you need + = ? 7 Wednesday, November 25, 2009
  • 8. $ sudo gem install google-appengine Successfully installed appengine-rack-0.0.4 Successfully installed appengine-jruby-jars-0.0.6 Successfully installed appengine-sdk-1.2.6 Successfully installed appengine-tools-0.0.6 Successfully installed google-appengine-0.0.6 5 gems installed Installing ri documentation for appengine-rack-0.0.4... Installing ri documentation for appengine-jruby-jars-0.0.6... Installing ri documentation for appengine-sdk-1.2.6... Installing ri documentation for appengine-tools-0.0.6... Installing ri documentation for google-appengine-0.0.6... Installing RDoc documentation for appengine-rack-0.0.4... Installing RDoc documentation for appengine-jruby-jars-0.0.6... Installing RDoc documentation for appengine-sdk-1.2.6... Installing RDoc documentation for appengine-tools-0.0.6... Installing RDoc documentation for google-appengine-0.0.6... 8 Wednesday, November 25, 2009
  • 9. App Engine Gems • Development Gems – appengine-rack – appengine-tools dev_appserver.rb & appcfg.rb – appengine-sdk – appengine-jruby-jars • Runtime Gems – appengine-rack – dm-appengine – appengine-apis 9 Wednesday, November 25, 2009
  • 10. 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 10 Wednesday, November 25, 2009
  • 11. 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 11 Wednesday, November 25, 2009
  • 12. 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 Wednesday, November 25, 2009
  • 13. Users API • Existing User Account • Restrict your app to a domain map '/src' do use AppEngine::Rack::AdminRequired use AppEngine::Rack::SSLRequired run ActionController::Dispatcher.new end map '/' do run ActionController::Dispatcher.new end 13 Wednesday, November 25, 2009
  • 14. XMPP API 14 Wednesday, November 25, 2009
  • 15. Memcache API • No configuration required • Same API as Ruby-Memcache • Keys can be any Symbol or String • Can store any Marshalable or Serializable object cache = AppEngine::Memcache.new cache.set_many({:a => 1, :foo => 1..5}) a, foo = cache.get(:a, :foo) 15 Wednesday, November 25, 2009
  • 16. URL Fetch API • Drop-in replacement for Net::HTTP AppEngine::URLFetch.fetch(url, options={}) :method :payload :headers :allow_truncated :follow_redirects :deadline 16 Wednesday, November 25, 2009
  • 17. Small & Modular Frameworks • Rack • Sinatra • Merb/Rails3* • Duby * Currently unreleased 17 Wednesday, November 25, 2009
  • 18. DataMapper Finders # Comparisons you’d expect Zoo.first(:name => 'Galveston') # The 'gt/lt' means greater/less-than. Person.all(:age.gt => 30) Person.all(:age.lt => 40) # The 'gte/lte' means greather/less-than-or-equal-to. Person.all(:age.gte => 30) Person.all(:age.lte => 40) # The value of a pair is an Array Person.all(:name => 'Sam', :id => [ 1, 2, 3, 4, 5 ]) Person.all(:name => [ 'bob', 'rick', 'steve' ]) # Ordering Person.all(:order => [ :age.desc ]) 18 Wednesday, November 25, 2009
  • 19. DataMapper Associations • has n, has 1 • belongs_to, many_to_one class Post include DataMapper::Resource property :id, Serial property :message, Text has n, :comments end class Comment include DataMapper::Resource property :id, Serial property :message, Text belongs_to :post end 19 Wednesday, November 25, 2009
  • 21. 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/ 21 Wednesday, November 25, 2009