SlideShare a Scribd company logo
JRuby on Rails Deployment:
What They Didn't Tell You

  Nick Sieger, Staff Engineer, Sun Microsystems, Inc.

  TS-6490
Agenda

 Rails deployment background
 Mechanics of JRuby on Rails
 Preparations
 Packaging
 Post-deployment




                               2008 JavaOneSM Conference | java.com.sun/javaone |   2
The Concurrency Question

Each Rails request must execute in isolation.


 “Rails is not thread-safe? WTF?”


       “Servlets have been multi-threaded since, like,1997!”




                                          2008 JavaOneSM Conference | java.com.sun/javaone |   3
Context for Concurrency

                      Writing thread-safe code is hard

 +   Ruby's userland threads don't yield much benefit

                                 Not worth the effort


 Rails scales up by adding processes



                                        2008 JavaOneSM Conference | java.com.sun/javaone |   4
CGI/FGCI




           http://flickr.com/photos/counteragent/2190576349/




                                                   2008 JavaOneSM Conference | java.com.sun/javaone |   5
Mongrel




          http://flickr.com/photos/bugbunnybambam/2172466178/
                                                     2008 JavaOneSM Conference | java.com.sun/javaone |   6
Mongrel Model




                2008 JavaOneSM Conference | java.com.sun/javaone |   7
=                                         * 180




http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster


                                                             2008 JavaOneSM Conference | java.com.sun/javaone |   8
Instead of multiple processes...




                                   2008 JavaOneSM Conference | java.com.sun/javaone |   9
The Java Virtual Machine (JVM™):
All Ur Rails Are Belong To Us




                                2008 JavaOneSM Conference | java.com.sun/javaone |   10
Application Startup




                      2008 JavaOneSM Conference | java.com.sun/javaone |   11
Dispatching to Rails




                       2008 JavaOneSM Conference | java.com.sun/javaone |   12
Developing Your Rails Application

 TS-4806: JRuby on Rails: Web Development Evolved
 TS-5249: The NetBeans™ Ruby IDE: You Thought Rails
 Development Was Fun Before
 Both yesterday




                                       2008 JavaOneSM Conference | java.com.sun/javaone |   13
Database Connectivity
   Install the ActiveRecord Java DataBase Connectivity (JDBCTM)
   adapter gem (mysql)
$ jruby -S gem install activerecord-jdbcmysql-adapter
Successfully installed activerecord-jdbc-adapter-0.8
Successfully installed jdbc-mysql-5.0.4
Successfully installed activerecord-jdbcmysql-adapter-0.8
3 gems installed
Installing ri documentation for activerecord-jdbc-adapter-0.8...
Installing ri documentation for jdbc-mysql-5.0.4...
Installing ri documentation for activerecord-jdbcmysql-adapter-
0.8...
Installing RDoc documentation for activerecord-jdbc-adapter-0.8...
Installing RDoc documentation for jdbc-mysql-5.0.4...
Installing RDoc documentation for activerecord-jdbcmysql-adapter-
0.8...




                                             2008 JavaOneSM Conference | java.com.sun/javaone |   14
Configure the Database

# config/database.yml
<% jdbc = defined?(JRUBY_VERSION) ? 'jdbc' : '' %>
development:
  adapter: <%= jdbc %>mysql
  encoding: utf8
  database: testapp_development
  username: root
  password:
  socket: /tmp/mysql.sock

# same for test/production...




                                 2008 JavaOneSM Conference | java.com.sun/javaone |   15
Examine dependencies

 Gems and libraries with native code == FAIL on JRuby
 Look for replacements/equivalents:
  • Mongrel, Hpricot OK
  • RMagick, ImageScience => ImageVoodoo
  • OpenSSL => JRuby-OpenSSL gem
  • Ruby/LDAP => JRuby/LDap
  • json => json_pure




                                         2008 JavaOneSM Conference | java.com.sun/javaone |   16
