Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

-Ruby on Rails Web Development

  • Be the first to comment

  • Be the first to like this


  1. 1. Ruby on Rails Web development / 2007.06.01 Yan CSS 2007 Blog 2007.12.20 Geoffery Ruby on Ruby on Rails Rails 3 Ruby on Rails Idea Beta Ruby on Rails 4 Beta Blog start-up Rails Q2.0GHz, 4GB RAM, SCSI P1 RAID-1 Kernel 2.6.22-3-amd64 #1 SMP, P1 Apache2, MySQL5.0.45, Ruby1.8.6, Ruby-MySQL2.7, Rails 1.2.3, Mongrel 1.1.4. 2007 7 MySQL Mongrel Ruby on Rails 2007 2007.03.01 2007.03.15 2008 1 2007.04.12 Beta 2007.09.22 Gamma Rails PV 2007.09.28 5 Mongrel Mongrel 2007.03.01 Ruby on Rails mongrel_proctitle Mongrel 2007.05.21 Benson Ruby on 20 Rails Rails 99
  2. 2. transaction MySQL Technology 1. mongrel 40 innodb_lock_wait_timeout 20 mongrel 150M RAM, ActiveRecord :after_update, :after_destroy mongrel callback 2. monit/god mongrel ActiveRecord Built-in Transactions mongrel ActiveRecord destroy save mongrel transaction activerecord/lib/ transaction.rb filter chain 3. MySQL after_update after_destroy transaction 4. MySQLslow query log, transaction commit MySQL SQL include select action_cache after_update association after_destroy expire_action find_by_sql expire_action 5. RAID-5 acts_as_commentable 6. action cache fragment cache ramfs 7. memcached sessions mount -t ramfs ramfs /home/yay/rails_app/current/ 8. Memcached tmp/cache Cache memcached Memcached 6 PV 9. Apache2 Nginx 0.5.35 Swiftiply event mongrel fair proxy Nginx, Memcached mongrels server 1 MySQL mongrels server 2 PV Request 30 reqs/sec. 12 3600 sec 12 x 3600 sec x 30 reqs/sec = 1296000 reqs. 1. find :select, :limit, :offset. Rails find 1 Mongrel 2. find_by_* find_by_columnname production log ActiveRecord method_missing (ActiveRecord::StatementInvalid) "Mysql::Error: find_by_sql find Lock wait timeout exceeded; try restarting transaction: 3. find_by_sql SQL UPDATE some_table..... find find_by_sql ActiveRecord SQL find_by_sql 100
  3. 3. 4. View HTML link_to, Blog Ruby on Rails url_for helper HTML Ruby Ruby on railsbench Rails, twitter (Evan Williams) Twitter Ruby on Rails Ruby on Rails Ruby on Rails Ruby Rails Rake, Capistrano Rails Plugin Ruby on Rails TDD Production 7 PHP .NET Java Load Balance SA Ruby on Rails Ruby on Rails Ruby on Rails Ruby on Rails Ruby on Rails Phusion Passenger mod_rails. Linux Ruby on Rails Linux/Ruby (Jesse Cai) 1997 Ruby on Rails 2005 UUZone DHH Blog Ruby on Rails Web2.0 CTO Twittter Blog Ruby on Rails DHH : 101