0
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB                                         HTTP                                       We...
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB                        var entity = {                          _id: ‘abc’,           ...
Mongo Tokyo 2011 - node.js + MongoDB                        https://github.com/orlandov/node-mongodb/                     ...
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB                var client = new Db(test, new Server("127.0.0.1", 27017, {}));        ...
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB                var db = new Database(‘127.0.0.1’, 3306, ‘test’);                db.op...
Mongo Tokyo 2011 - node.js + MongoDB                        https://github.com/LearnBoost/mongoose
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB                var spec1 = {                   name: ‘test’,                   type: ...
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB
Mongo Tokyo 2011 - node.js + MongoDB                                 { "_id" : "plant_ichigo",                            ...
Mongo Tokyo 2011 - node.js + MongoDB
MongoDB + node.js で作るソーシャルゲーム
Upcoming SlideShare
Loading in...5
×

MongoDB + node.js で作るソーシャルゲーム

46,181

Published on

Mongo Tokyo 2011 のセッションで使用した node.js と MongoDB を使って開発しているサービスのプレゼン資料です

Published in: Technology
1 Comment
80 Likes
Statistics
Notes
  • Hello
    My name is mercy,i saw your profile today and became intrested in you,i will also like to know you more,and if you can send an email to my email address,i will give you my pictures here is my email address (jonesmercy23@yahoo.i n) I believe we can move from here! Awaiting for your mail to my email address above.Thanks
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
46,181
On Slideshare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
265
Comments
1
Likes
80
Embeds 0
No embeds

No notes for slide

Transcript of "MongoDB + node.js で作るソーシャルゲーム"

  1. 1. Mongo Tokyo 2011 - node.js + MongoDB
  2. 2. Mongo Tokyo 2011 - node.js + MongoDB
  3. 3. Mongo Tokyo 2011 - node.js + MongoDB
  4. 4. Mongo Tokyo 2011 - node.js + MongoDB
  5. 5. Mongo Tokyo 2011 - node.js + MongoDB
  6. 6. Mongo Tokyo 2011 - node.js + MongoDB
  7. 7. Mongo Tokyo 2011 - node.js + MongoDB
  8. 8. Mongo Tokyo 2011 - node.js + MongoDB HTTP WebSocket Client (Flash) LB node.js 3x3 Sharding MongoDB Content SVN or git Distribution
  9. 9. Mongo Tokyo 2011 - node.js + MongoDB
  10. 10. Mongo Tokyo 2011 - node.js + MongoDB var entity = { _id: ‘abc’, name: ‘test’, body: { parts: { face: 0, eye: 2, nose: 4, mouth: 2 }, colors: { skin: 1, eye: 4, hair: 3 } } }; col.save(entity); col.findOne({_id:‘abc’}, function(err, result) { console.log(result.body.parts); }); col.update({_id:‘abc’}, {‘$set’, {name: ‘modified’}} );
  11. 11. Mongo Tokyo 2011 - node.js + MongoDB https://github.com/orlandov/node-mongodb/ https://github.com/christkv/node-mongodb-native/
  12. 12. Mongo Tokyo 2011 - node.js + MongoDB
  13. 13. Mongo Tokyo 2011 - node.js + MongoDB var client = new Db(test, new Server("127.0.0.1", 27017, {})); client.open(function(err, p_client) { client.createCollection(test_insert,function(err, collection) { client.collection(test_insert, function(err, collection) { for(var i = 1; i < 1000; i++) { collection.insert({c:1}, function(err, docs) {}); } collection.insert({a:2}, function(err, docs) { collection.insert({a:3}, function(err, docs) { collection.count(function(err, count) { test.assertEquals(1001, count); collection.find(function(err, cursor) { cursor.toArray(function(err, results) { test.assertEquals(1001, results.length); test.assertTrue(results[0] != null); client.close(); }); }); }); }); }); }); }); });
  14. 14. Mongo Tokyo 2011 - node.js + MongoDB
  15. 15. Mongo Tokyo 2011 - node.js + MongoDB var db = new Database(‘127.0.0.1’, 3306, ‘test’); db.open(); var item = db.collection(‘item’); item .begin() .insert({_id:‘test’, name:‘abcdefg’}) .insert({_id:‘test2’, name:‘123456’, values:[0,1,2,3]); .update({_id:‘test’}, {‘$set’: { name: ‘hijklmn’ }) .find({}).each(function(entity) { console.log(entity.name); }) .success(function() { console.log(‘done’); }) .failure(function(err) { console.log(‘error’, err); }) .end();
  16. 16. Mongo Tokyo 2011 - node.js + MongoDB https://github.com/LearnBoost/mongoose
  17. 17. Mongo Tokyo 2011 - node.js + MongoDB
  18. 18. Mongo Tokyo 2011 - node.js + MongoDB
  19. 19. Mongo Tokyo 2011 - node.js + MongoDB
  20. 20. Mongo Tokyo 2011 - node.js + MongoDB var spec1 = { name: ‘test’, type: ‘text’, label: ‘label-1’, class: ‘number’, min: 0, max: 100 }; var spec2 = { name: ‘test2’, type: ‘group’, label: ‘group-1’, fields: [spec3, spec4, spec5] }; var formSpec = [ spec1, spec2 ]; showForm(formSpec);
  21. 21. Mongo Tokyo 2011 - node.js + MongoDB
  22. 22. Mongo Tokyo 2011 - node.js + MongoDB
  23. 23. Mongo Tokyo 2011 - node.js + MongoDB { "_id" : "plant_ichigo", "name" : " ", "type" : "plant", "plant" : { "tags" : [ "vegetable" ], "time" : { "grow" : 10, "expire" : 60 }, "rewards" : [ ! { ! ! "type" : "coin", ! ! "rate" : 1, ! ! "min" : 5, ! ! "max" : 20, ! ! "code" : "" ! }, ! { ! ! "type" : "exp", ! ! "rate" : 1, ! ! "min" : 1, ! ! "max" : 2, ! ! "code" : "" ! }, ! { ! ! "type" : "item", ! ! "rate" : 1, ! ! "min" : 1, ! ! "max" : 1, ! ! "code" : "material_ichigo" ! } ]}
  24. 24. Mongo Tokyo 2011 - node.js + MongoDB
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×