Try It!
$ jruby -S gem install mongrel
Successfully installed mongrel-1.1.3-java
1 gem installed
Installing ri documentation for mongrel-1.1.3-java...
Installing RDoc documentation for mongrel-1.1.3-java...
$ jruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).
** Rails signals registered. HUP => reload (without restart). It might not work
well.
** Mongrel 1.1.3 available at 0.0.0.0:3000
** Use CTRL-C to stop.




                                                    2008 JavaOneSM Conference | java.com.sun/javaone |   17
Application Layout (Rails)




                             2008 JavaOneSM Conference | java.com.sun/javaone |   18
Application Layout (WAR)




                           2008 JavaOneSM Conference | java.com.sun/javaone |   19
Using Warbler

 Installed as a gem (jruby -S gem install warbler)
 JRuby and servlet adapter bits included
 Automates war configuration




                                     2008 JavaOneSM Conference | java.com.sun/javaone |   20
Installing Warbler as a Plugin

$ jruby -S warble pluginize
/Users/nicksieger/Projects/jruby/trunk/jruby/bin/jruby -S gem unpack warbler
Unpacked gem: '/Users/nicksieger/Projects/rails/testapp/vendor/plugins/warbler-
0.9.5'
$ jruby -S rake -T | grep war
rake war                             # Create testapp.war
rake war:app                         # Copy all application files into the ...
rake war:clean                       # Clean up the .war file and the stagi...
rake war:gems                        # Unpack all gems into WEB-INF/gems
rake war:jar                         # Run the jar command to create the .war
rake war:java_classes                # Copy java classes into the .war
rake war:java_libs                   # Copy all java libraries into the .war
rake war:public                      # Copy all public HTML files to the ro...
rake war:webxml                      # Generate a web.xml file for the webapp




                                                      2008 JavaOneSM Conference | java.com.sun/javaone |   21
Configuring Warbler

 Generate config file
  • jruby -S warble config -or-
  • jruby script/generate warble
  • => config/warble.rb
 # Warbler web application assembly configuration file
 Warbler::Config.new do |config|
   # ...

   # Gems to be packaged in the webapp. ...
   config.gems += [quot;activerecord-jdbcmysql-adapterquot;,
     quot;jruby-opensslquot;]
   config.gems[quot;railsquot;] = quot;2.0.2quot;

   # ...
 end


                                          2008 JavaOneSM Conference | java.com.sun/javaone |   22
Runtime Pool Size

 config/warble.rb:


  Warbler::Config.new do |config|
    # ...

    # Control the pool of Rails runtimes
    config.webxml.jruby.min.runtimes = 2
    config.webxml.jruby.max.runtimes = 4
  end




                                2008 JavaOneSM Conference | java.com.sun/javaone |   23
Logging
if defined?(JRUBY_VERSION) && defined?($servlet_context)
  # Logger expects an object that responds to #write and #close
  device = Object.new
  def device.write(message)
    $servlet_context.log(message)
  end
  def device.close; end

  # Make these accessible to wire in the log device
  class << RAILS_DEFAULT_LOGGER
    public :instance_variable_get, :instance_variable_set
  end

  old_device = RAILS_DEFAULT_LOGGER.instance_variable_get quot;@logquot;
  old_device.close rescue nil
  RAILS_DEFAULT_LOGGER.instance_variable_set quot;@logquot;, device
end




                                              2008 JavaOneSM Conference | java.com.sun/javaone |   24
Session handling

   Rails sessions != Servlet sessions
config.action_controller.session_store = :java_servlet_store

# ...

class   CGI::Session::JavaServletStore
  def   initialize(session, options) end
  def   restore; end
  def   update; end
  def   close; end
end




                                           2008 JavaOneSM Conference | java.com.sun/javaone |   25
Database: JNDI

 production:
   adapter: <%= jdbc %>mysql
   jndi: jdbc/testapp_production
   encoding: utf8
   database: testapp_production
   username: root
   password:
   socket: /tmp/mysql.sock




                                   2008 JavaOneSM Conference | java.com.sun/javaone |   26
