MongoDB on Rails (and Ruby)

on   ruby and r
                                                       ails


                mongo berlin 2010

                jan krutisch <jan@krutisch.de>
                http://jan.krutisch.de/



Donnerstag, 7. Oktober 2010
I




Donnerstag, 7. Oktober 2010
Web Developer




                I




Donnerstag, 7. Oktober 2010
Web Developer




                I




Donnerstag, 7. Oktober 2010
Web Developer

                              github.com/halfbyte


                I




Donnerstag, 7. Oktober 2010
Web Developer

                               github.com/halfbyte


                I
                              jan.krutisch.de




Donnerstag, 7. Oktober 2010
Web Developer

                               github.com/halfbyte

                                     Tinkerer
                I
                              jan.krutisch.de




Donnerstag, 7. Oktober 2010
Web Developer

                               github.com/halfbyte

                                     Tinkerer
                I
                              jan.krutisch.de

                                         twitter.com/halfbyte



Donnerstag, 7. Oktober 2010
ruby




Donnerstag, 7. Oktober 2010
Find examples here:
                http://github.com/halfbyte/mongo_ruby_examples




Donnerstag, 7. Oktober 2010
Basic driver usage




Donnerstag, 7. Oktober 2010
gem install mongo bson_ext




Donnerstag, 7. Oktober 2010
init




Donnerstag, 7. Oktober 2010
getting connections




Donnerstag, 7. Oktober 2010
@connection = Mongo::Connection.new




Donnerstag, 7. Oktober 2010
@connection = Mongo::Connection.new(
                  'localhost',
                  27017,
                  :pool_size => 5,
                  :timeout => 20
                )




Donnerstag, 7. Oktober 2010
@connection = Mongo::Connection.from_uri(
                  "mongodb://localhost:27017/test"
                )




Donnerstag, 7. Oktober 2010
Choose a database.




Donnerstag, 7. Oktober 2010
@connection.database_names
                #=> ["admin", "local"]




Donnerstag, 7. Oktober 2010
@db = @connection['test']




Donnerstag, 7. Oktober 2010
@db = @connection.db('test')




Donnerstag, 7. Oktober 2010
collections




Donnerstag, 7. Oktober 2010
@collection = @db['books']




Donnerstag, 7. Oktober 2010
@collection = @db.collection('books')




Donnerstag, 7. Oktober 2010
subcollections




Donnerstag, 7. Oktober 2010
@collection = @db['books.reviews']




Donnerstag, 7. Oktober 2010
@collection = @db['books']['reviews']




Donnerstag, 7. Oktober 2010
CRUD




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
insert




Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                @db['quotes'].insert(doc)




Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                @db['quotes'].save(doc)




Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                @db['quotes'].save(doc)




Donnerstag, 7. Oktober 2010
safe (using getlasterror)




Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                @db['quotes'].save(doc, :safe => true)




Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                @db['quotes'].save(doc, :safe => true)




Donnerstag, 7. Oktober 2010
how about getting back
                an id?



Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                id = @db['quotes'].save(doc)




Donnerstag, 7. Oktober 2010
doc = {
                  :text => "You can observe a lot just by watching.",
                  :from => "Yogi Berra",
                  :created_at => Time.now
                }
                id = @db['quotes'].save(doc)




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
upsert




Donnerstag, 7. Oktober 2010
doc = @db['quotes'].find_one(id)

                doc[:from] = "Yogi Berra, famous baseball player"

                @db['quotes'].save(doc)




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
@db['quotes'].update(
                  {:_id => doc['_id']},
                  {
                    :from => "Yogi Berra",
                    :text => "You can observe a lot just by watching.",
                    :tags => ['baseball', 'wit']
                  }
                )




Donnerstag, 7. Oktober 2010
atomic updates




Donnerstag, 7. Oktober 2010
@db['quotes'].update(
                  {"from" => "Yogi Berra"},
                  {"$inc" => {"reads" => 1 } }
                )




Donnerstag, 7. Oktober 2010
@db['quotes'].update(
                  {"from" => "Yogi Berra"},
                  {"$inc" => {"reads" => 1 } }
                )




Donnerstag, 7. Oktober 2010
$inc          $addToSet
                $set          $pop
                $unset        $pull
                $push         $pullAll
                $pushAll      $


Donnerstag, 7. Oktober 2010
@db['people'].update(
                  {"tags" => "cool"},
                  "$addToSet" => {"tags" => 'froody'},
                  :multi => true
                )




Donnerstag, 7. Oktober 2010
@db['people'].update(
                  {"tags" => "cool"},
                  "$addToSet" => {"tags" => 'froody'},
                  :multi => true
                )




Donnerstag, 7. Oktober 2010
@db['people'].update(
                  {"tags" => "cool"},
                  {
                    "$addToSet" => {
                       "tags" => {
                         "$each" => ['froody', 'hoopy']
                       }
                     }
                  },
                  :safe => true,
                  :multi => true
                )




Donnerstag, 7. Oktober 2010
@db['people'].update(
                  {"tags" => "cool"},
                  {
                    "$addToSet" => {
                       "tags" => {
                         "$each" => ['froody', 'hoopy']
                       }
                     }
                  },
                  :safe => true,
                  :multi => true
                )




Donnerstag, 7. Oktober 2010
@db['people'].update(
                  {"tags" => "cool"},
                  {"$set" => {"tags.$" => "fresh"}},
                  :safe => true,
                  :multi => true
                )




Donnerstag, 7. Oktober 2010
@db['people'].update(
                  {"tags" => "cool"},
                  {"$set" => {"tags.$" => "fresh"}},
                  :safe => true,
                  :multi => true
                )




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
@db['people'].remove




Donnerstag, 7. Oktober 2010
@db['numbers'].remove(
                  {"$lt" => 30},
                  :safe => true
                )




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
Create Read Update Delete




Donnerstag, 7. Oktober 2010
all




Donnerstag, 7. Oktober 2010
@db['quotes'].find.each do |row|
                  puts row.inspect
                end




Donnerstag, 7. Oktober 2010
one




Donnerstag, 7. Oktober 2010
row = @db['quotes'].find_one




Donnerstag, 7. Oktober 2010
exact query




Donnerstag, 7. Oktober 2010
@db['quotes'].find(:from => "Yogi Berra")




Donnerstag, 7. Oktober 2010
more queries




Donnerstag, 7. Oktober 2010
100.times do |i|
                  db['numbers'].insert({"i" => i})
                end




Donnerstag, 7. Oktober 2010
db['numbers'].find("i" => {"$lt" => 2})




Donnerstag, 7. Oktober 2010
$lt           <
                $gt           >
                $lte          <=
                $gte          >=
                $ne           !=

