X



【ヘロク】 Heroku Part1 【PostgreSQL】
■ このスレッドは過去ログ倉庫に格納されています
0012名無しさん@お腹いっぱい。
垢版 |
2012/02/22(水) 10:48:41.470
Twitterのトラブルから見る、DB分割でスケーラブルなRailsサイト構築:TKMR.blog.show
http://blog.tkmr.org/tatsuya/show/311-twitter-db-rails

Magic Multi-Connections: A “facility in Rails to talk to more than one database at a time”
http://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facility-in-rails-to-talk-to-more-than-one-database-at-a-time/

ActsAsReadonlyable
http://revolutiononrails.blogspot.com/2007/04/plugin-release-actsasreadonlyable.html

https://github.com/masarakki/acts_as_multi_connection
https://github.com/tchandy/octopus
https://github.com/kovyrin/db-charmer
https://github.com/mperham/data_fabric
https://www.ruby-toolbox.com/categories/Active_Record_Sharding
0013名無しさん@お腹いっぱい。
垢版 |
2012/02/22(水) 10:49:13.880
acts_as_readonlyable
http://revolutiononrails.blogspot.com/2007/04/plugin-release-actsasreadonlyable.html

http://drnicwilliams.com/2007/04/12/magic-multi-connections-a-facility-in-rails-to-talk-to-more-than-one-database-at-a-time/

octopus
Database Sharding for ActiveRecord
https://github.com/tchandy/octopus

User.where(:name => "Thiago").limit(3).using(:slave_one)

Octopus.using(:slave_two) do
User.create(:name => "Mike")
end

Database sharding and Rails - Stack Overflow
http://stackoverflow.com/questions/44145/database-sharding-and-rails
0016名無しさん@お腹いっぱい。
垢版 |
2012/02/22(水) 23:22:38.020
https://github.com/tchandy/octopus/wiki/Sharding
https://github.com/tchandy/octopus
class ApplicationController < ActionController::Base
around_filter :select_shard

def select_shard(&block)
Octopus.using(current_user.country, &block)
end
end

https://github.com/mperham/data_fabric
class ApplicationController < ActionController::Base
around_filter :select_shard

private
def select_shard(&block)
DataFabric.activate_shard(:city => @current_user.city, &block)
end
end
0017名無しさん@お腹いっぱい。
垢版 |
2012/02/22(水) 23:23:59.140
ActiveRecord の find(id) と find_by_id(id) の違い
レコードが見つからなかったとき
find(id) 例外が発生する
find_by_id(id) nil が返る
http://higelog.brassworks.jp/?p=71

0021名無しさん@お腹いっぱい。
垢版 |
2012/02/23(木) 07:43:41.670
http://www.sssg.org/blogs/naoya/archives/1989
http://blog.agoragames.com/blog/2010/01/29/getting-started-with-data_fabric/

class ApplicationController < ActionController::Base
around_filter :select_shard

private
def select_shard(&block)
DataFabric.activate_shard(:city => @current_user.city, &block)
end
end
https://github.com/fiveruns/data_fabric/blob/ee9ec728686613acb58f0bcc482c179703c24ded/README.rdoc
http://rubydoc.info/gems/data_fabric/1.3.3/file/README.rdoc
0022名無しさん@お腹いっぱい。
垢版 |
2012/02/23(木) 07:54:48.020
#{group}_#{shard}_#{environment} - sharding, no replication, e.g. “city_austin_production”
data_fabric :replicated => true, :shard_by => :city
https://github.com/mperham/data_fabric
class ApplicationController < ActionController::Base
around_filter :select_shard

private
def select_shard(&block)
DataFabric.activate_shard(:city => @current_user.city, &block)
end
end
0024名無しさん@お腹いっぱい。
垢版 |
2012/02/23(木) 10:11:47.550
RoR Wiki 翻訳 Wiki - HowtoUseMultipleDatabases
http://web.archive.org/web/20070217161907/http://techno.hippy.jp/rorwiki/?HowtoUseMultipleDatabases

やむにやまれず:ActiveRecordで異なる複数のDBへ接続しにいく方法
http://blog.livedoor.jp/sparklegate/archives/50376930.html

[Ruby] ActiveRecord で複数のデータベースに接続する方法 « messaliberty 日本語
http://jp.messaliberty.com/2009/02/ruby-how-to-use-multiple-databases-with-activerecord/
0026名無しさん@お腹いっぱい。
垢版 |
2012/02/24(金) 01:28:01.740
Master-Slave clusters to scale out your Rails models reads.
Vertical sharding by moving some of your models to a separate (maybe even dedicated) servers and still keep using AR associations
Horizontal sharding by slicing your models data to pieces and placing those pieces into different databases and/or servers.
http://kovyrin.net/2010/04/16/dbcharmer-rails-can-scale/

https://github.com/kovyrin/db-charmer
http://kovyrin.github.com/db-charmer/
0029名無しさん@お腹いっぱい。
垢版 |
2012/02/24(金) 01:33:00.830



>>10