Database connections

 Use JNDI DataSource with a connection pool
 But Rails doesn't close connections by default (!)

 # config/initializers/close_connections.rb
 if defined?($servlet_context)
   require 'action_controller/dispatcher'
   ActionController::Dispatcher.after_dispatch do
     ActiveRecord::Base.clear_active_connections!
   end
 end




                                          2008 JavaOneSM Conference | java.com.sun/javaone |   27
Caching and File stat'ing

  Ensure view caching is enabled (default in Rails 2.0.2)
  • config.action_view.cache_template_loading = true
  Avoid asset ID timestamp checks with RAILS_ASSET_ID
   • ENV['RAILS_ASSET_ID'] = “r#{source_revision}”
  Ensure full-page cache directory points to root of WAR
   • config.action_controller.page_cache_directory
   • Rails.public_path coming in 2.1




                                           2008 JavaOneSM Conference | java.com.sun/javaone |   28
Performance...




                 2008 JavaOneSM Conference | java.com.sun/javaone |   29
...is a developing story.




                      2008 JavaOneSM Conference | java.com.sun/javaone |   30
2008 JavaOneSM Conference | java.com.sun/javaone |   31
Precompiling Rails

 Compile Ruby code to bytecode before execution
 System property: -Djruby.compile.mode=FORCE
 Leverage existing tools for profiling, troubleshooting


class ErrorsController < ApplicationController
  def index
    java.lang.Thread.dumpStack
  end
end




                                          2008 JavaOneSM Conference | java.com.sun/javaone |   32
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1176)
at
ruby...testapp.app.controllers.errors_controller.index__1
   (.../app/controllers/errors_controller.rb:3)
at ruby...action_controller.base.perform_action__66
   (.../gems/1.8/gems/actionpack-
2.0.2/lib/action_controller/base.rb:1158)
   ...
at ruby...action_controller.base.process__25
   (.../gems/1.8/gems/actionpack-
2.0.2/lib/action_controller/base.rb:388)
at ruby...action_controller.dispatcher.handle_request__18
   (.../gems/1.8/gems/actionpack-
2.0.2/lib/action_controller/dispatcher.rb:171)
at ruby...action_controller.dispatcher.__rescue_5
   (.../gems/1.8/gems/actionpack-
2.0.2/lib/action_controller/dispatcher.rb:115)



                                        2008 JavaOneSM Conference | java.com.sun/javaone |   33
Introducing JRuby-Rack

 http://wiki.jruby.org/wiki/JRuby_Rack
 0.9 -- First public release today!
 Also released – Warbler 0.9.9 – bundles jruby-rack 0.9




                                          2008 JavaOneSM Conference | java.com.sun/javaone |   34
Introducing JRuby-Rack

 Adapter from servlets to Rack
  • Rack == Ruby web server abstraction layer
  • http://rack.rubyforge.org/
 Eliminate manual setup
 Runs Rails, Merb, any Rack-compatible framework
 Seamless integration with non-Rails servlet components




                                        2008 JavaOneSM Conference | java.com.sun/javaone |   35

More Related Content

What's hot

Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
Robert Scholte
 
Devoxx17 - Préparez-vous à la modularité selon Java 9
Devoxx17 - Préparez-vous à la modularité selon Java 9Devoxx17 - Préparez-vous à la modularité selon Java 9
Devoxx17 - Préparez-vous à la modularité selon Java 9
Alexis Hassler
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
Ryan Cuprak
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
David Gómez García
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
VMware Tanzu
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
Ryan Cuprak
 
EWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWD
Rob Tweed
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)
Robert Scholte
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
Robert Scholte
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9
Pavel Bucek
 
Java EE 6
Java EE 6Java EE 6
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
Alexis Moussine-Pouchkine
 
Web Space10 Overview
Web Space10 OverviewWeb Space10 Overview
Web Space10 Overview
Alexis Moussine-Pouchkine
 
Java 7 Preview
Java 7 PreviewJava 7 Preview
Java 7 Preview
Alex Miller
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneider
mfrancis
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
Daniel Bryant
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
DonghuKIM2
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
Petr Jiricka
 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