Donnerstag, 7. Oktober 2010
@db['people'].find(
                  :tags => {
                    "$in" => ['cool', 'weird']
                  }
                )




Donnerstag, 7. Oktober 2010
obj = {
                  "_id"=>BSON::ObjectID('4c706af16261040680000369'),
                  "name"=>"Vernon Kreiger",
                  "address"=>{
                    "street"=>"536 Haleigh Locks",
                    "city"=>"Port Kiannahaven",
                    "zip"=>"80730-0214",
                    "country"=>"Fakistan"
                  },
                  "tags"=>["cool", "weird"]
                }




Donnerstag, 7. Oktober 2010
obj = {
                  "_id"=>BSON::ObjectID('4c706af16261040680000369'),
                  "name"=>"Vernon Kreiger",
                  "address"=>{
                    "street"=>"536 Haleigh Locks",
                    "city"=>"Port Kiannahaven",
                    "zip"=>"80730-0214",
                    "country"=>"Fakistan"
                  },
                  "tags"=>["cool", "weird"]
                }




Donnerstag, 7. Oktober 2010
$in           IN (2,3,4)
                $nin          NOT IN
                $all          [2,3] ~ [1,2,3]


Donnerstag, 7. Oktober 2010
$mod          yah, RLY
                $size         okay
                $exists       NOT NULL
                $type         huh?


Donnerstag, 7. Oktober 2010
Let‘s go deep.




Donnerstag, 7. Oktober 2010
@db['people'].find("address.city" => "Berlin")




Donnerstag, 7. Oktober 2010
@db['people'].find("address.city" => "Berlin")




Donnerstag, 7. Oktober 2010
/stand back/




Donnerstag, 7. Oktober 2010
@db['people'].find("address.city" => /haven/)




Donnerstag, 7. Oktober 2010
@db['people'].find("address.city" => /haven/)




Donnerstag, 7. Oktober 2010
I‘m in ur database,
                executin ur javascript



Donnerstag, 7. Oktober 2010
@db['numbers'].find("$where" => "this.i < 2")




Donnerstag, 7. Oktober 2010
boolsh




Donnerstag, 7. Oktober 2010
not




Donnerstag, 7. Oktober 2010
@db['numbers'].find(
                  "i" => {
                    "$not" => {"$lt" => 97}
                  }
                )




Donnerstag, 7. Oktober 2010
and




Donnerstag, 7. Oktober 2010
@db['numbers'].find(
                  "i" => {
                    "$lt" => 52,
                    "$gt" => 48
                  }
                )




Donnerstag, 7. Oktober 2010
or




Donnerstag, 7. Oktober 2010
@db['numbers'].find(
                  "$or" => [
                    {
                      "i" => { "$lt" => 2 }
                    },
                    {
                      "i" => { "$gt" => 97 }
                    }
                  ]
                )




Donnerstag, 7. Oktober 2010
Sorting




Donnerstag, 7. Oktober 2010
@db['people'].find().sort("address.street")




Donnerstag, 7. Oktober 2010
@db['people'].find().sort("address.street")




Donnerstag, 7. Oktober 2010
@db['people'].find().sort("address.street")




Donnerstag, 7. Oktober 2010
@db['people'].find().sort("address.street")




Donnerstag, 7. Oktober 2010
@db['people'].find().sort("address.street", :asc)




Donnerstag, 7. Oktober 2010
@db['people'].find().sort("address.street", :asc)




Donnerstag, 7. Oktober 2010
@db['people'].find().sort(
                  "address.street",
                  Mongo::ASCENDING
                )




Donnerstag, 7. Oktober 2010
@db['people'].find().sort(
                  "address.street",
                  Mongo::ASCENDING
                )




Donnerstag, 7. Oktober 2010
Pagination




Donnerstag, 7. Oktober 2010
@db['numbers'].find.sort("i").limit(10)




Donnerstag, 7. Oktober 2010
@db['numbers'].find.sort("i").limit(10).skip(50)




Donnerstag, 7. Oktober 2010
Aggregation




Donnerstag, 7. Oktober 2010
Countin‘ Bizness




Donnerstag, 7. Oktober 2010
@db['numbers'].find.count




Donnerstag, 7. Oktober 2010
Distinct




Donnerstag, 7. Oktober 2010
@db['people'].distinct('tags')




Donnerstag, 7. Oktober 2010
Group




Donnerstag, 7. Oktober 2010
Poor mans map/reduce




Donnerstag, 7. Oktober 2010
@db['people'].group(
                  ['created_at'],
                  {},
                  {:tags => {}},
                  reduce,
                  finalize
                )




Donnerstag, 7. Oktober 2010
@db['people'].group(
                  ['created_at'],
                  {},
                  {:tags => {}},
                  reduce,
                  finalize
                )




Donnerstag, 7. Oktober 2010
@db['people'].group(
                  ['created_at'],
                  {},
                  {:tags => {}},
                  reduce,
                  finalize
                )




Donnerstag, 7. Oktober 2010
@db['people'].group(
                  ['created_at'],
                  {},
                  {:tags => {}},
                  reduce,
                  finalize
                )




Donnerstag, 7. Oktober 2010
@db['people'].group(
                  ['created_at'],
                  {},
                  {:tags => {}},
                  reduce,
                  finalize
                )




Donnerstag, 7. Oktober 2010
function(doc, prev) {
                  for(i in doc.tags) {
                    if (doc.tags[i] in prev.tags) {
                      prev.tags[doc.tags[i]]++
                    } else {
                      prev.tags[doc.tags[i]] =1
                    }
                  }
                }




