Benchmarking Makes it Better
2009年7月24日 星期五
2009年7月19日 星期日
X-Sendfile
mod_xsendfile
Reference : Advanced Rails p121
The X-Sendfile protocol is a very simple standard, first introduced in the Lighttpd
web server, which directs the web server to send a file from the filesystem to the client
rather than a response generated by the application server.
X-Sendfile uses the X-Sendfile HTTPheader pointing to the server’s path to the file
to send, in conjunction with the other standard HTTPheaders. A typical response
using X-Sendfile would look something like this:
From Rails, you can set the response headers by modifying the response.headers
hash:
Reference : Advanced Rails p121
The X-Sendfile protocol is a very simple standard, first introduced in the Lighttpd
web server, which directs the web server to send a file from the filesystem to the client
rather than a response generated by the application server.
X-Sendfile uses the X-Sendfile HTTPheader pointing to the server’s path to the file
to send, in conjunction with the other standard HTTPheaders. A typical response
using X-Sendfile would look something like this:
From Rails, you can set the response headers by modifying the response.headers
hash:
2009年7月18日 星期六
delegate
Rails delegate method
那個 :to => :user 其實是由customer object 再去找 user 的 instance method
所以其實可以在 overwirte 掉做其他的處理
那個 :to => :user 其實是由customer object 再去找 user 的 instance method
所以其實可以在 overwirte 掉做其他的處理
2009年7月16日 星期四
capistrano, fast_remote_cache
fast_remote_cache
37signals 用hard link 取代 copy 的方式
因為有需要一直用新的branch 更新, cache_copy 有需要一直變換其svn repository
所以需要overwrite 一下 fast_remote_cache 的一些 methods
37signals 用hard link 取代 copy 的方式
因為有需要一直用新的branch 更新, cache_copy 有需要一直變換其svn repository
所以需要overwrite 一下 fast_remote_cache 的一些 methods
2009年7月15日 星期三
Understanding_Deployment_Strategies, deploy_via
Understanding Deployment Strategies
Deployment strategies are just ways for capistrano to get your code onto your target servers, ready to rock and roll
Deploy Strategy :checkout 就是checkout 新的
Deploy Strategy :copy 有時候 你的target server 可能因為被防火牆擋了 就是拿不到svn, 就只好用這個, 把本地的東西copy 過去
Deploy Strategy :export 就是用export 拿code, 用export 拿code 不會有svn control
Deploy Strategy :remote_cache, 把code 弄在cache copy 底下, 然後對其做svn update, 然後再把該份code 弄到新的release 去
Deployment strategies are just ways for capistrano to get your code onto your target servers, ready to rock and roll
Deploy Strategy :checkout 就是checkout 新的
Deploy Strategy :copy 有時候 你的target server 可能因為被防火牆擋了 就是拿不到svn, 就只好用這個, 把本地的東西copy 過去
Deploy Strategy :export 就是用export 拿code, 用export 拿code 不會有svn control
Deploy Strategy :remote_cache, 把code 弄在cache copy 底下, 然後對其做svn update, 然後再把該份code 弄到新的release 去