Sander Mak (@Sander_Mak)
 
GlassFish v3 : En Route Java EE 6
GlassFish v3 : En Route Java EE 6GlassFish v3 : En Route Java EE 6
GlassFish v3 : En Route Java EE 6
Alexis Moussine-Pouchkine
 

What's hot (20)

Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
 
Devoxx17 - Préparez-vous à la modularité selon Java 9
Devoxx17 - Préparez-vous à la modularité selon Java 9Devoxx17 - Préparez-vous à la modularité selon Java 9
Devoxx17 - Préparez-vous à la modularité selon Java 9
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
EWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWD
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9
 
Java EE 6
Java EE 6Java EE 6
Java EE 6
 
MySQL Aquarium Paris
MySQL Aquarium ParisMySQL Aquarium Paris
MySQL Aquarium Paris
 
Web Space10 Overview
Web Space10 OverviewWeb Space10 Overview
Web Space10 Overview
 
Java 7 Preview
Java 7 PreviewJava 7 Preview
Java 7 Preview
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneider
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
 
GlassFish v3 : En Route Java EE 6
GlassFish v3 : En Route Java EE 6GlassFish v3 : En Route Java EE 6
GlassFish v3 : En Route Java EE 6
 

Viewers also liked

Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
Sujit Majety
 
Ch15
Ch15Ch15
06 regression
06 regression06 regression
06 regression
Mohammad Tawfik
 
12 formas básicas de enseñar
12 formas básicas de enseñar12 formas básicas de enseñar
12 formas básicas de enseñar
Patty LóMar
 
Transfer Printable fabrics Silhouette Cameo 2
Transfer Printable fabrics Silhouette Cameo 2Transfer Printable fabrics Silhouette Cameo 2
Transfer Printable fabrics Silhouette Cameo 2
Silhouette Cameo 2 Europe
 
งานโลหะแผ่น5 3
งานโลหะแผ่น5 3งานโลหะแผ่น5 3
งานโลหะแผ่น5 3Pannathat Champakul
 
04.การกระจายเชื้อเพลิงในต่างประเทศ
04.การกระจายเชื้อเพลิงในต่างประเทศ04.การกระจายเชื้อเพลิงในต่างประเทศ
04.การกระจายเชื้อเพลิงในต่างประเทศKobwit Piriyawat
 
Metodos
MetodosMetodos
Metodos
PAULO Moreira
 
Valtek MK1 Rebuild
Valtek MK1 RebuildValtek MK1 Rebuild
Valtek MK1 Rebuild
Patrick Gladd
 
Grafica grupal
Grafica grupalGrafica grupal
Grafica grupal
Dara Yamile Luna
 
Kelas tahun 5 rajin 2014 for merge
Kelas tahun 5 rajin  2014   for mergeKelas tahun 5 rajin  2014   for merge
Kelas tahun 5 rajin 2014 for merge
Siti Norwati
 
หลักสูตร Sqs ผจก
หลักสูตร Sqs ผจกหลักสูตร Sqs ผจก
หลักสูตร Sqs ผจกNutthawuth Kanasup
 
Objective runtime
Objective runtimeObjective runtime
Objective runtime
Michael Shieh
 
Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...
Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...
Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...
DevOpsDays Tel Aviv
 
DevOps Boston - Heartbleed at Acquia
DevOps Boston - Heartbleed at AcquiaDevOps Boston - Heartbleed at Acquia
DevOps Boston - Heartbleed at Acquia
Marc Seeger
 
Etl tool
Etl toolEtl tool
Etl tool
Jinal Shah
 
How Amazon Echo can be helpful for the healthcare industry
How Amazon Echo can be helpful for the healthcare industryHow Amazon Echo can be helpful for the healthcare industry
How Amazon Echo can be helpful for the healthcare industry
Softweb Solutions
 
Evangelio Ilutsrado, 4º Domingo de Pascua
Evangelio Ilutsrado, 4º Domingo de PascuaEvangelio Ilutsrado, 4º Domingo de Pascua
Evangelio Ilutsrado, 4º Domingo de Pascua
cristinamoreubi
 

