SlideShare a Scribd company logo
1 of 213
Download to read offline
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

More Related Content

What's hot

Steam Learn: Javascript and OOP
Steam Learn: Javascript and OOPSteam Learn: Javascript and OOP
Steam Learn: Javascript and OOPinovia
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexBrian Hogan
 
Super heroes training_simulator
Super heroes training_simulatorSuper heroes training_simulator
Super heroes training_simulatorjoustin12
 
03 Custom Classes
03 Custom Classes03 Custom Classes
03 Custom ClassesMahmoud
 
Grails build-test-data Plugin
Grails build-test-data PluginGrails build-test-data Plugin
Grails build-test-data PluginTed Naleid
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupalmcantelon
 
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett
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 Bartlettmfrancis
 
MongoD Essentials
MongoD EssentialsMongoD Essentials
MongoD Essentialszahid-mian
 
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik PrzybyszPROIDEA
 
Distributed Social Networking
Distributed Social NetworkingDistributed Social Networking
Distributed Social NetworkingBastian Hofmann
 
Bookmarklet型(云端)应用的前端架构
Bookmarklet型(云端)应用的前端架构Bookmarklet型(云端)应用的前端架构
Bookmarklet型(云端)应用的前端架构Chappell.Wat
 

What's hot (13)

Steam Learn: Javascript and OOP
Steam Learn: Javascript and OOPSteam Learn: Javascript and OOP
Steam Learn: Javascript and OOP
 
Web Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To Complex
 
Super heroes training_simulator
Super heroes training_simulatorSuper heroes training_simulator
Super heroes training_simulator
 
09 Data
09 Data09 Data
09 Data
 
03 Custom Classes
03 Custom Classes03 Custom Classes
03 Custom Classes
 
Grails build-test-data Plugin
Grails build-test-data PluginGrails build-test-data Plugin
Grails build-test-data Plugin
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupal
 
When?, Why? and What? of MongoDB
When?, Why? and What? of MongoDBWhen?, Why? and What? of MongoDB
When?, Why? and What? of MongoDB
 
Cook Up a Runtime with The New OSGi Resolver - Neil Bartlett
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
 
MongoD Essentials
MongoD EssentialsMongoD Essentials
MongoD Essentials
 
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
4Developers 2015: Testowanie ze Spockiem - Dominik Przybysz
 
Distributed Social Networking
Distributed Social NetworkingDistributed Social Networking
Distributed Social Networking
 
Bookmarklet型(云端)应用的前端架构
Bookmarklet型(云端)应用的前端架构Bookmarklet型(云端)应用的前端架构
Bookmarklet型(云端)应用的前端架构
 

Viewers also liked

realtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsrealtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsjan_mindmatters
 
Rails i18n - Railskonferenz 2007
Rails i18n - Railskonferenz 2007Rails i18n - Railskonferenz 2007
Rails i18n - Railskonferenz 2007jan_mindmatters
 
Railsrumble railscamphh 2010
Railsrumble railscamphh 2010Railsrumble railscamphh 2010
Railsrumble railscamphh 2010jan_mindmatters
 
Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)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.
Ruby for Artists and Tinkerers. A non-presentation.jan_mindmatters
 
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...
E. A. Draffan (University of Southampton), Accessibility of etext, ebooks and...TISP Project
 
Open Source Hardware - Of makers and tinkerers
Open Source Hardware - Of makers and tinkerersOpen Source Hardware - Of makers and tinkerers
Open Source Hardware - Of makers and tinkerersjan_mindmatters
 
Digital Divide: Connecting Students to Electronic Text
Digital Divide: Connecting Students to Electronic TextDigital Divide: Connecting Students to Electronic Text
Digital Divide: Connecting Students to Electronic TextDavid Cain
 
Achterman csla 2011reading_online
Achterman csla 2011reading_onlineAchterman csla 2011reading_online
Achterman csla 2011reading_onlinedachterman
 
YALSA eReading 2012
YALSA eReading 2012YALSA eReading 2012
YALSA eReading 2012jasongkurtz
 
Ebooks in the Academy: Impacts on Learning and Pedagogy
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 PedagogyBeth Transue
 

Viewers also liked (12)

realtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsrealtime audio on ze web @ hhjs
realtime audio on ze web @ hhjs
 
Rails i18n - Railskonferenz 2007
Rails i18n - Railskonferenz 2007Rails i18n - Railskonferenz 2007
Rails i18n - Railskonferenz 2007
 
Railsrumble railscamphh 2010
Railsrumble railscamphh 2010Railsrumble railscamphh 2010
Railsrumble railscamphh 2010
 
Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)
 
Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.
 
Manila seminar
Manila seminarManila seminar
Manila seminar
 
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...
E. A. Draffan (University of Southampton), Accessibility of etext, ebooks and...
 
Open Source Hardware - Of makers and tinkerers
Open Source Hardware - Of makers and tinkerersOpen Source Hardware - Of makers and tinkerers
Open Source Hardware - Of makers and tinkerers
 
Digital Divide: Connecting Students to Electronic Text
Digital Divide: Connecting Students to Electronic TextDigital Divide: Connecting Students to Electronic Text
Digital Divide: Connecting Students to Electronic Text
 
Achterman csla 2011reading_online
Achterman csla 2011reading_onlineAchterman csla 2011reading_online
Achterman csla 2011reading_online
 
YALSA eReading 2012
YALSA eReading 2012YALSA eReading 2012
YALSA eReading 2012
 
Ebooks in the Academy: Impacts on Learning and Pedagogy
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
 

Similar to Ruby and Rails MongoDB Berlin 2010

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
Opening up the Social Web - Standards that are bridging the Islands Bastian Hofmann
 
