Monday Sep 22, 2008

LOTD #9: Slides for Deploying and Monitoring Ruby on Rails Tutorial @ Rails Conf Europe 2008


During Rails Conf Europe 2008 Day 1 I attended an excellent tutorial on Deploying and Monitoring Ruby on Rails. The session very clearly explained the several deployment options with Rails. My notes from the session are here and the slides are now available

Here are couple of snapshots from the slide:





The complete set of slides from Rails Conf Europe 2008 are available here.

Technorati: conf railsconf glassfish deployment rubyonrails berlin

Friday Sep 05, 2008

Rails Conf Europe 2008 - Day 3


Last day of Rails Conf Europe 2008 (Day 1 & Day 2), and it's finally over!

David Black's opening session talked about Ruby and Rails Symposium: Versions, Implementations, and the Future. Here is a brief summary of MRI Ruby versions:
  • Ruby 1.8.6
    • Bread and butter for many of us
  • 1.8.7
    • 1.8 with lots of backported 1.9 features
    • Help with migration to 1.9
    • Not gaining traction, is it ?
  • 1.9.0
    • First release of 1.9
    • Not particularly feature stable
    • Not in wide production use.
  • 1.9.1
    • Feature freeze 9/25
    • Release Christmas 2008 (planned)
    • Expected to be more stable
The talk showed some of the new features coming up in Ruby 1.9.x. An informal survey of audience indicated the following numbers:
  • 4 - How many are using 1.8.7 ?
  • 98% - How many are using 1.8.6 ?
  • 1 - How many are using 1.9.0 ?
  • 4 - Tried 1.8.7 and not switching
  • 3 - Tried 1.9 and not switching
  • 85% - Never tried 1.9
JRuby is an alternative implementation of Ruby that runs on Java VM.  And when prompted, I quoted all the JRuby numbers (75% memory improvement with upcoming Rails 2.2, 33,000 assertions from Ruby Spec and 22,000 tests for Ruby 1.8.6 compliance, Ongoing work on Ruby 1.9 compliance). JRuby "It's just Ruby" - knowing Java is not a pre-requisite to run JRuby for your Ruby or Rails applications!

In Developing Ruby and Rails applications with the NetBeans IDE talk, Erno & Petr showed all the cool features of Ruby/Rails editing, syntax highlighting, debugging, project creation, refactoring and many more. You can find all about it here.

Rails powered by GlassFish talk was well attended. The slides are available here and if you attended the session, please rate it here. I value your feedback. Some of the excerpts from the talk are:
Let us know by sending an email to webtier@glassfish.dev.java.net if you are using JRuby or GlassFish or JRuby and GlassFish in production. We'll be happy to feature you on blogs.sun.com/stories.

Rails 2.0.4 and 2.1.1 were released during the conference. Now I need to start working on all the different blogs promised earlier this week :)

Here are some pictures from Day 3:






And finally the complete photo album:




Next stop - Braaaazzzil!

Technorati: conf railsconf berlin rubyonrails

Thursday Sep 04, 2008

Rails Conf Europe 2008 - Day 2


Rails Conf Europe 2008 Day 1 was mostly about tutorials.

On Day 2, David Black gave the opening session. After some logistics he introduced the favorite son of Chicago - David Heinemeier Hansson. The theme of DHH's session was "Legacy Software". Now that Rails is 5 years old, the discussions of legacy is indeed meaningful. He showed some code from BaseCamp and showed how refactoring can deal with legacy. I love his statement "What you write today will become legacy". That is indeed so true especially given the fact that Rails community is now thinking about legacy. There is Rails 1.2.x, 2.0.x, 2.1 and 2.2 coming up - it was bound to happen. Overall a great session and love the honesty!

In JRuby: The Other Red Meat by Tom Enebo, the highlights were:
  • JRuby is "It's just Ruby". No prior knowledge of Java is required, at all, to run JRuby.
  • 22,000 tests and 33,000 assertions (from Ruby Spec) all pass to ensure 1.8.6 compliance.
  • 75% memory improvement with upcoming Rails 2.2. The numbers captured from the preso for 1000 requests and 10 concurrent users are:

    10 Rails instances Edge Rails
    Startup Memory 200 Mb 50 Mb
    Heap (at end) 233 Mb 55 Mb

    I'll explain in a detailed post later on how to generate these numbers
  • Several JRuby success stories
  • FFI support in JRuby that will make converting a C-based plugin to pure-Ruby a breeze