Viewers also liked (20)

Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
Ch15
Ch15Ch15
Ch15
 
06 regression
06 regression06 regression
06 regression
 
12 formas básicas de enseñar
12 formas básicas de enseñar12 formas básicas de enseñar
12 formas básicas de enseñar
 
Transfer Printable fabrics Silhouette Cameo 2
Transfer Printable fabrics Silhouette Cameo 2Transfer Printable fabrics Silhouette Cameo 2
Transfer Printable fabrics Silhouette Cameo 2
 
งานโลหะแผ่น5 3
งานโลหะแผ่น5 3งานโลหะแผ่น5 3
งานโลหะแผ่น5 3
 
04.การกระจายเชื้อเพลิงในต่างประเทศ
04.การกระจายเชื้อเพลิงในต่างประเทศ04.การกระจายเชื้อเพลิงในต่างประเทศ
04.การกระจายเชื้อเพลิงในต่างประเทศ
 
Metodos
MetodosMetodos
Metodos
 
Sensoplan
SensoplanSensoplan
Sensoplan
 
Valtek MK1 Rebuild
Valtek MK1 RebuildValtek MK1 Rebuild
Valtek MK1 Rebuild
 
Grafica grupal
Grafica grupalGrafica grupal
Grafica grupal
 
Kelas tahun 5 rajin 2014 for merge
Kelas tahun 5 rajin  2014   for mergeKelas tahun 5 rajin  2014   for merge
Kelas tahun 5 rajin 2014 for merge
 
หลักสูตร Sqs ผจก
หลักสูตร Sqs ผจกหลักสูตร Sqs ผจก
หลักสูตร Sqs ผจก
 
Plastic1
Plastic1Plastic1
Plastic1
 
Objective runtime
Objective runtimeObjective runtime
Objective runtime
 
Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...
Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...
Who Watches the Watchmen - Arup Chakrabarti, PagerDuty - DevOpsDays Tel Aviv ...
 
DevOps Boston - Heartbleed at Acquia
DevOps Boston - Heartbleed at AcquiaDevOps Boston - Heartbleed at Acquia
DevOps Boston - Heartbleed at Acquia
 
Etl tool
Etl toolEtl tool
Etl tool
 
How Amazon Echo can be helpful for the healthcare industry
How Amazon Echo can be helpful for the healthcare industryHow Amazon Echo can be helpful for the healthcare industry
How Amazon Echo can be helpful for the healthcare industry
 
Evangelio Ilutsrado, 4º Domingo de Pascua
Evangelio Ilutsrado, 4º Domingo de PascuaEvangelio Ilutsrado, 4º Domingo de Pascua
Evangelio Ilutsrado, 4º Domingo de Pascua
 

Similar to JRuby on Rails Deployment: What They Didn't Tell You

Boldly go where the Java programming language has never gone before
Boldly go where the Java programming language has never gone beforeBoldly go where the Java programming language has never gone before
Boldly go where the Java programming language has never gone before
elliando dias
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
Arun Gupta
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Arun Gupta
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
mirrec
 
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusD. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
Uni Systems S.M.S.A.
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
Rohit Kelapure
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Arun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Arun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
Arun Gupta
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
David Delabassee
 
It pro dev_birbilis_20101127_en
It pro dev_birbilis_20101127_enIt pro dev_birbilis_20101127_en
It pro dev_birbilis_20101127_en
George Birbilis
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
Arun Gupta
 
JRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the CloudJRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the Cloud
Hiro Asari
 
Jruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaJruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-java
Keith Bennett
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
gicappa
 
blueMarine Or Why You Should Really Ship Swing Applications
blueMarine  Or Why You Should Really Ship Swing  Applications blueMarine  Or Why You Should Really Ship Swing  Applications
blueMarine Or Why You Should Really Ship Swing Applications
Fabrizio Giudici
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11
DaliaAboSheasha
 