Donnerstag, 7. Oktober 2010
{"created_at"=>2010-09-19   22:00:00   UTC,   "tags"=>{"foo"=>11.0, "dumb"=>12.0, "stupid"=>7.0, "bar"=>7.0, "cool"=>14.0, "weird"=>17.0}}
                {"created_at"=>2010-09-20   22:00:00   UTC,   "tags"=>{"dumb"=>11.0, "stupid"=>5.0, "foo"=>10.0, "cool"=>8.0, "weird"=>9.0, "bar"=>15.0}}
                {"created_at"=>2010-09-22   22:00:00   UTC,   "tags"=>{"weird"=>15.0, "bar"=>9.0, "stupid"=>17.0, "cool"=>11.0, "dumb"=>10.0, "foo"=>12.0}}
                {"created_at"=>2010-09-15   22:00:00   UTC,   "tags"=>{"foo"=>11.0, "weird"=>7.0, "stupid"=>10.0, "cool"=>11.0, "bar"=>5.0, "dumb"=>8.0}}
                {"created_at"=>2010-09-25   22:00:00   UTC,   "tags"=>{"dumb"=>11.0, "weird"=>14.0, "cool"=>8.0, "foo"=>21.0, "bar"=>11.0, "stupid"=>13.0}}
                {"created_at"=>2010-09-28   22:00:00   UTC,   "tags"=>{"cool"=>11.0, "dumb"=>16.0, "stupid"=>11.0, "weird"=>15.0, "foo"=>9.0, "bar"=>16.0}}
                {"created_at"=>2010-09-10   22:00:00   UTC,   "tags"=>{"dumb"=>15.0, "weird"=>9.0, "bar"=>8.0, "cool"=>14.0, "stupid"=>11.0, "foo"=>11.0}}
                {"created_at"=>2010-09-03   22:00:00   UTC,   "tags"=>{"weird"=>14.0, "dumb"=>15.0, "stupid"=>11.0, "foo"=>16.0, "bar"=>20.0, "cool"=>10.0}}
                {"created_at"=>2010-09-21   22:00:00   UTC,   "tags"=>{"weird"=>15.0, "cool"=>14.0, "foo"=>13.0, "stupid"=>6.0, "bar"=>11.0, "dumb"=>9.0}}
                {"created_at"=>2010-09-23   22:00:00   UTC,   "tags"=>{"weird"=>15.0, "stupid"=>15.0, "dumb"=>15.0, "foo"=>16.0, "cool"=>10.0, "bar"=>11.0}}
                {"created_at"=>2010-09-29   22:00:00   UTC,   "tags"=>{"bar"=>9.0, "cool"=>14.0, "weird"=>16.0, "foo"=>8.0, "dumb"=>9.0, "stupid"=>12.0}}
                {"created_at"=>2010-09-27   22:00:00   UTC,   "tags"=>{"cool"=>13.0, "dumb"=>10.0, "stupid"=>12.0, "bar"=>8.0, "foo"=>16.0, "weird"=>13.0}}
                {"created_at"=>2010-09-04   22:00:00   UTC,   "tags"=>{"cool"=>11.0, "bar"=>9.0, "stupid"=>6.0, "weird"=>11.0, "dumb"=>8.0, "foo"=>11.0}}
                {"created_at"=>2010-09-08   22:00:00   UTC,   "tags"=>{"stupid"=>12.0, "dumb"=>11.0, "cool"=>15.0, "foo"=>11.0, "bar"=>9.0, "weird"=>8.0}}
                {"created_at"=>2010-10-02   22:00:00   UTC,   "tags"=>{"bar"=>8.0, "dumb"=>8.0, "cool"=>10.0, "foo"=>10.0, "stupid"=>8.0, "weird"=>6.0}}
                {"created_at"=>2010-09-24   22:00:00   UTC,   "tags"=>{"foo"=>13.0, "bar"=>12.0, "stupid"=>15.0, "weird"=>17.0, "dumb"=>7.0, "cool"=>10.0}}
                {"created_at"=>2010-09-30   22:00:00   UTC,   "tags"=>{"bar"=>10.0, "cool"=>6.0, "stupid"=>14.0, "weird"=>9.0, "dumb"=>12.0, "foo"=>19.0}}
                {"created_at"=>2010-09-05   22:00:00   UTC,   "tags"=>{"dumb"=>12.0, "foo"=>19.0, "weird"=>8.0, "stupid"=>8.0, "bar"=>7.0, "cool"=>10.0}}
                {"created_at"=>2010-09-17   22:00:00   UTC,   "tags"=>{"weird"=>13.0, "bar"=>14.0, "dumb"=>12.0, "foo"=>12.0, "stupid"=>10.0, "cool"=>9.0}}
                {"created_at"=>2010-09-18   22:00:00   UTC,   "tags"=>{"dumb"=>8.0, "cool"=>11.0, "foo"=>6.0, "bar"=>12.0, "weird"=>7.0, "stupid"=>6.0}}
                {"created_at"=>2010-09-09   22:00:00   UTC,   "tags"=>{"weird"=>11.0, "dumb"=>9.0, "foo"=>6.0, "bar"=>11.0, "cool"=>11.0, "stupid"=>6.0}}
                {"created_at"=>2010-09-13   22:00:00   UTC,   "tags"=>{"dumb"=>19.0, "stupid"=>9.0, "weird"=>12.0, "cool"=>11.0, "bar"=>10.0, "foo"=>15.0}}
                {"created_at"=>2010-09-16   22:00:00   UTC,   "tags"=>{"bar"=>6.0, "weird"=>8.0, "dumb"=>9.0, "cool"=>11.0, "stupid"=>17.0, "foo"=>15.0}}
                {"created_at"=>2010-09-11   22:00:00   UTC,   "tags"=>{"foo"=>10.0, "weird"=>9.0, "bar"=>8.0, "cool"=>4.0, "dumb"=>8.0, "stupid"=>9.0}}
                {"created_at"=>2010-09-26   22:00:00   UTC,   "tags"=>{"dumb"=>15.0, "weird"=>6.0, "stupid"=>15.0, "bar"=>10.0, "foo"=>13.0, "cool"=>15.0}}
                {"created_at"=>2010-10-01   22:00:00   UTC,   "tags"=>{"cool"=>7.0, "weird"=>11.0, "stupid"=>11.0, "bar"=>14.0, "foo"=>12.0, "dumb"=>11.0}}
                {"created_at"=>2010-09-12   22:00:00   UTC,   "tags"=>{"bar"=>7.0, "weird"=>12.0, "stupid"=>11.0, "cool"=>10.0, "foo"=>11.0, "dumb"=>9.0}}
                {"created_at"=>2010-09-14   22:00:00   UTC,   "tags"=>{"dumb"=>8.0, "foo"=>15.0, "cool"=>15.0, "stupid"=>15.0, "bar"=>7.0, "weird"=>14.0}}
                {"created_at"=>2010-09-07   22:00:00   UTC,   "tags"=>{"dumb"=>10.0, "cool"=>7.0, "foo"=>14.0, "weird"=>15.0, "bar"=>11.0, "stupid"=>7.0}}
                {"created_at"=>2010-09-06   22:00:00   UTC,   "tags"=>{"dumb"=>7.0, "bar"=>11.0, "cool"=>16.0, "weird"=>14.0, "foo"=>12.0, "stupid"=>6.0}}




