SlideShare una empresa de Scribd logo
1 de 45
Rails Deployment in the Enterprise: Transmitting a Little Experience Robert Postill
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 #
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 #
Windows is badly broken Page #
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 #
The end of Java: How we got here When we were young we thought things could be simple: ,[object Object]
Vendors could help
We could still be flexible What went wrong? ,[object Object]
How expensive is this?
This is so slowwww to develop Page #
PHP – More harmful than bird flu
The end of Java: What's happening now? Fragmentation ,[object Object]
Groovy (JVM variants)
PHP
Haskell and functional languages Polyglot solutions Web Services become a reality Page #
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 #
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 #
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 #
REST – I'm Excited! It's an architecture of development conceived by Roy Fielding – one of the founders of the Apache Software Foundation and the HTTP specification RESTful applications try to model themselves on the web, which means: ,[object Object]
You can put caches at multiple levels Page #
The basics of Rails: Structure Every project is contained in a directory: ,[object Object]
log holds logs
public – static files like images, CSS and like
script – commands for starting and stopping the application
config – holds database credentials and performance settings mostly
app – the source code lives here Page #
The basics of Rails: Deployment Three deployment options: ,[object Object]
Mongrel – most analogous to Tomcat, a specialised daemon written in Ruby and C
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 #
Pitfalls of Rails Speed of execution: ,[object Object]
Rails and Ruby are not the answer for large batch operations Rails apps leak memory It's the best AJAX integration that I know of: ,[object Object]
Clients of AJAX applications (I'm looking at you Firefox...) leak memory, lots of it. Page #
How slow is Ruby vs Perl? Page #
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 #
Pitfalls of Rails Speed of execution: ,[object Object]
Rails and Ruby are not the answer for large batch operations Rails apps leak memory It's the best AJAX integration that I know of: ,[object Object]
Clients of AJAX applications (I'm looking at you Firefox...) leak memory, lots of it. Page #
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 #
Securing Rails Wrapping Rails in your onion: ,[object Object]
Proxy requests (push for RESTful apps to help with this)
config/database.yml stores your db credentials so protect it (maybe move it out of source control?).
mod_rewrite can be dangerous
Never ever use in_place editor Page #
Are we ever going to talk deployment? Page #
Deployment Architecture Page #

Más contenido relacionado

La actualidad más candente

Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005
dflexer
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerun
idsecconf
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
Brendan Gregg
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
Sasha Goldshtein
 

La actualidad más candente (20)

Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005Tuning parallelcodeonsolaris005
Tuning parallelcodeonsolaris005
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems Performance
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerun
 
Linux kernel tracing superpowers in the cloud
Linux kernel tracing superpowers in the cloudLinux kernel tracing superpowers in the cloud
Linux kernel tracing superpowers in the cloud
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting Started
 
Spying on the Linux kernel for fun and profit
Spying on the Linux kernel for fun and profitSpying on the Linux kernel for fun and profit
Spying on the Linux kernel for fun and profit
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
 
DCSF 19 eBPF Superpowers
DCSF 19 eBPF SuperpowersDCSF 19 eBPF Superpowers
DCSF 19 eBPF Superpowers
 
bcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesbcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challenges
 
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven RostedtKernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
 
Linux Performance Tools 2014
Linux Performance Tools 2014Linux Performance Tools 2014
Linux Performance Tools 2014
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
LPC2019 BPF Tracing Tools
LPC2019 BPF Tracing ToolsLPC2019 BPF Tracing Tools
LPC2019 BPF Tracing Tools
 
LSFMM 2019 BPF Observability
LSFMM 2019 BPF ObservabilityLSFMM 2019 BPF Observability
LSFMM 2019 BPF Observability
 
Debugging node in prod
Debugging node in prodDebugging node in prod
Debugging node in prod
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 

Destacado

Satellite Housing CHDO - EE in HOME Workshop
Satellite Housing CHDO - EE in HOME WorkshopSatellite Housing CHDO - EE in HOME Workshop
Satellite Housing CHDO - EE in HOME Workshop
ICF_HCD
 
Donde esta el Dios de justicia
Donde esta el Dios de justiciaDonde esta el Dios de justicia
Donde esta el Dios de justicia
Paulo Arieu
 
Andrea Pillon: Gli strumenti partecipativi
Andrea Pillon: Gli strumenti partecipativiAndrea Pillon: Gli strumenti partecipativi
Andrea Pillon: Gli strumenti partecipativi
euresgroup
 
Kirklees Visioning Proposal V2
Kirklees Visioning Proposal V2Kirklees Visioning Proposal V2
Kirklees Visioning Proposal V2
j.greenwood
 
Womendrivingawards
WomendrivingawardsWomendrivingawards
Womendrivingawards
agek2005
 
new Seven wonders
new Seven wondersnew Seven wonders
new Seven wonders
agek2005
 
Licensario — система оплаты для стартапов. in-app billing
Licensario — система оплаты для стартапов. in-app billingLicensario — система оплаты для стартапов. in-app billing
Licensario — система оплаты для стартапов. in-app billing
Maria Podolyak
 
D2.1 Evaluation Criteria and Methods
D2.1	 Evaluation Criteria and MethodsD2.1	 Evaluation Criteria and Methods
D2.1 Evaluation Criteria and Methods
Hendrik Drachsler
 

Destacado (20)

Satellite Housing CHDO - EE in HOME Workshop
Satellite Housing CHDO - EE in HOME WorkshopSatellite Housing CHDO - EE in HOME Workshop
Satellite Housing CHDO - EE in HOME Workshop
 
Donde esta el Dios de justicia
Donde esta el Dios de justiciaDonde esta el Dios de justicia
Donde esta el Dios de justicia
 
Journey To The East Part 1
Journey To The East Part 1Journey To The East Part 1
Journey To The East Part 1
 
Andrea Pillon: Gli strumenti partecipativi
Andrea Pillon: Gli strumenti partecipativiAndrea Pillon: Gli strumenti partecipativi
Andrea Pillon: Gli strumenti partecipativi
 
Domuz Gribi
Domuz GribiDomuz Gribi
Domuz Gribi
 
Balthus
BalthusBalthus
Balthus
 
Improve your Presentation Power
Improve your Presentation PowerImprove your Presentation Power
Improve your Presentation Power
 
Kirklees Visioning Proposal V2
Kirklees Visioning Proposal V2Kirklees Visioning Proposal V2
Kirklees Visioning Proposal V2
 
Social Media Perspectives
Social Media PerspectivesSocial Media Perspectives
Social Media Perspectives
 
Antdevhastcevap
AntdevhastcevapAntdevhastcevap
Antdevhastcevap
 
F.Particelemental
F.ParticelementalF.Particelemental
F.Particelemental
 
Womendrivingawards
WomendrivingawardsWomendrivingawards
Womendrivingawards
 
A Long Walk to Water: Lesson9 unit2
A Long Walk to Water: Lesson9 unit2A Long Walk to Water: Lesson9 unit2
A Long Walk to Water: Lesson9 unit2
 
新聞報告
新聞報告新聞報告
新聞報告
 
new Seven wonders
new Seven wondersnew Seven wonders
new Seven wonders
 
Converting Your Crowd for Culture Days, National Arts Congress
Converting Your Crowd for Culture Days, National Arts CongressConverting Your Crowd for Culture Days, National Arts Congress
Converting Your Crowd for Culture Days, National Arts Congress
 
Licensario — система оплаты для стартапов. in-app billing
Licensario — система оплаты для стартапов. in-app billingLicensario — система оплаты для стартапов. in-app billing
Licensario — система оплаты для стартапов. in-app billing
 
Open Science
Open ScienceOpen Science
Open Science
 
Phoenix Az Inter Tribal Council Ee Presentation
Phoenix   Az Inter Tribal Council   Ee PresentationPhoenix   Az Inter Tribal Council   Ee Presentation
Phoenix Az Inter Tribal Council Ee Presentation
 
D2.1 Evaluation Criteria and Methods
D2.1	 Evaluation Criteria and MethodsD2.1	 Evaluation Criteria and Methods
D2.1 Evaluation Criteria and Methods
 

Similar a DiUS Computing Lca Rails Final

Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
george.james
 
From Ant to Rake
From Ant to RakeFrom Ant to Rake
From Ant to Rake
jazzman1980
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
arif44
 

Similar a DiUS Computing Lca Rails Final (20)

Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Rails Concept
Rails ConceptRails Concept
Rails Concept
 
Dean4j@Njug5
Dean4j@Njug5Dean4j@Njug5
Dean4j@Njug5
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 
Message Queues in Ruby - An Overview
Message Queues in Ruby - An OverviewMessage Queues in Ruby - An Overview
Message Queues in Ruby - An Overview
 
Introduction To Rails
Introduction To RailsIntroduction To Rails
Introduction To Rails
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
From Ant to Rake
From Ant to RakeFrom Ant to Rake
From Ant to Rake
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
 
Rails Vs CakePHP
Rails Vs CakePHPRails Vs CakePHP
Rails Vs CakePHP
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!
 
Apache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 MistakesApache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 Mistakes
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability Mistakes
 
Sparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With SparkSparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With Spark
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
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 #
  • 4. Windows is badly broken 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 #
  • 6.
  • 8.
  • 10. This is so slowwww to develop Page #
  • 11. PHP – More harmful than bird flu
  • 12.
  • 14. PHP
  • 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 #
  • 19.
  • 20. You can put caches at multiple levels Page #
  • 21.
  • 23. public – static files like images, CSS and like
  • 24. script – commands for starting and stopping the application
  • 25. config – holds database credentials and performance settings mostly
  • 26. app – the source code lives here Page #
  • 27.
  • 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 #
  • 33. How slow is Ruby vs Perl? 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 #
  • 39.
  • 40. Proxy requests (push for RESTful apps to help with this)
  • 41. config/database.yml stores your db credentials so protect it (maybe move it out of source control?).
  • 42. mod_rewrite can be dangerous
  • 43. Never ever use in_place editor Page #
  • 44. Are we ever going to talk deployment? Page #
  • 46. Hang on a minute! 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 #
  • 50.
  • 51. Deprec and Sprinkle – tools that use Capistrano as their base.
  • 52. Puppet – a configuration management tool, so cunning you could cast it in Blackadder Page #
  • 53. Puppet, more than just fun... 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 #
  • 55. Deployment: Puppet - Example class sudo { package { sudo: ensure => latest } file { "/etc/sudoers": owner => root, group => root, mode => 440, source => "puppet:///sudo/sudoers", require => Package["sudo"], } } Page #
  • 56.
  • 57. Check out the recipes... nice
  • 58. Puppet makes provision for config of files and apps
  • 59.
  • 60. The recipe syntax is not as powerful as it could bez 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 #
  • 64.
  • 65.
  • 66. The documentation is not so good
  • 67. Can be difficult to debug Page #
  • 69.
  • 70. Make a link between Continuous Integration tools (e.g. CC.rb or Hudson) and deployment. For example don't allow broken builds to be deployed
  • 71. Try and make the deployment an output of the build process. Page #
  • 72.
  • 75.
  • 76. Build test environments with load balancers/proxies Page #
  • 77.
  • 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 #
  • 79. So what do I need to remember? 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 #
  • 81. Photo credits All photos courtesy of flickr's creative commons: nathansnostalgia, broken windows, page 4 - http://www.flickr.com/photos/nathansnostalgia/2098210283/ kaymoshusband, chicken sign , page 8- http://www.flickr.com/photos/thegaffneys/365119725/ big loggy missus, sleepy guy, page 21 - http://www.flickr.com/photos/natsgrant/501293610/ pt, puppet, page 28- http://www.flickr.com/photos/pmtorrone/9845799/ dunechaser, pirate attitude, page 36 - http://www.flickr.com/photos/dunechaser/253066484/ tyla75, new year resolutions, page 40 - http://www.flickr.com/photos/tyla/3159840057/ Page #
  • 83. Links Language comparisons: http://wikis.sun.com/display/WideFinder/Results http://shootout.alioth.debian.org/u32/ruby.php REST: http://en.wikipedia.org/wiki/Representational_State_Transfer Puppet: http://reductivelabs.com/trac/puppet Capistrano: http://www.capify.org Mongrel: http://mongrel.rubyforge.org/ mod_rails/passenger: http://www.modrails.com Monit: http://mmonit.com/monit/ Page #
  • 84. Contact I'll be here all week :) But just in case: [email_address] Page #