Практики применения JRuby
Практики применения JRubyПрактики применения JRuby
Практики применения JRuby
.toster
 
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
London Microservices
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Arun Gupta
 

Similar to JRuby on Rails Deployment: What They Didn't Tell You (20)

Boldly go where the Java programming language has never gone before
Boldly go where the Java programming language has never gone beforeBoldly go where the Java programming language has never gone before
Boldly go where the Java programming language has never gone before
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of QuarkusD. Andreadis, Red Hat: Concepts and technical overview of Quarkus
D. Andreadis, Red Hat: Concepts and technical overview of Quarkus
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
It pro dev_birbilis_20101127_en
It pro dev_birbilis_20101127_enIt pro dev_birbilis_20101127_en
It pro dev_birbilis_20101127_en
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
JRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the CloudJRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the Cloud
 
Jruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-javaJruby synergy-of-ruby-and-java
Jruby synergy-of-ruby-and-java
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
 
blueMarine Or Why You Should Really Ship Swing Applications
blueMarine  Or Why You Should Really Ship Swing  Applications blueMarine  Or Why You Should Really Ship Swing  Applications
blueMarine Or Why You Should Really Ship Swing Applications
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11
 
Практики применения JRuby
Практики применения JRubyПрактики применения JRuby
Практики применения JRuby
 
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
 

More from elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
elliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
elliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
elliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
elliando dias
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
elliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
elliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
elliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
elliando dias
 
Ragel talk
Ragel talkRagel talk
Ragel talk
elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
elliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
elliando dias
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
elliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
elliando dias
 
Rango
RangoRango
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
elliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
elliando dias
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
elliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
elliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
elliando dias
 

More from elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Recently uploaded

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 