0037名無しさん@お腹いっぱい。
垢版 |
2012/02/28(火) 15:30:36.160
個人でちょっとしたアプリ作って公開するには、無料分だとちょっとDBの容量が心もとなくない?
ただ20GBの共有データベースに課金するぐらいなら、VPS使った方が良くないかな?
個人的に使うアプリを色々と置かせてもらってるので、Herokuは好きなんだけど・・・
それともなんか他に良いやり方あるかな?
0039名無しさん@お腹いっぱい。
垢版 |
2012/02/28(火) 23:09:31.520
Herokuはつかえない。最初は良かったけど結局は高くつく。
さくらとか、カゴヤとかのレンサバの方が百倍マシ。
0040名無しさん@お腹いっぱい。
垢版 |
2012/02/29(水) 05:11:54.480
ケーススタディ11 初期の成功を放棄し、スケールするためのPivotとは?Herokuの場合 | "Lean Startup Japan"
Herokuは2011年1月にSalesforce.comに2億1200万ドル(約172億円!!)で買収されました。

彼らは「さらなる集中」の必要性に気づきます。
そこでの選択は「Webエディタ機能の放棄」でした。
http://leanstartupjapan.org/?p=237
0041名無しさん@お腹いっぱい。
垢版 |
2012/02/29(水) 09:43:53.740
クラウド型ストレージ「Amazon S3」は安いか? − @IT
1つはデータの冗長構成についてで、
Amazonは地理的に離れた最低2つのデータセンターにまたがって3重の冗長度でデータを保持している。
自前で同様のことをするには、RAID構成のストレージを2つのデータセンターに置き、それらの間でリアルタイムのレプリケーションを行う必要がある。
http://www.atmarkit.co.jp/news/200901/09/s3.html
0048名無しさん@お腹いっぱい。
垢版 |
2012/03/02(金) 06:23:15.950

http://ja.wikipedia.org/wiki/TCO
TCO (Total Cost of Ownership) とは「総保有コスト」のことで、ある設備などの資産に関する、購入から廃棄までに必要な時間と支出の総計。

予算を作成し要求する際、ランニングコスト(保守・運用・維持等のための費用、例として設備・システムなどのメンテナンス、
有償の更新、管理のための人件費、光熱費など)のために必要な経費を考慮に入れず、
初期投資額(イニシャルコスト)だけに注目しがちである。
TCOはそれらをトータルに含めた経費で、実際に支出すべき金銭の全額にあたる。
0051名無しさん@お腹いっぱい。
垢版 |
2012/03/04(日) 18:07:22.740
$ gem install mysql2postgres
0052名無しさん@お腹いっぱい。
垢版 |
2012/03/04(日) 19:04:46.690
http://devcenter.heroku.com/articles/heroku-postgres-documentation
Fork (beta)

Forking creates a new database containing a snapshot
of an existing database at the current point in time.
Forked databases do not stay up-to-date with the original database and are writable.

Follow (beta)
Followers are read-only and stay stay up-to-date
with the changes to your database.

0076名無しさん@お腹いっぱい。
垢版 |
2012/03/12(月) 06:31:07.780
heroku addons:add heroku-shared-postgresql:basic
0082名無しさん@お腹いっぱい。
垢版 |
2012/03/12(月) 19:38:02.050
heroku addons:add heroku-shared-postgresql:basic
heroku addons:add ssl:piggyback
heroku addons:add scheduler:standard
heroku addons:add mailgun:starter

heroku addons:add cron:daily
heroku config:add AWS_S3_SECRET_KEY="xxxx" AWS_S3_KEY_ID="xxxx" BACKUP_BACKET="backet-name"
https://github.com/mataki/heroku_backup_task
0094名無しさん@お腹いっぱい。
垢版 |
2012/03/17(土) 19:00:31.190

http://groups.google.com/group/heroku/browse_thread/thread/9f1a5d7d677fb4dc

You can install the free New Relic add-on.
It has an availability monitor feature that will ping your site twice per minute,
thus preventing the dyno from idling.
http://stackoverflow.com/questions/5480337/easy-way-to-prevent-heroku-idling


Apps that have only 1 web dyno will be idled out after one hour of inactivity.
Apps that have more than 1 web dyno are never idled out. Workers dynos are never idled out.
http://devcenter.heroku.com/articles/dyno-idling
0095名無しさん@お腹いっぱい。
垢版 |
2012/03/18(日) 03:34:37.580
【RoR】Ruby on Rails Part14
http://kohada.2ch.net/test/read.cgi/php/1329492840/l50

【RoR】Ruby on Rails Part14
http://kohada.2ch.net/test/read.cgi/php/1329492840/l50

【RoR】Ruby on Rails Part14
http://kohada.2ch.net/test/read.cgi/php/1329492840/l50

【RoR】Ruby on Rails Part14
http://kohada.2ch.net/test/read.cgi/php/1329492840/l50

【RoR】Ruby on Rails Part14
http://kohada.2ch.net/test/read.cgi/php/1329492840/l50

【RoR】Ruby on Rails Part14
http://kohada.2ch.net/test/read.cgi/php/1329492840/l50
0097名無しさん@お腹いっぱい。
垢版 |
2012/03/19(月) 10:02:14.580

Node.jsを手軽に試せるJavaScript統合開発環境「Cloud9 IDE」、クラウドでの提供開始 − Publickey
http://www.publickey1.jp/blog/11/nodejsjavascriptcloud9_ide.html

Cloud9 IDE is an online development environment for
Javascript and Node.js applications as well as
HTML, CSS, PHP, Java, Ruby and 23 other languages.
http://c9.io/
■ このスレッドは過去ログ倉庫に格納されています

ニューススポーツなんでも実況