Building Brilliant APIs
Building Brilliant APIsBuilding Brilliant APIs
Building Brilliant APIsbencollier
 
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerOSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerNETWAYS
 
Deciphering the Interoperable Web
Deciphering the Interoperable WebDeciphering the Interoperable Web
Deciphering the Interoperable WebMichael Bleigh
 
Dev festasia manila-social_pub
Dev festasia manila-social_pubDev festasia manila-social_pub
Dev festasia manila-social_pubtimothyjordan
 
Document-Oriented Databases: Couchdb Primer
Document-Oriented Databases: Couchdb PrimerDocument-Oriented Databases: Couchdb Primer
Document-Oriented Databases: Couchdb Primerjsiarto
 
Continuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using HudsonContinuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using HudsonEric Steele
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 StoragePaul Irish
 
Ruby on CouchDB - SimplyStored and RockingChair
Ruby on CouchDB - SimplyStored and RockingChairRuby on CouchDB - SimplyStored and RockingChair
Ruby on CouchDB - SimplyStored and RockingChairJonathan Weiss
 
OSMC2010 Open NMS Kickstart
OSMC2010 Open NMS KickstartOSMC2010 Open NMS Kickstart
OSMC2010 Open NMS KickstartRonny
 
Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010Zi Bin Cheah
 
Say no to var_dump
Say no to var_dumpSay no to var_dump
Say no to var_dumpbenwaine
 

Similar to Ruby and Rails MongoDB Berlin 2010 (20)

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
Opening up the Social Web - Standards that are bridging the Islands
 
Mongo db
Mongo dbMongo db
Mongo db
 
Riak Intro
Riak IntroRiak Intro
Riak Intro
 
Building Brilliant APIs
Building Brilliant APIsBuilding Brilliant APIs
Building Brilliant APIs
 
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny TrommerOSMC 2010 | OpenNMS Kickstart by Ronny Trommer
OSMC 2010 | OpenNMS Kickstart by Ronny Trommer
 
Deciphering the Interoperable Web
Deciphering the Interoperable WebDeciphering the Interoperable Web
Deciphering the Interoperable Web
 
Dev festasia manila-social_pub
Dev festasia manila-social_pubDev festasia manila-social_pub
Dev festasia manila-social_pub
 
Document-Oriented Databases: Couchdb Primer
Document-Oriented Databases: Couchdb PrimerDocument-Oriented Databases: Couchdb Primer
Document-Oriented Databases: Couchdb Primer
 
Continuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using HudsonContinuous Integration Testing for Plone Using Hudson
Continuous Integration Testing for Plone Using Hudson
 
An Overview of HTML5 Storage
An Overview of HTML5 StorageAn Overview of HTML5 Storage
An Overview of HTML5 Storage
 
Ruby on CouchDB - SimplyStored and RockingChair
Ruby on CouchDB - SimplyStored and RockingChairRuby on CouchDB - SimplyStored and RockingChair
Ruby on CouchDB - SimplyStored and RockingChair
 
OSMC2010 Open NMS Kickstart
OSMC2010 Open NMS KickstartOSMC2010 Open NMS Kickstart
OSMC2010 Open NMS Kickstart
 
Meet Couch DB
Meet Couch DBMeet Couch DB
Meet Couch DB
 
Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010
 
JavaScript Patterns
JavaScript PatternsJavaScript Patterns
JavaScript Patterns
 
Java scriptpatterns
Java scriptpatternsJava scriptpatterns
Java scriptpatterns
 
Java scriptpatterns
Java scriptpatternsJava scriptpatterns
Java scriptpatterns
 
Say no to var_dump
Say no to var_dumpSay no to var_dump
Say no to var_dump
 
Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
 
Spacebits at Codebits
Spacebits at CodebitsSpacebits at Codebits
Spacebits at Codebits
 

More from jan_mindmatters

10 fun projects to improve your coding skills
10 fun projects to improve your coding skills10 fun projects to improve your coding skills
10 fun projects to improve your coding skillsjan_mindmatters
 
MongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realMongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realjan_mindmatters
 
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
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
 
Facebook mit Rails und Facebooker
Facebook mit Rails und FacebookerFacebook mit Rails und Facebooker
Facebook mit Rails und Facebookerjan_mindmatters
 
Show the frontend some love - HAML, SASS and COMPASS
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
 
Lehmanns Rails Erweitern
Lehmanns Rails ErweiternLehmanns Rails Erweitern
Lehmanns Rails Erweiternjan_mindmatters
 

More from jan_mindmatters (8)

10 fun projects to improve your coding skills
10 fun projects to improve your coding skills10 fun projects to improve your coding skills
10 fun projects to improve your coding skills
 
MongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 realMongoDB & Mongomapper 4 real
MongoDB & Mongomapper 4 real
 
Liebe Dein Frontend wie Dich selbst! HAML & SASS & COMPASS & less
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
 
Facebook mit Rails und Facebooker
Facebook mit Rails und FacebookerFacebook mit Rails und Facebooker
Facebook mit Rails und Facebooker
 
Show the frontend some love - HAML, SASS and COMPASS
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
 
HAML / SASS and COMPASS
HAML / SASS and COMPASSHAML / SASS and COMPASS
HAML / SASS and COMPASS
 
Merb. Rails in anders.
Merb. Rails in anders.Merb. Rails in anders.
Merb. Rails in anders.
 
Lehmanns Rails Erweitern
Lehmanns Rails ErweiternLehmanns Rails Erweitern
Lehmanns Rails Erweitern
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Ruby and Rails MongoDB Berlin 2010