11. Deployment
“What do you want our
infrastructure to look like
in 2 years?”
— Matthew
Thursday, January 26, 2012
12. “Warbler provides a minimal,
flexible, Ruby-like way to
bundle up all of your
application files for
deployment to a Java
environment.”
Thursday, January 26, 2012
13. “Trinidad allows you to run a
rails or rackup applications
within an embedded Apache
Tomcat container.”
Thursday, January 26, 2012
14. “Kirk is a wrapper around Jetty
that hides all of the insanity and
wraps your Rack application in
a loving embrace.”
Thursday, January 26, 2012
15. “Also, Kirk is probably the least
HTTP retarded ruby rack
server out there.”
Thursday, January 26, 2012
16. “Also, Kirk is probably the least
RECT rack
I OR
HTTP retarded ruby
NCout there.”
server
Thursday, January 26, 2012
17. “Mizuno is a set of Jetty-
powered running shoes for
JRuby/Rack.”
Thursday, January 26, 2012
18. None of these fit very well.
Thursday, January 26, 2012
19. “Jetpack uses standard ruby-
world tools to prepare the app
for deployment, and then
presents the ruby app to jetty
as a Java EE web application.”
Thursday, January 26, 2012
29. We learned through high
concurrency load testing that
Arel had a non-threadsafe design.
Thursday, January 26, 2012
30. can't add a new key into hash during iteration
/rails-77dcf76f142b/activesupport/lib/active_support/
dependencies.rb:528:in `[]='
https://github.com/rails/rails/issues/3817
Thursday, January 26, 2012
32. > rvm use jruby
> time ruby -e ''
ruby -e '' 1.07s user 0.28s
system 95% cpu 1.412 total
> rvm use 1.9.3
> time ruby -e ''
ruby -e '' 0.01s user 0.00s
system 63% cpu 0.027 total
Thursday, January 26, 2012
33. #!/bin/bash
# script/ci
source "$HOME/.rvm/scripts/rvm"
function install_ruby_if_needed() {
if ! rvm list rubies | grep $1 > /dev/null; then
rvm install $1
fi
}
function switch_ruby() {
install_ruby_if_needed $1 && rvm use $1
}
function prepare_and_run() {
switch_ruby $1 &&
install_bundler_if_needed &&
update_gems_if_needed &&
run_tests
}
prepare_and_run "1.9.3-p0" &&
prepare_and_run "jruby-1.6.5"
Thursday, January 26, 2012
34. # Gemfile
platforms :ruby do
gem 'mysql2'
end
platforms :jruby do
gem 'jdbc-mysql'
gem "jruby-openssl", "~> 0.7"
end
Thursday, January 26, 2012