2/07/2007

DB Cluster / Replication in Active Record

突然看到了這篇文章,差點沒興奮的大叫出來!!!


I have done some extensive work on active record to allow for databases to be defined in terms of "connection pools" rather than simply one database. Most of the work was completed in connection_specification.rb and is done at this level to be compatible with any backend you choose. Also this patch maintains full compatibiltity with the current paradigm so no changes are necessary to current applications/documentation.

這是一個讓 Active Record 支援 Connection Pool 的技術,使用者可以在 config 裡面這樣寫

development_read_pool: db1, db2, db3
development_write_pool: db4, db5, db6

而這樣使用者就可以使用不同的 read write connection pool了。使用方式跟操作方式,我想等到我已經確定要怎麼玩了再講吧,Anyway,this is a very good starting point。

參考連結
  1. RFourm:Support for DB Clusters/Replication in ActiveRecord

1 則留言:

Unknown 提到...

我也對這個東西有興趣耶,請問你有看到其他的參考資料嗎?如果有可以mail給我嗎?謝謝。
我的mail:weijenlu@yahoo.com.tw