Donnerstag, 7. Oktober 2010
{"created_at"=>2010-09-19   22:00:00   UTC,   "tags"=>{"foo"=>11.0, "dumb"=>12.0, "stupid"=>7.0, "bar"=>7.0, "cool"=>14.0, "weird"=>17.0}}
                {"created_at"=>2010-09-20   22:00:00   UTC,   "tags"=>{"dumb"=>11.0, "stupid"=>5.0, "foo"=>10.0, "cool"=>8.0, "weird"=>9.0, "bar"=>15.0}}
                {"created_at"=>2010-09-22   22:00:00   UTC,   "tags"=>{"weird"=>15.0, "bar"=>9.0, "stupid"=>17.0, "cool"=>11.0, "dumb"=>10.0, "foo"=>12.0}}
                {"created_at"=>2010-09-15   22:00:00   UTC,   "tags"=>{"foo"=>11.0, "weird"=>7.0, "stupid"=>10.0, "cool"=>11.0, "bar"=>5.0, "dumb"=>8.0}}
                {"created_at"=>2010-09-25   22:00:00   UTC,   "tags"=>{"dumb"=>11.0, "weird"=>14.0, "cool"=>8.0, "foo"=>21.0, "bar"=>11.0, "stupid"=>13.0}}
                {"created_at"=>2010-09-28   22:00:00   UTC,   "tags"=>{"cool"=>11.0, "dumb"=>16.0, "stupid"=>11.0, "weird"=>15.0, "foo"=>9.0, "bar"=>16.0}}
                {"created_at"=>2010-09-10   22:00:00   UTC,   "tags"=>{"dumb"=>15.0, "weird"=>9.0, "bar"=>8.0, "cool"=>14.0, "stupid"=>11.0, "foo"=>11.0}}
                {"created_at"=>2010-09-03   22:00:00   UTC,    "tags" => {
                                                              "tags"=>{"weird"=>14.0, "dumb"=>15.0, "stupid"=>11.0, "foo"=>16.0, "bar"=>20.0, "cool"=>10.0}}
                {"created_at"=>2010-09-21   22:00:00   UTC,   "tags"=>{"weird"=>15.0, "cool"=>14.0, "foo"=>13.0, "stupid"=>6.0, "bar"=>11.0, "dumb"=>9.0}}
                {"created_at"=>2010-09-23
                {"created_at"=>2010-09-29
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,
                                                                 "foo" => 11.0,
                                                              "tags"=>{"weird"=>15.0, "stupid"=>15.0, "dumb"=>15.0, "foo"=>16.0, "cool"=>10.0, "bar"=>11.0}}
                                                              "tags"=>{"bar"=>9.0, "cool"=>14.0, "weird"=>16.0, "foo"=>8.0, "dumb"=>9.0, "stupid"=>12.0}}
                {"created_at"=>2010-09-27
                {"created_at"=>2010-09-04
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,
                                                                 "dumb" => 12.0,
                                                              "tags"=>{"cool"=>13.0, "dumb"=>10.0, "stupid"=>12.0, "bar"=>8.0, "foo"=>16.0, "weird"=>13.0}}
                                                              "tags"=>{"cool"=>11.0, "bar"=>9.0, "stupid"=>6.0, "weird"=>11.0, "dumb"=>8.0, "foo"=>11.0}}
                {"created_at"=>2010-09-08
                {"created_at"=>2010-10-02
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,
                                                                 "stupid" => 7.0,
                                                              "tags"=>{"stupid"=>12.0, "dumb"=>11.0, "cool"=>15.0, "foo"=>11.0, "bar"=>9.0, "weird"=>8.0}}
                                                              "tags"=>{"bar"=>8.0, "dumb"=>8.0, "cool"=>10.0, "foo"=>10.0, "stupid"=>8.0, "weird"=>6.0}}
                {"created_at"=>2010-09-24
                {"created_at"=>2010-09-30
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,
                                                                 "bar" => 7.0,
                                                              "tags"=>{"foo"=>13.0, "bar"=>12.0, "stupid"=>15.0, "weird"=>17.0, "dumb"=>7.0, "cool"=>10.0}}
                                                              "tags"=>{"bar"=>10.0, "cool"=>6.0, "stupid"=>14.0, "weird"=>9.0, "dumb"=>12.0, "foo"=>19.0}}
                {"created_at"=>2010-09-05
                {"created_at"=>2010-09-17
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,
                                                                 "cool" => 14.0,
                                                              "tags"=>{"dumb"=>12.0, "foo"=>19.0, "weird"=>8.0, "stupid"=>8.0, "bar"=>7.0, "cool"=>10.0}}
                                                              "tags"=>{"weird"=>13.0, "bar"=>14.0, "dumb"=>12.0, "foo"=>12.0, "stupid"=>10.0, "cool"=>9.0}}
                {"created_at"=>2010-09-18
                {"created_at"=>2010-09-09
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,      "weird" => 17.0
                                                              "tags"=>{"dumb"=>8.0, "cool"=>11.0, "foo"=>6.0, "bar"=>12.0, "weird"=>7.0, "stupid"=>6.0}}
                                                              "tags"=>{"weird"=>11.0, "dumb"=>9.0, "foo"=>6.0, "bar"=>11.0, "cool"=>11.0, "stupid"=>6.0}}
                {"created_at"=>2010-09-13
                {"created_at"=>2010-09-16
                                            22:00:00
                                            22:00:00
                                                       UTC,
                                                       UTC,    }
                                                              "tags"=>{"dumb"=>19.0, "stupid"=>9.0, "weird"=>12.0, "cool"=>11.0, "bar"=>10.0, "foo"=>15.0}}
                                                              "tags"=>{"bar"=>6.0, "weird"=>8.0, "dumb"=>9.0, "cool"=>11.0, "stupid"=>17.0, "foo"=>15.0}}
                {"created_at"=>2010-09-11   22:00:00   UTC,   "tags"=>{"foo"=>10.0, "weird"=>9.0, "bar"=>8.0, "cool"=>4.0, "dumb"=>8.0, "stupid"=>9.0}}
                {"created_at"=>2010-09-26   22:00:00   UTC,   "tags"=>{"dumb"=>15.0, "weird"=>6.0, "stupid"=>15.0, "bar"=>10.0, "foo"=>13.0, "cool"=>15.0}}
                {"created_at"=>2010-10-01   22:00:00   UTC,   "tags"=>{"cool"=>7.0, "weird"=>11.0, "stupid"=>11.0, "bar"=>14.0, "foo"=>12.0, "dumb"=>11.0}}
                {"created_at"=>2010-09-12   22:00:00   UTC,   "tags"=>{"bar"=>7.0, "weird"=>12.0, "stupid"=>11.0, "cool"=>10.0, "foo"=>11.0, "dumb"=>9.0}}
                {"created_at"=>2010-09-14   22:00:00   UTC,   "tags"=>{"dumb"=>8.0, "foo"=>15.0, "cool"=>15.0, "stupid"=>15.0, "bar"=>7.0, "weird"=>14.0}}
                {"created_at"=>2010-09-07   22:00:00   UTC,   "tags"=>{"dumb"=>10.0, "cool"=>7.0, "foo"=>14.0, "weird"=>15.0, "bar"=>11.0, "stupid"=>7.0}}
                {"created_at"=>2010-09-06   22:00:00   UTC,   "tags"=>{"dumb"=>7.0, "bar"=>11.0, "cool"=>16.0, "weird"=>14.0, "foo"=>12.0, "stupid"=>6.0}}