In Rails Software Metrics Roderick talked about different tools to generate metrics for Rails applications.
  • rake stats: Provides Code to Test Ratio (0.8 to 1.6 is a good range)
  • flog: Tracking code complexity (available as gem, useful for refactoring, elaborates on complexity)
  • rcov: Tracking test coverage (analyzes line coverage, available as gem)
  • heckle: Analyzes branch coverage (available as gem, dynamically mutates your code - flipping a branch should cause test failire, takes very long, not feasible for TDD)
  • saikuro: Cyclometic complexity (Decidedly scientific graph theory, available as gem, highlights overly complex methods, useful to spot refactoring methods)
  • metrics_fu: Set of Rake tasks to use with CruiseControl, Runs all of the before mentioned on a check-in. Anybody interested in integrating that with Hudson ?
The advise "A single metric is seldom useful, pair them to see what's going on." is certainly very practical.

Fernando explained in details in his session, Achieving High Throughput and Scalability with JRuby on Rails, on how to tune GlassFish for Rails applications. Look for his slides, they got real meat from a Rails application running on production with multiple concurrent requests.

At Five Runs exhibit, I found about FiveRuns monitoring on JRuby. That means you can generate all the performance monitoring data on GlassFish. And then there is nagios and stickshift for monitoring. That's a few blog posts for me later :)

Here are some of the sessions I plan to attend Day 2:

Here are some pictures from Day 2:






And you can see the gourmet lunch was not only beautifully decorated, it was equally luscious:



And finally the complete photo album so far:




Stay tuned for Day 3 blog!

Technorati: conf railsconf berlin rubyonrails

Wednesday Sep 03, 2008

Running by Spree in Berlin


Had a great 45 minutes run by Spree Westward in downtown Berlin. Thanks Thomas for the recommendation!



It's very clean with underpasses for most of the streets. And even the 2 streets I had to cross were narrow with little traffic @ 7am :)

Technorati: conf railsconf running spree berlin

Tuesday Sep 02, 2008

Rails Conf Europe 2008 - End of Tutorial Day


Sep 2, 2008 was the Tutorials Day @ Rails Conf Europe. I attended Renegade's Guide to Hacking Rails Internals (partly) and Deploying and Monitoring Ruby on Rails. The first session did exactly what it says - explained the complete internals, digging deep into the code and how to hack them to meet your needs. I thoroughly enjoyed the second tutorial as it covered the deployment in detail and somewhat monitoring.

The first part covered the common Application Server and Web/Proxy Servers used for Rails deployment. It explained the different deployment scenarios and their pros/cons. The Application Servers (along with their detailed notes) are:
  • FastCGI
    • Use mod_fcgi
    • Proxy local and remove FastCGI instances
    • Oldest way of deploying Rails
    • Deprecated & Unstable (security problems in impl of Apache2, easy to get zombie processes, works for some)
    • Hard to debug
    • Dont' use in production
  • Mongrel
    • As an alternative to FastCGI
    • Complete HTTP-server that can load arbitrary Ruby-servlets
    • Built-in Rails support
    • Utility to manage several Mongrel clusters (mongrel_cluster)
    • Very robust, strict HTTP parser, easy to debug
    • Defacto standard deployment with Apache 2.2 and mod_proxy_balancer
    • Can be a bit difficult to setup
    • Not so easy on mass/virtual hosting
  • mod_rails (aka Phusion Passenger)
    • Similar to mod_php
    • Fairly new module of Apache 2.2
    • Allows Apache to control Rails instances
    • Apache starts/stop app instance depending on the app load
    • Very easy to setup
    • Able to run any RACK-compatible Ruby app
    • Pros
      • Touching a file "restart.txt" and Phusion automatically restarts all the Rails instances
      • All Rails instances are local to a machine
      • HTTP balancer is required to spawn across multiple machines
      • Fairly new but ready for production
      • Makes setup easier - on single machine
      • Multiple server still require load balancer
      • Suitable for mass hosting
  • JRuby, GlassFish & Co
    • Similar to mod_rails where multiple runtimes can run on a single machine
    • WAR-based deployments
    • Suitable for Java shops
    • Database connection pooling
