2010/2/27 OSC 2010 tokyo spring Yasushi Ichikawa (id: cakephper) ‏  (id: ichikaway)‏ MongoDB
MongoDB オープンソース  non-relational DB Scalable Schema free, document-oriented High performance 提供されている Driver Java, PHP, Python, Ruby, Perl, etc. 専用シェルもあるよ
MongoDB の目指すもの ×  Join 、トランザクション ○  パフォーマンス 高負荷 Web サイト、ログ解析など
MongoDB 事例   Business insider.com Over 60 万  PV / business day    3 apache + 1 mongoDB   MongoDB の CPU 負荷は 5% 程度 http://www.businessinsider.com/how-we-use-mongodb-2009-11
MongoDB パフォーマンス比較 (1)‏ http://www.idiotsabound.com/did-i-mention-mongodb-is-fast-way-to-go-mongo Data:  4Columns / record  Wikipedia data 計測ソースコードや SQL 文は非公開 環境も非公開 (VM を使ってる )‏ 単位  sec 10 万  Insert 100 Read (No Index)‏ 1000 Read (With Index)‏ MongoDb 24 5 0.3 CouchDb 1097 4 16 MySQL 199 199 7.7
MongoDB パフォーマンス比較 (2)‏ 単位  sec Apache 経由の計測  (ab -c 100 -n 1000)‏ テストの母体データ量は不明 計測ソースコード (PHP), テスト環境情報公開 http://d.hatena.ne.jp/camelmasa/20100226/1267157805 Read Write MongoDb 1.4 1.2 CouchDb 3.1 3.1 MySQL 1.5 1.4 Memcache 1.3 1.2
MongoDB  操作 (PHP)‏ RDB っぽい操作 Pecl Mongo (PHP)‏ $mongo = new Mongo(localhost:27017); $db = $mongo->selectDB('blog'); $collection = $db->selectCollection('posts'); $collection->find($ 検索条件 , $ フィールド )‏ ->sort()->limit(5)->skip(); $collection->insert($ 配列データ );
ありがとうございました CakePHP 用の MongoDB Datasource を公開中 (Ver 0.1)‏ http://github.com/ichikaway/mongoDB-Datasource

mongoDB: OSC Tokyo2010 spring

  • 1.
    2010/2/27 OSC 2010tokyo spring Yasushi Ichikawa (id: cakephper) ‏ (id: ichikaway)‏ MongoDB
  • 2.
    MongoDB オープンソース non-relational DB Scalable Schema free, document-oriented High performance 提供されている Driver Java, PHP, Python, Ruby, Perl, etc. 専用シェルもあるよ
  • 3.
    MongoDB の目指すもの × Join 、トランザクション ○ パフォーマンス 高負荷 Web サイト、ログ解析など
  • 4.
    MongoDB 事例  Business insider.com Over 60 万 PV / business day   3 apache + 1 mongoDB   MongoDB の CPU 負荷は 5% 程度 http://www.businessinsider.com/how-we-use-mongodb-2009-11
  • 5.
    MongoDB パフォーマンス比較 (1)‏http://www.idiotsabound.com/did-i-mention-mongodb-is-fast-way-to-go-mongo Data: 4Columns / record Wikipedia data 計測ソースコードや SQL 文は非公開 環境も非公開 (VM を使ってる )‏ 単位 sec 10 万 Insert 100 Read (No Index)‏ 1000 Read (With Index)‏ MongoDb 24 5 0.3 CouchDb 1097 4 16 MySQL 199 199 7.7
  • 6.
    MongoDB パフォーマンス比較 (2)‏単位 sec Apache 経由の計測 (ab -c 100 -n 1000)‏ テストの母体データ量は不明 計測ソースコード (PHP), テスト環境情報公開 http://d.hatena.ne.jp/camelmasa/20100226/1267157805 Read Write MongoDb 1.4 1.2 CouchDb 3.1 3.1 MySQL 1.5 1.4 Memcache 1.3 1.2
  • 7.
    MongoDB 操作(PHP)‏ RDB っぽい操作 Pecl Mongo (PHP)‏ $mongo = new Mongo(localhost:27017); $db = $mongo->selectDB('blog'); $collection = $db->selectCollection('posts'); $collection->find($ 検索条件 , $ フィールド )‏ ->sort()->limit(5)->skip(); $collection->insert($ 配列データ );
  • 8.
    ありがとうございました CakePHP 用のMongoDB Datasource を公開中 (Ver 0.1)‏ http://github.com/ichikaway/mongoDB-Datasource