Donnerstag, 7. Oktober 2010
function(prev) {
                  var mostPopular = 0;
                  for(i in prev.tags) {
                    if(prev.tags[i] > mostPopular) {
                      prev.tag = i;
                      prev.count = prev.tags[i];
                      mostPopular = prev.tags[i];
                    }
                  }
                  delete prev.tags
                }




Donnerstag, 7. Oktober 2010
{"created_at"=>2010-09-27   22:00:00   UTC,   "tag"=>"stupid", "count"=>18.0}
                {"created_at"=>2010-09-29   22:00:00   UTC,   "tag"=>"stupid", "count"=>20.0}
                {"created_at"=>2010-09-12   22:00:00   UTC,   "tag"=>"cool", "count"=>11.0}
                {"created_at"=>2010-09-04   22:00:00   UTC,   "tag"=>"stupid", "count"=>12.0}
                {"created_at"=>2010-09-21   22:00:00   UTC,   "tag"=>"stupid", "count"=>16.0}
                {"created_at"=>2010-09-03   22:00:00   UTC,   "tag"=>"foo", "count"=>15.0}
                {"created_at"=>2010-09-26   22:00:00   UTC,   "tag"=>"foo", "count"=>17.0}
                {"created_at"=>2010-09-18   22:00:00   UTC,   "tag"=>"foo", "count"=>17.0}
                {"created_at"=>2010-09-24   22:00:00   UTC,   "tag"=>"cool", "count"=>11.0}




Donnerstag, 7. Oktober 2010
Map / Reduce




Donnerstag, 7. Oktober 2010
collection = @db['people'].map_reduce(
                  map, reduce
                )
                collection.find()




Donnerstag, 7. Oktober 2010
function() {
                  this.tags.forEach(function(z) {
                    emit(z, {count: 1});
                  });
                }




Donnerstag, 7. Oktober 2010
function(key, values) {
                  var total = 0;
                  values.forEach(function(v) { total += v.count });
                  return {count: total}
                }




Donnerstag, 7. Oktober 2010
Indexes




Donnerstag, 7. Oktober 2010
db['people'].create_index("tags")

                @db['people'].create_index(
                  [["tags", Mongo::ASCENDING]]
                )

                db['people'].drop_index("tags_1")

                db['people'].drop_indexes

                db['people'].index_information




Donnerstag, 7. Oktober 2010
Geospatial stuff




Donnerstag, 7. Oktober 2010
@db['people'].create_index(
                  [["latlng", Mongo::GEO2D]]
                )




Donnerstag, 7. Oktober 2010
@db['people'].find(
                  "latlng" => {"$near" => [53.593978, 10.107380]}
                )




Donnerstag, 7. Oktober 2010
GridFS usage




Donnerstag, 7. Oktober 2010
grid = Mongo::Grid.new(@db)

                id = grid.put("You can put Strings in here",
                  :filename => 'test.txt')

                file = grid.get(id)

                file.filename
                file.read

                grid.delete(id)

                grid.put(
                  File.open("/Users/jankrutisch/Dropbox/Photos/IMGP8989.jpg")
                )




Donnerstag, 7. Oktober 2010
fs = Mongo::GridFileSystem.new(db)

                fs.open("test.txt", "w") do |f|
                  f.write "You can put stuff in here"
                end

                fs.open("test.txt", "r") do |f|
                  puts f.read
                end

                fs.delete("test.txt")




Donnerstag, 7. Oktober 2010
Capped collections




Donnerstag, 7. Oktober 2010
@db.create_collection('capped_numbers',
                  :capped => true,
                  :max => 50
                )


                @db.create_collection('capped_numbers',
                  :capped => true,
                  :size => 1024 * 64
                )




Donnerstag, 7. Oktober 2010
explain




Donnerstag, 7. Oktober 2010
@db['people'].find(
                  "address.city" => /haven/
                ).explain




Donnerstag, 7. Oktober 2010
@db['people'].find(
                  "address.city" => /haven/
                ).explain




Donnerstag, 7. Oktober 2010
{
                     "cursor"=>"BasicCursor",
                     "nscanned"=>1000,
                     "nscannedObjects"=>1000,
                     "n"=>39, "millis"=>2,
                     "indexBounds"=>{},
                     "allPlans"=>[
                       {"cursor"=>"BasicCursor", "indexBounds"=>{}}
                     ]
                }




Donnerstag, 7. Oktober 2010
{
                     "cursor"=>"BtreeCursor address.city_1 multi",
                     "nscanned"=>1000,
                     "nscannedObjects"=>39,
                     "n"=>39, "millis"=>1,
                     "indexBounds"=>{
                       "address.city"=>[["", {}], [/haven/, /haven/]]
                     },
                     "allPlans"=>[
                        {
                          "cursor"=>"BtreeCursor address.city_1 multi",
                          "indexBounds"=>{
                            "address.city"=>[["", {}], [/haven/, /haven/]]
                          }
                        }
                     ]
                }




Donnerstag, 7. Oktober 2010
misc commands




Donnerstag, 7. Oktober 2010
@db.stats


                {
                     "collections"=>4,
                     "objects"=>1011,
                     "avgObjSize"=>244.6330365974283,
                     "dataSize"=>247324,
                     "storageSize"=>345600,
                     "numExtents"=>6,
                     "indexes"=>3,
                     "indexSize"=>114688,
                     "fileSize"=>201326592,
                     "ok"=>1.0
                }




Donnerstag, 7. Oktober 2010
@db.add_stored_function(
                  "tag_size",
                  "function(obj) {return obj.tags.length}"
                )

                @db['people'].find(
                  "$where" => 'tag_size(this) === 2'
                )




Donnerstag, 7. Oktober 2010
@db.add_stored_function(
                  "tag_size",
                  "function(obj) {return obj.tags.length}"
                )

                @db['people'].find(
                  "$where" => 'tag_size(this) === 2'
                )




Donnerstag, 7. Oktober 2010
Libraries




Donnerstag, 7. Oktober 2010
mongo_mapper




Donnerstag, 7. Oktober 2010
John Nunemaker
                @jnunemaker



