Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
DiUS Computing Lca Rails Final
1. Rails Deployment in the Enterprise: Transmitting a Little Experience Robert Postill
2. What Can He Say About This? Who is this bloke? The end of Java as we know it The Rails you need to know The use of some cool tools Summary Questions Page #
3. Who am I? Solaris SA who crossed over to development Spent time doing Java then Rails Lots of integration projects and then greenfields development Spent a lot of time working with infrastructure departments Page #
5. Why Linux? Performance, you will notice the difference (so long as you don't use the Ubuntu-supplied ruby!) Because you can easily get supporting tools (e.g. Apache, Postgres, git) Because some gems require C to be compiled (bless the gcc) Because of the community Page #
15. Haskell and functional languages Polyglot solutions Web Services become a reality Page #
16. The end of Java: What did we learn? Partitioning our infrastructure Not everyone is our friend Databases are a facade for storage Blowing business logic across the platform is a recipe for disaster Turns out open source rocks :) Page #
17. Rant:Who are we employing? We need to find a question we can answer by saying “employ a small number of smart people” How do we get junior infrastructure guys to become senior guys? Why aren't there patterns for deploying applications? Why is infrastructure so driven by development? Page #
18. So sell me this rails stuff Web Development is quick – my guess is a 3x development speed improvement for a 3 month project Good patterns of development are enforced by being baked into the framework Ruby is a great object-oriented language with a lot of perl-ish goodness Jruby is an excellent gateway drug ;) REST is encouraged Page #
28. Mongrel – most analogous to Tomcat, a specialised daemon written in Ruby and C
29. mod_rails/passenger – the new kid on the block. Apache module with some cute tricks in it. My attitude is that Mongrel is the safe option for right now. However mod_rails is shaping up to be ace Page #
30.
31.
32. Clients of AJAX applications (I'm looking at you Firefox...) leak memory, lots of it. Page #
34. How slow is it? Here's Sun's Widefinder project results: Name Language Elapsed LoC wf10 C++ 00:04:41 537 WFII.java Java (Kolja) 00:13:26 126 (Report) + 2000 (WFII Framework) stats_irumiha.pl Perl 00:19:56 292 parallel_2.py Python 00:22:37 124 stats.rb Ruby 25:24:41 78 Page #
35.
36.
37. Clients of AJAX applications (I'm looking at you Firefox...) leak memory, lots of it. Page #
38. Scaling Rails Rails doesn't need a bigger box it needs another instance (possibly on another box) Rails apps don't share state Databases are slow (especially remote databases) Caching assets Action, page and fragment caching Memcached Indexing engines versus RDBMS Page #
49. Deployment Tips Deploy to a common location – I like /var/webapps Push towards Postgresql/MySQL they're the most tested drivers Rails apps that use more than 150MB of mem probably need killing Budget on roughly 100MB of memory per process The log directory can get full fast, so use logrotate with a truncate strategy Cache gems on a server, all you need is Apache! Page #
54. Deployment: Puppet You need a machine for the puppetmaster daemon Each client has a little daemon that talks to the server Puppet works with your OS package management so you use pbuilder or erm the rpm thingy... Puppet allows you to take control of large populations of machines Puppet has files called manifests Page #
61. Deployment: Capistrano Capistrano is closely aligned to Rails, but its use is much broader than that Capistrano applies commands to sets of servers Capistrano also has recipes that it applies The syntax is Ruby-based You can call shell commands and inspect the results Page #
62. Deployment:Capistrano - Example task :search_libs, :hosts => "www.capify.org" do run "ls -x1 /usr/lib | grep -i xml" end task :as_root, :hosts => "r.postill.com" do sudo "useradd robert" end Page #
63. Deployment:Capistrano - Rails Capistrano was basically developed to deploy rails apps like basecamp and highrise so it knows rails capify will create config/deploy.rb and Capfile in your rails project cap deploy Capistrano will take a copy of what's in your source control and push it onto the server Page #
78. SNMP integration We should assume that the One Language To Rule Them All is a bad idea Ruby needs to stomp on those memory leaks (watch for Ruby 2/1.9/Rubinius) Page #
80. Summary Ruby and Rails are ace :) Try and use a simple three-tier architecture Push the REST ideas, they benefit everyone Use mongrel to host the apps and monit to control the mongrels Use Capistrano or Puppet, to push the Rails apps to production, you'd be mad not to Integrate with the development teams Page #