JRuby on Rails Deployment: What They Didn't Tell You

  • 1. JRuby on Rails Deployment: What They Didn't Tell You Nick Sieger, Staff Engineer, Sun Microsystems, Inc. TS-6490
  • 2. Agenda Rails deployment background Mechanics of JRuby on Rails Preparations Packaging Post-deployment 2008 JavaOneSM Conference | java.com.sun/javaone | 2
  • 3. The Concurrency Question Each Rails request must execute in isolation. “Rails is not thread-safe? WTF?” “Servlets have been multi-threaded since, like,1997!” 2008 JavaOneSM Conference | java.com.sun/javaone | 3
  • 4. Context for Concurrency Writing thread-safe code is hard + Ruby's userland threads don't yield much benefit Not worth the effort Rails scales up by adding processes 2008 JavaOneSM Conference | java.com.sun/javaone | 4
  • 5. CGI/FGCI http://flickr.com/photos/counteragent/2190576349/ 2008 JavaOneSM Conference | java.com.sun/javaone | 5
  • 6. Mongrel http://flickr.com/photos/bugbunnybambam/2172466178/ 2008 JavaOneSM Conference | java.com.sun/javaone | 6
  • 7. Mongrel Model 2008 JavaOneSM Conference | java.com.sun/javaone | 7
  • 8. = * 180 http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster 2008 JavaOneSM Conference | java.com.sun/javaone | 8
  • 9. Instead of multiple processes... 2008 JavaOneSM Conference | java.com.sun/javaone | 9
  • 10. The Java Virtual Machine (JVM™): All Ur Rails Are Belong To Us 2008 JavaOneSM Conference | java.com.sun/javaone | 10
  • 11. Application Startup 2008 JavaOneSM Conference | java.com.sun/javaone | 11
  • 12. Dispatching to Rails 2008 JavaOneSM Conference | java.com.sun/javaone | 12
  • 13. Developing Your Rails Application TS-4806: JRuby on Rails: Web Development Evolved TS-5249: The NetBeans™ Ruby IDE: You Thought Rails Development Was Fun Before Both yesterday 2008 JavaOneSM Conference | java.com.sun/javaone | 13
  • 14. Database Connectivity Install the ActiveRecord Java DataBase Connectivity (JDBCTM) adapter gem (mysql) $ jruby -S gem install activerecord-jdbcmysql-adapter Successfully installed activerecord-jdbc-adapter-0.8 Successfully installed jdbc-mysql-5.0.4 Successfully installed activerecord-jdbcmysql-adapter-0.8 3 gems installed Installing ri documentation for activerecord-jdbc-adapter-0.8... Installing ri documentation for jdbc-mysql-5.0.4... Installing ri documentation for activerecord-jdbcmysql-adapter- 0.8... Installing RDoc documentation for activerecord-jdbc-adapter-0.8... Installing RDoc documentation for jdbc-mysql-5.0.4... Installing RDoc documentation for activerecord-jdbcmysql-adapter- 0.8... 2008 JavaOneSM Conference | java.com.sun/javaone | 14
  • 15. Configure the Database # config/database.yml <% jdbc = defined?(JRUBY_VERSION) ? 'jdbc' : '' %> development: adapter: <%= jdbc %>mysql encoding: utf8 database: testapp_development username: root password: socket: /tmp/mysql.sock # same for test/production... 2008 JavaOneSM Conference | java.com.sun/javaone | 15
  • 16. Examine dependencies Gems and libraries with native code == FAIL on JRuby Look for replacements/equivalents: • Mongrel, Hpricot OK • RMagick, ImageScience => ImageVoodoo • OpenSSL => JRuby-OpenSSL gem • Ruby/LDAP => JRuby/LDap • json => json_pure 2008 JavaOneSM Conference | java.com.sun/javaone | 16
  • 17. Try It! $ jruby -S gem install mongrel Successfully installed mongrel-1.1.3-java 1 gem installed Installing ri documentation for mongrel-1.1.3-java... Installing RDoc documentation for mongrel-1.1.3-java... $ jruby script/server => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel 1.1.3 available at 0.0.0.0:3000 ** Use CTRL-C to stop. 2008 JavaOneSM Conference | java.com.sun/javaone | 17
  • 18. Application Layout (Rails) 2008 JavaOneSM Conference | java.com.sun/javaone | 18
  • 19. Application Layout (WAR) 2008 JavaOneSM Conference | java.com.sun/javaone | 19
  • 20. Using Warbler Installed as a gem (jruby -S gem install warbler) JRuby and servlet adapter bits included Automates war configuration 2008 JavaOneSM Conference | java.com.sun/javaone | 20
  • 21. Installing Warbler as a Plugin $ jruby -S warble pluginize /Users/nicksieger/Projects/jruby/trunk/jruby/bin/jruby -S gem unpack warbler Unpacked gem: '/Users/nicksieger/Projects/rails/testapp/vendor/plugins/warbler- 0.9.5' $ jruby -S rake -T | grep war rake war # Create testapp.war rake war:app # Copy all application files into the ... rake war:clean # Clean up the .war file and the stagi... rake war:gems # Unpack all gems into WEB-INF/gems rake war:jar # Run the jar command to create the .war rake war:java_classes # Copy java classes into the .war rake war:java_libs # Copy all java libraries into the .war rake war:public # Copy all public HTML files to the ro... rake war:webxml # Generate a web.xml file for the webapp 2008 JavaOneSM Conference | java.com.sun/javaone | 21
  • 22. Configuring Warbler Generate config file • jruby -S warble config -or- • jruby script/generate warble • => config/warble.rb # Warbler web application assembly configuration file Warbler::Config.new do |config| # ... # Gems to be packaged in the webapp. ... config.gems += [quot;activerecord-jdbcmysql-adapterquot;, quot;jruby-opensslquot;] config.gems[quot;railsquot;] = quot;2.0.2quot; # ... end 2008 JavaOneSM Conference | java.com.sun/javaone | 22
  • 23. Runtime Pool Size config/warble.rb: Warbler::Config.new do |config| # ... # Control the pool of Rails runtimes config.webxml.jruby.min.runtimes = 2 config.webxml.jruby.max.runtimes = 4 end 2008 JavaOneSM Conference | java.com.sun/javaone | 23
  • 24. Logging if defined?(JRUBY_VERSION) && defined?($servlet_context) # Logger expects an object that responds to #write and #close device = Object.new def device.write(message) $servlet_context.log(message) end def device.close; end # Make these accessible to wire in the log device class << RAILS_DEFAULT_LOGGER public :instance_variable_get, :instance_variable_set end old_device = RAILS_DEFAULT_LOGGER.instance_variable_get quot;@logquot; old_device.close rescue nil RAILS_DEFAULT_LOGGER.instance_variable_set quot;@logquot;, device end 2008 JavaOneSM Conference | java.com.sun/javaone | 24
  • 25. Session handling Rails sessions != Servlet sessions config.action_controller.session_store = :java_servlet_store # ... class CGI::Session::JavaServletStore def initialize(session, options) end def restore; end def update; end def close; end end 2008 JavaOneSM Conference | java.com.sun/javaone | 25
  • 26. Database: JNDI production: adapter: <%= jdbc %>mysql jndi: jdbc/testapp_production encoding: utf8 database: testapp_production username: root password: socket: /tmp/mysql.sock 2008 JavaOneSM Conference | java.com.sun/javaone | 26
  • 27. Database connections Use JNDI DataSource with a connection pool But Rails doesn't close connections by default (!) # config/initializers/close_connections.rb if defined?($servlet_context) require 'action_controller/dispatcher' ActionController::Dispatcher.after_dispatch do ActiveRecord::Base.clear_active_connections! end end 2008 JavaOneSM Conference | java.com.sun/javaone | 27
  • 28. Caching and File stat'ing Ensure view caching is enabled (default in Rails 2.0.2) • config.action_view.cache_template_loading = true Avoid asset ID timestamp checks with RAILS_ASSET_ID • ENV['RAILS_ASSET_ID'] = “r#{source_revision}” Ensure full-page cache directory points to root of WAR • config.action_controller.page_cache_directory • Rails.public_path coming in 2.1 2008 JavaOneSM Conference | java.com.sun/javaone | 28
  • 29. Performance... 2008 JavaOneSM Conference | java.com.sun/javaone | 29
  • 30. ...is a developing story. 2008 JavaOneSM Conference | java.com.sun/javaone | 30
  • 31. 2008 JavaOneSM Conference | java.com.sun/javaone | 31
  • 32. Precompiling Rails Compile Ruby code to bytecode before execution System property: -Djruby.compile.mode=FORCE Leverage existing tools for profiling, troubleshooting class ErrorsController < ApplicationController def index java.lang.Thread.dumpStack end end 2008 JavaOneSM Conference | java.com.sun/javaone | 32
  • 33. java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1176) at ruby...testapp.app.controllers.errors_controller.index__1 (.../app/controllers/errors_controller.rb:3) at ruby...action_controller.base.perform_action__66 (.../gems/1.8/gems/actionpack- 2.0.2/lib/action_controller/base.rb:1158) ... at ruby...action_controller.base.process__25 (.../gems/1.8/gems/actionpack- 2.0.2/lib/action_controller/base.rb:388) at ruby...action_controller.dispatcher.handle_request__18 (.../gems/1.8/gems/actionpack- 2.0.2/lib/action_controller/dispatcher.rb:171) at ruby...action_controller.dispatcher.__rescue_5 (.../gems/1.8/gems/actionpack- 2.0.2/lib/action_controller/dispatcher.rb:115) 2008 JavaOneSM Conference | java.com.sun/javaone | 33
  • 34. Introducing JRuby-Rack http://wiki.jruby.org/wiki/JRuby_Rack 0.9 -- First public release today! Also released – Warbler 0.9.9 – bundles jruby-rack 0.9 2008 JavaOneSM Conference | java.com.sun/javaone | 34
  • 35. Introducing JRuby-Rack Adapter from servlets to Rack • Rack == Ruby web server abstraction layer • http://rack.rubyforge.org/ Eliminate manual setup Runs Rails, Merb, any Rack-compatible framework Seamless integration with non-Rails servlet components 2008 JavaOneSM Conference | java.com.sun/javaone | 35