Donnerstag, 7. Oktober 2010
is in production




Donnerstag, 7. Oktober 2010
documentation?




Donnerstag, 7. Oktober 2010
Donnerstag, 7. Oktober 2010
how to




Donnerstag, 7. Oktober 2010
rails initializer




Donnerstag, 7. Oktober 2010
# config/initializers/mongo_mapper.rb
                mongo_config = YAML.load_file(
                  File.join(Rails.root, 'config','mongomapper.yml')
                )
                MongoMapper.setup(mongo_config, Rails.env)




Donnerstag, 7. Oktober 2010
a simple example




Donnerstag, 7. Oktober 2010
MongoMapper.connection = @connection
                MongoMapper.database = "test"

                class Quote
                  include MongoMapper::Document
                  key :from
                  key :text
                  key :views, Integer
                  timestamps!
                end




Donnerstag, 7. Oktober 2010
finders




Donnerstag, 7. Oktober 2010
Quote.where(:from => 'Yogi Berra').all


                Quote.where(:from => 'Yogi Berra').limit(5).sort(:from.desc).all




Donnerstag, 7. Oktober 2010
embedded docs




Donnerstag, 7. Oktober 2010
class Person
                  include MongoMapper::Document
                  key :name
                  one :address
                  key :tags, Array
                end

                class Address
                  include MongoMapper::Document
                  key :street
                  key :city
                  key :country
                  key :zip
                end




Donnerstag, 7. Oktober 2010
person = Person.first
                address = Person.first.address




Donnerstag, 7. Oktober 2010
scopes




Donnerstag, 7. Oktober 2010
class Person
                  scope :tagged, lambda { |tag| where(:tags.in => [tag]) }
                end

                puts Person.tagged('cool').first.inspect




Donnerstag, 7. Oktober 2010
new website coming soon




Donnerstag, 7. Oktober 2010
new website coming soon
                              U
                                                           l re ad y s a id t h at
                                n f o rt u n ate l y I‘ve a ug us t
                                          @ FrOS CON i n A




Donnerstag, 7. Oktober 2010
new website coming soon
                              U
                                                           l re ad y s a id t h at
                                n f o rt u n ate l y I‘ve a ug us t
                                          @ FrOS CON i n A




Donnerstag, 7. Oktober 2010
mongoid




Donnerstag, 7. Oktober 2010
Durran Jordan
                (of Hashrocket)



Donnerstag, 7. Oktober 2010
Two major versions




Donnerstag, 7. Oktober 2010
1.x (1.9.x) targeting
                Rails 2.3.x



Donnerstag, 7. Oktober 2010
2.x (2.0beta) targeting
                Rails 3.0



Donnerstag, 7. Oktober 2010
Good documentation




Donnerstag, 7. Oktober 2010
Donnerstag, 7. Oktober 2010
rails initializer




Donnerstag, 7. Oktober 2010
File.open(File.join(RAILS_ROOT, 'config/mongodb.yml'), 'r') do |f|
                  @settings = YAML.load(f)[RAILS_ENV]
                end

                Mongoid::Config.instance.from_hash(@settings)




Donnerstag, 7. Oktober 2010
a simple example




Donnerstag, 7. Oktober 2010
class Quote
                  include Mongoid::Document
                  include Mongoid::Timestamps
                  field :from
                  field :text
                  field :views, :type => Integer
                end




Donnerstag, 7. Oktober 2010
finders




Donnerstag, 7. Oktober 2010
Quote.where(:from => 'Yogi Berra').all


                Quote.where(:from => 'Yogi Berra').limit(5).order_by(:from.desc).all




Donnerstag, 7. Oktober 2010
embedded docs




Donnerstag, 7. Oktober 2010
class Person
                  include Mongoid::Document
                  field :name
                  embeds_one :address
                  field :tags, :type => Array
                end

                class Address
                  include Mongoid::Document
                  field :street
                  field :city
                  field :country
                  field :zip
                end




Donnerstag, 7. Oktober 2010
person = Person.first
                address = Person.first.address




Donnerstag, 7. Oktober 2010
scopes




Donnerstag, 7. Oktober 2010
class Person
                  scope :tagged, lambda { |tag| where(:tags.in => [tag]) }
                end

                puts Person.tagged('cool').first.inspect




Donnerstag, 7. Oktober 2010
More features




Donnerstag, 7. Oktober 2010
atomic updates




Donnerstag, 7. Oktober 2010
mongoid tries to be
                clever



Donnerstag, 7. Oktober 2010
(using the „dirty“ flags)




Donnerstag, 7. Oktober 2010
(it‘s probably better to
                bypass the ODM
                sometimes)


Donnerstag, 7. Oktober 2010
GridFS




Donnerstag, 7. Oktober 2010
external libraries for
                both



Donnerstag, 7. Oktober 2010
mongo_mapper > grip




Donnerstag, 7. Oktober 2010
mongoid > mongoid_grid




Donnerstag, 7. Oktober 2010
validations




Donnerstag, 7. Oktober 2010
both through ActiveModel
                or validatable (Rails <3)



Donnerstag, 7. Oktober 2010
Other noteworthy
                libraries



Donnerstag, 7. Oktober 2010
The „ORM“ variant




Donnerstag, 7. Oktober 2010
mongodoc



      http://github.com/leshill/mongodoc

Donnerstag, 7. Oktober 2010
mongo-record



      http://github.com/mongodb/mongo-record
Donnerstag, 7. Oktober 2010
mongomodel



        http://github.com/spohlenz/mongomodel
Donnerstag, 7. Oktober 2010
mongomatic



        http://github.com/benmyles/mongomatic
Donnerstag, 7. Oktober 2010
Queues




Donnerstag, 7. Oktober 2010
mongo_queue



            http://github.com/Skiz/mongo_queue
Donnerstag, 7. Oktober 2010
mongo_queue
                    L as t c  omm i t o n g i t h ub.c om i n M a rch .. .




            http://github.com/Skiz/mongo_queue
Donnerstag, 7. Oktober 2010
resque-mongo



  http://github.com/ctrochalakis/resque-mongo
Donnerstag, 7. Oktober 2010
resque-mongo  L as t c omm i t o n g i t h ub.c om i n Ja n u a r y.. .




  http://github.com/ctrochalakis/resque-mongo
Donnerstag, 7. Oktober 2010
Misc




Donnerstag, 7. Oktober 2010
em-mongo



                 http://github.com/bcg/em-mongo
Donnerstag, 7. Oktober 2010
dm-mongo-adapter



   http://github.com/solnic/dm-mongo-adapter
Donnerstag, 7. Oktober 2010
questions? injuries?