I'll be talking all about Rails and GlassFish in my session tomorrow @ 1:40pm
Here are the requirements on Proxy servers:
  • Hide cluster backend from the user
  • Load-balancer backend instances
  • Recognize down hosts
  • Fair scheduler
And the different choices (along with their notes) are:
  • Apache2
    • Introduced mod_proxy_balancer
    • Can speak to multiple backends and balance requests
    • Can act as pure proxy or can also serve static files
    • Deliver static content
    • Pros
      • Very old, mature, stable
      • Many people know  how to work with Apache
      • Integrates well with other modules (SVN, DAV, etc)
    • Cons
      • Can be complicated to configure
      • The stock Apache is quite resource-hungry (12-15 KB, where nginx takes 3-5 KB and 20% faster serving of static files) compared to pure proxy solutions
  • nginx
    • Popular Russian web server with good proxy support (40% websites in Russia run nginx)
    • Can load-balance multiple backends and deliver static content
    • Quite popular with Mongrel as Rails backend
    • Simple configuration file - http://brainspl.at/nginx.conf.txt (nginx conf file)
    • Pros
      • Stable, Robust, Fast
      • Use fewer resources (CPU & RAM) than Apache proxy-mode & static files
      • Simple configuration file
      • Can directly talk to memcached - SSI
    • Cons
      • More documentation would be nice
      • No equivalent for many Apache modules
  • LightTPD
    • Lightweight and Fast web server
    • Balancing proxy server
    • Good FastCGI support
    • Used to be popular - until Mongrel came around
    • Nobody is using these days in production
    • Pros
      • Fast & lightweight
      • User fewer resources
      • Simpler configuration file
    • Cons
      • Unstable for some people
      • Slow development cycle
      • More docs would be nice
  • HA-Proxy (also applies to Pen and Pound)
    • Reliable, High performance TCP/HTTP-level balancer (SNMP or MySQL proxying too)
    • Proxying and content inspection
    • No content serving, just a proxy
    • Pros
      • Mature, stable & fast
      • TCP & HTTP Balancing
    • Cons
      • Few Rails examples
      • Usually not needed in Rails setup
After discussing all the options in detail, the recommendations were:
  • Small site - Apache 2.2 with mod_rails
  • Medium site - Apache 2.2 as front-end proxy + Mongrel or mod_rails as backend, Deliver static files with Apache.Not nginx because it does not depend on the extra power to deliver static files.
  • Large Rails site - Redundant load-balancer, redundant proxy/web, Mongrel/mod_rails
  • Heavy static files - Dynamic requests to Apache+mod_rails, static files nginx/lighttpd
  • Java Shop - WAR fles + integrate with existing Java landscape and infrastructure
Then it explained Capistrano, Webistrano, Macistrano and ran through a practical lab of using them.

The tutorial concluded by discussing monitoring. The two criteria for monitoring are:
  • Is it still running ?
  • What are the trends ?
The two main recommendations are:
  • Monit
    • Process-level monitoring
    • Checks PID-files, ports and perms
    • Reacts by executing a script and/or alerting
  • Munin
    • Host level monitoring tool
    • Master periodically ask nodes for local data
    • Check system resources and records historical data
    • Allows to recognize trends and make predictions
    • Alerting support
And other tools that were mentioned as well such as Nagios, Big Brother, New Relic RPM, FiveRuns and JMX. The slides will be published on Rails Conf website so watch this space.

The evening concluded with Q&A from Rails Core Members - DHH, Koz & Jeremy.

Here are some of the sessions I plan to attend tomorrow:
And then there is exhibitor hall as well so will see how much I can attend :) I have to miss the late afternoon and evening sessions/BoFs because of Berlin/Brandenberger JUG preso.

Here are some pictures from yesterday:


And finally the complete photo album so far:



The sessions/exhibit halls start today!

Technorati: conf railsconf berlin rubyonrails

Follow Rails Conf Europe 2008


Would you like to follow the latest on Rails Conf Europe 2008 ? Here are some sources:

IRC: #railsconfeurope
Twitter: RailsConfEurope and RailsConfEU and railsconf
Facebook: RailsConf Europe
Flickr: railsconfeurope08
RSS: OreillyConferencesRailsconfEurope
News and Coverage
Dopplr: eurorailsconf08

And of course, official website!

Technorati: conf railsconf berlin rubyonrails

Monday Sep 01, 2008

Rails Conf Europe 2008 and Bratwurst-on-Rails

I arrived Berlin yesterday on a non-adventurous United flight from San Francisco, just the way I like it! The flight from Frankfurt was delayed 30 minutes but that's normal these days :)

The venue of RailsConf Europe 2008 is same as last year so street names/geography are somewhat familiar. But the conference hotel was sold out so am instead staying across the street. Visited Brandenburger Tor for a short duration after checking into the hotel. Also stopped by the Peugeot showroom on Unter den Linden and saw popular bear figurines in a side street. The evening ended with a social gathering celebrating the popular German culture of Bratwurst-on-Rails.

It's always exciting to meet my blog readers, thank you! Let me know if I'm missing any of your expectations.

The tutorial starts today and the conference starts tomorrow. If you are in Berlin, don't forget to attend the joint JUG and TU-Berlin talk. And my talk on "Rails powered by GlassFish" is scheduled on Thursday, Sep 4 @ 1:40pm.

The evening really eneded with a 40 minutes run and dinner in room service. The Jolly Hotel is really nice, newer rooms, courteous staff, delicious and very neatly prepared Club Chicken sandwich and prompt room service, definitely a good recommendation. However the fitness center is minimal with one ultra-loud treadmill and 3 other basic machines. The hotel staff informed that they are working on furnishing the fitness center (known as Wellness Center here). And there is only one American channel which is only talking about Storm Gustav and Republican National Convetion, Juno of Juneau since my arrival  :(

Anyway, enjoy the pictures so far!


And the complete album:


Technorati: conf railsconf berlin glassfish netbeans rubyonrails

Thursday Aug 28, 2008

FREE Ticket to Rails Conf Europe 2008

Are you a Start up company interested in jump starting and meets the following criteria ?

  • In business six years or less
  • A maximum of 150 employees, including any affiliates
  • Based in a country in which the program is offered
  • A verifiable company presence (website, company profile, etc.)
  • Agree to accept the program's terms and conditions

Sun Startup Essentials program provided discounted hardware, partner hosting & storage, FREE support & Training, even connects with over 200 investors and much more. What are you waiting for ? Apply Today!

We'll throw in a FREE ticket to Rails Conf Europe 2008 - FREE as in FREE beer :) Read more details here.

And then if you are using GlassFish for Rails deployment, then I can give you a FREE 30-second promo in my talk.

And if you are in Berlin, then you might as well attend Berlin JUG event - which is also FREE.

And if you are using GlassFish in your startup, then we even provide FREE cloud computing - partnering with Layered Technologies!

Read more about Sun @ Rails Conf Europe 2008.

See you there!

Technorati: conf glassfish netbeans railsconf rubyonrails berlin startupessentials sun

Thursday Aug 21, 2008

GlassFish @ Berlin-Brandenburg JUG and TU Berlin


I'll be providing an overview of GlassFish - engineering update on v2 and v3, adoption & success stories, and the vibrant community around it at a joint Berlin-Brandenburg JUG and TU-Berlin meet on Sep 3, 2008.

The coordinates are:

Wednesday, September 3rd
17:30-ca. 19:30
Room FR5516, Technical University of Berlin
Franklinstrasse 28/29
10587 Berlin

The directions are available and please register here.

Thanks to Daniel Freund (Sun's Campus Ambassador in Berlin) & Ralph Bergman for coordinating this! And many thanks to ever-energetic and highly-connected Aaron Houston (JUG Program Coordinator) for initiating the link :)

And of course, I'll also be speaking at Rails Conf Europe 2008 on Rails Powered by GlassFish.

Anybody knows good running trails around Jolly Hotel ?

UPDATE: The venue has changed to a different room. The new room now is FR3003 in the same building.

Technorati: conf glassfish netbeans railsconf rubyonrails jug berlin tuberlin
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today