Donnerstag, 7. Oktober 2010
I




Donnerstag, 7. Oktober 2010
thanks for listening.
                ‣     http://www.mongodb.org/
                ‣     http://www.mongoid.org/
                ‣     http://github.com/jnunemaker/mongo_mapper
                ‣     http://github.com/halfbyte/mongo_ruby_examples

                ‣     jan@krutisch.de
                ‣     http://jan.krutisch.de/
                ‣     http://github.com/halfbyte/
                ‣     http://twitter.com/halfbyte
                ‣     http://www.mindmatters.de/


Donnerstag, 7. Oktober 2010
1 of 213

Recommended

Mongodb railscamphh by
Mongodb railscamphhMongodb railscamphh
Mongodb railscamphhjan_mindmatters
1.2K views184 slides
Large problems, Mostly Solved by
Large problems, Mostly SolvedLarge problems, Mostly Solved
Large problems, Mostly Solvedericholscher
1.4K views98 slides
HTML 5: The Future of the Web by
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the WebTim Wright
3.8K views108 slides
GeeCON Prague 2014 - Metaprogramming with Groovy by
GeeCON Prague 2014 - Metaprogramming with GroovyGeeCON Prague 2014 - Metaprogramming with Groovy
GeeCON Prague 2014 - Metaprogramming with GroovyIván López Martín
1.3K views116 slides
Dojo Basics Js UserGroup Chicago by
Dojo Basics Js UserGroup ChicagoDojo Basics Js UserGroup Chicago
Dojo Basics Js UserGroup Chicagowolframkriesing
1.1K views20 slides
Idiots guide to jquery by
Idiots guide to jqueryIdiots guide to jquery
Idiots guide to jqueryMark Casias
1.1K views21 slides

More Related Content

What's hot

Steam Learn: Javascript and OOP by
Steam Learn: Javascript and OOPSteam Learn: Javascript and OOP
Steam Learn: Javascript and OOPinovia
399 views49 slides
Web Development With Ruby - From Simple To Complex by
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexBrian Hogan
4.8K views63 slides
Super heroes training_simulator by
Super heroes training_simulatorSuper heroes training_simulator
Super heroes training_simulatorjoustin12
68 views23 slides
09 Data by
09 Data09 Data
09 DataMahmoud
1.6K views166 slides
03 Custom Classes by
03 Custom Classes03 Custom Classes
03 Custom ClassesMahmoud
1K views149 slides
Grails build-test-data Plugin by
Grails build-test-data PluginGrails build-test-data Plugin
Grails build-test-data PluginTed Naleid
4.1K views45 slides

What's hot(13)

Steam Learn: Javascript and OOP by inovia
Steam Learn: Javascript and OOPSteam Learn: Javascript and OOP
Steam Learn: Javascript and OOP
inovia399 views
Web Development With Ruby - From Simple To Complex by Brian Hogan
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To Complex
Brian Hogan4.8K views
Super heroes training_simulator by joustin12
Super heroes training_simulatorSuper heroes training_simulator
Super heroes training_simulator
joustin1268 views
09 Data by Mahmoud
09 Data09 Data
09 Data
Mahmoud 1.6K views
03 Custom Classes by Mahmoud
03 Custom Classes03 Custom Classes
03 Custom Classes
Mahmoud 1K views
Grails build-test-data Plugin by Ted Naleid
Grails build-test-data PluginGrails build-test-data Plugin
Grails build-test-data Plugin
Ted Naleid4.1K views
Not Only Drupal by mcantelon
Not Only DrupalNot Only Drupal
Not Only Drupal
mcantelon2.3K views
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett by mfrancis
Cook Up a Runtime with The New OSGi Resolver - Neil BartlettCook Up a Runtime with The New OSGi Resolver - Neil Bartlett
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett
mfrancis1.2K views
MongoD Essentials by zahid-mian
MongoD EssentialsMongoD Essentials
MongoD Essentials
zahid-mian424 views
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz by PROIDEA
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
PROIDEA233 views
Bookmarklet型(云端)应用的前端架构 by Chappell.Wat
Bookmarklet型(云端)应用的前端架构Bookmarklet型(云端)应用的前端架构
Bookmarklet型(云端)应用的前端架构
Chappell.Wat240 views

Viewers also liked

realtime audio on ze web @ hhjs by
realtime audio on ze web @ hhjsrealtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsjan_mindmatters
1.2K views32 slides
Rails i18n - Railskonferenz 2007 by
Rails i18n - Railskonferenz 2007Rails i18n - Railskonferenz 2007
Rails i18n - Railskonferenz 2007jan_mindmatters
1.2K views213 slides
Railsrumble railscamphh 2010 by
Railsrumble railscamphh 2010Railsrumble railscamphh 2010
Railsrumble railscamphh 2010jan_mindmatters
733 views42 slides
Mongodb on Ruby And Rails (froscon 2010) by
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)jan_mindmatters
1.5K views183 slides
Ruby for Artists and Tinkerers. A non-presentation. by
Ruby for Artists and Tinkerers. A non-presentation.Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.jan_mindmatters
1K views23 slides
Manila seminar by
Manila seminarManila seminar
Manila seminarSven Van Stichel
972 views113 slides

Viewers also liked(12)

realtime audio on ze web @ hhjs by jan_mindmatters
realtime audio on ze web @ hhjsrealtime audio on ze web @ hhjs
realtime audio on ze web @ hhjs
jan_mindmatters1.2K views
Rails i18n - Railskonferenz 2007 by jan_mindmatters
Rails i18n - Railskonferenz 2007Rails i18n - Railskonferenz 2007
Rails i18n - Railskonferenz 2007
jan_mindmatters1.2K views
Mongodb on Ruby And Rails (froscon 2010) by jan_mindmatters
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)
jan_mindmatters1.5K views
Ruby for Artists and Tinkerers. A non-presentation. by jan_mindmatters
Ruby for Artists and Tinkerers. A non-presentation.Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.
jan_mindmatters1K views
E. A. Draffan (University of Southampton), Accessibility of etext, ebooks and... by TISP Project
E. A. Draffan (University of Southampton), Accessibility of etext, ebooks and...E. A. Draffan (University of Southampton), Accessibility of etext, ebooks and...
E. A. Draffan (University of Southampton), Accessibility of etext, ebooks and...
TISP Project719 views
Open Source Hardware - Of makers and tinkerers by jan_mindmatters
Open Source Hardware - Of makers and tinkerersOpen Source Hardware - Of makers and tinkerers
Open Source Hardware - Of makers and tinkerers
jan_mindmatters1.6K views
Digital Divide: Connecting Students to Electronic Text by David Cain
Digital Divide: Connecting Students to Electronic TextDigital Divide: Connecting Students to Electronic Text
Digital Divide: Connecting Students to Electronic Text
David Cain580 views
Achterman csla 2011reading_online by dachterman
Achterman csla 2011reading_onlineAchterman csla 2011reading_online
Achterman csla 2011reading_online
dachterman2.1K views
YALSA eReading 2012 by jasongkurtz
YALSA eReading 2012YALSA eReading 2012
YALSA eReading 2012
jasongkurtz611 views
Ebooks in the Academy: Impacts on Learning and Pedagogy by Beth Transue
Ebooks in the Academy: Impacts on Learning and PedagogyEbooks in the Academy: Impacts on Learning and Pedagogy
Ebooks in the Academy: Impacts on Learning and Pedagogy
Beth Transue2.7K views

Similar to MongoDB on Rails (and Ruby)

Opening up the Social Web - Standards that are bridging the Islands by
Opening up the Social Web - Standards that are bridging the Islands Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the Islands Bastian Hofmann
1.7K views55 slides
Mongo db by
Mongo dbMongo db
Mongo dbAntonio Terreno
710 views31 slides
Riak Intro by
Riak IntroRiak Intro
Riak IntroJon Meredith
707 views54 slides
Building Brilliant APIs by
Building Brilliant APIsBuilding Brilliant APIs
Building Brilliant APIsbencollier
682 views49 slides
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer by
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerOSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerNETWAYS
49 views58 slides
Deciphering the Interoperable Web by
Deciphering the Interoperable WebDeciphering the Interoperable Web
Deciphering the Interoperable WebMichael Bleigh
1.4K views67 slides

Similar to MongoDB on Rails (and Ruby)(20)

Opening up the Social Web - Standards that are bridging the Islands by Bastian Hofmann
Opening up the Social Web - Standards that are bridging the Islands Opening up the Social Web - Standards that are bridging the Islands
Opening up the Social Web - Standards that are bridging the Islands
Bastian Hofmann1.7K views
Building Brilliant APIs by bencollier
Building Brilliant APIsBuilding Brilliant APIs
Building Brilliant APIs
bencollier682 views
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer by NETWAYS
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerOSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
NETWAYS49 views
Deciphering the Interoperable Web by Michael Bleigh
Deciphering the Interoperable WebDeciphering the Interoperable Web
Deciphering the Interoperable Web
Michael Bleigh1.4K views
Dev festasia manila-social_pub by timothyjordan
Dev festasia manila-social_pubDev festasia manila-social_pub
Dev festasia manila-social_pub
timothyjordan608 views
Document-Oriented Databases: Couchdb Primer by jsiarto
Document-Oriented Databases: Couchdb PrimerDocument-Oriented Databases: Couchdb Primer
Document-Oriented Databases: Couchdb Primer
jsiarto1.5K views
Continuous Integration Testing for Plone Using Hudson by Eric Steele
Continuous Integration Testing for Plone Using HudsonContinuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using Hudson
Eric Steele1.1K views
An Overview of HTML5 Storage by Paul Irish
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
Paul Irish2.5K views
Ruby on CouchDB - SimplyStored and RockingChair by Jonathan Weiss
Ruby on CouchDB - SimplyStored and RockingChairRuby on CouchDB - SimplyStored and RockingChair
Ruby on CouchDB - SimplyStored and RockingChair
Jonathan Weiss882 views
OSMC2010 Open NMS Kickstart by Ronny
OSMC2010 Open NMS KickstartOSMC2010 Open NMS Kickstart
OSMC2010 Open NMS Kickstart
Ronny1.2K views
Html5/CSS3 in shanghai 2010 by Zi Bin Cheah
Html5/CSS3 in shanghai 2010Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010
Zi Bin Cheah997 views
Say no to var_dump by benwaine
Say no to var_dumpSay no to var_dump
Say no to var_dump
benwaine1.4K views

More from jan_mindmatters

10 fun projects to improve your coding skills by
10 fun projects to improve your coding skills10 fun projects to improve your coding skills
10 fun projects to improve your coding skillsjan_mindmatters
22.3K views41 slides
MongoDB & Mongomapper 4 real by
MongoDB & Mongomapper 4 realMongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realjan_mindmatters
11.9K views104 slides
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less by
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & lessLiebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & lessjan_mindmatters
1.1K views184 slides
Facebook mit Rails und Facebooker by
Facebook mit Rails und FacebookerFacebook mit Rails und Facebooker
Facebook mit Rails und Facebookerjan_mindmatters
799 views72 slides
Show the frontend some love - HAML, SASS and COMPASS by
Show the frontend some love - HAML, SASS and COMPASSShow the frontend some love - HAML, SASS and COMPASS
Show the frontend some love - HAML, SASS and COMPASSjan_mindmatters
1.2K views180 slides
HAML / SASS and COMPASS by
HAML / SASS and COMPASSHAML / SASS and COMPASS
HAML / SASS and COMPASSjan_mindmatters
1.2K views109 slides

More from jan_mindmatters(8)

10 fun projects to improve your coding skills by jan_mindmatters
10 fun projects to improve your coding skills10 fun projects to improve your coding skills
10 fun projects to improve your coding skills
jan_mindmatters22.3K views
MongoDB & Mongomapper 4 real by jan_mindmatters
MongoDB & Mongomapper 4 realMongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 real
jan_mindmatters11.9K views
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less by jan_mindmatters
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & lessLiebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
jan_mindmatters1.1K views
Facebook mit Rails und Facebooker by jan_mindmatters
Facebook mit Rails und FacebookerFacebook mit Rails und Facebooker
Facebook mit Rails und Facebooker
jan_mindmatters799 views
Show the frontend some love - HAML, SASS and COMPASS by jan_mindmatters
Show the frontend some love - HAML, SASS and COMPASSShow the frontend some love - HAML, SASS and COMPASS
Show the frontend some love - HAML, SASS and COMPASS
jan_mindmatters1.2K views

Recently uploaded

PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
127 views17 slides
Melek BEN MAHMOUD.pdf by
Melek BEN MAHMOUD.pdfMelek BEN MAHMOUD.pdf
Melek BEN MAHMOUD.pdfMelekBenMahmoud
14 views1 slide
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
26 views45 slides
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
368 views92 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
33 views43 slides
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
19 views15 slides

Recently uploaded(20)

PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi127 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Powerful Google developer tools for immediate impact! (2023-24) by wesley chun
Powerful Google developer tools for immediate impact! (2023-24)Powerful Google developer tools for immediate impact! (2023-24)
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun10 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 views

MongoDB on Rails (and Ruby)