com presentations: Mongo UG talk, and PHP Benelux tutorial.: mongo-osm-mug.xml mongo-tut-phpbnl13.xml slides/map/import-script-exercise.xml
slides/map/import-script.xml slides/map/mongo-country.xml slides/map/query-exercise-checkin.xml slides/map/query-exercise.xml
slides/map/update-exercise.xml slides/mongodb/10gen-small.png slides/mongodb/aggregation-example-cuisine.xml slides/mongodb/bg.png
slides/mongodb/ex1-foursquare.xml slides/mongodb/four
| From: | Derick Rethans | Date: | Wed, 23 Jan 2013 21:03:57 +0000 |
| Subject: | com presentations: Mongo UG talk, and PHP Benelux tutorial.: mongo-osm-mug.xml mongo-tut-phpbnl13.xml slides/map/import-script-exercise.xml slides/map/import-script.xml slides/map/mongo-country.xml slides/map/query-exercise-checkin.xml slides/map/query-exercise.xml slides/map/update-exercise.xml slides/mongodb/10gen-small.png slides/mongodb/aggregation-example-cuisine.xml slides/mongodb/bg.png slides/mongodb/ex1-foursquare.xml slides/mongodb/four |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1863@lists.php.net to get a copy of this message | ||
Commit: e0a696e6c57e5107238d0e91a7b93ff14c131c0d
Author: Derick Rethans <github@derickrethans.nl> Wed, 23 Jan 2013 21:03:57 +0000
Parents: 8f2c5a4d35219bd902577089e2869ec9ab2d464b
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=e0a696e6c57e5107238d0e91a7b93ff14c131c0d
Log:
Mongo UG talk, and PHP Benelux tutorial.
Changed paths:
A mongo-osm-mug.xml
A mongo-tut-phpbnl13.xml
A slides/map/import-script-exercise.xml
A slides/map/import-script.xml
A slides/map/mongo-country.xml
A slides/map/query-exercise-checkin.xml
A slides/map/query-exercise.xml
A slides/map/update-exercise.xml
A slides/mongodb/10gen-small.png
A slides/mongodb/aggregation-example-cuisine.xml
A slides/mongodb/bg.png
A slides/mongodb/ex1-foursquare.xml
A slides/mongodb/foursquare.jpg
A slides/mongodb/half-tutorial-topics.xml
A slides/mongodb/mongodb-small.png
M slides/mongodb/osm-to-mongo-data3.xml
M slides/mongodb/osm-to-mongo-data4.xml
M slides/mongodb/safe3.xml
M slides/mongodb/title.xml
diff --git a/mongo-osm-mug.xml b/mongo-osm-mug.xml new file mode 100644 index 0000000..947a109 --- /dev/null +++ b/mongo-osm-mug.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<presentation css="10gen-strict.css"> +<topic>Maps</topic> +<title>Store a city, a country or even a planet in your DB</title> +<event>MongoDB Meet-up #9</event> +<location>London, UK</location> +<date>November 26th, 2012</date> +<speaker>Derick Rethans</speaker> +<email>derick@10gen.com</email> +<twitter>derickr</twitter> +<joindin></joindin> +<slide>slides/map/title.xml</slide> + +<!-- +In this talk I will be explaining the strong points of OpenStreetMap and why +using GoogleMaps for your websites is generally a bad idea. Contrary to popular +belief, GoogleMaps isn't as amazing as it looks and they are a lot more evil +than they look. OpenStreetMap's data is also easily accessible for use in PHP +applications and the generated tiles can easily be embedded into a Web 2.0 +application. Its open nature is a welcome and powerful geo database that can be +added to and used in whatever way imaginary. +--> + +<!-- +What is X? +--> +<slide>slides/map/osm-what.xml</slide> + +<slide>slides/map/osm-data.xml</slide> + +<slide>slides/map/osm-tags1.xml</slide> +<slide>slides/map/osm-tags2.xml</slide> +<slide>slides/map/osm-tags3.xml</slide> +<slide>slides/map/osm-tags4.xml</slide> + +<slide>slides/map/osm-xapi.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data2.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data3.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data4.xml</slide> +<slide>slides/mongodb/osm-schema1.xml</slide> +<slide>slides/mongodb/osm-schema2.xml</slide> +<slide>slides/mongodb/osm-schema3.xml</slide> +<slide>slides/map/finding-food-import-mongo2.xml</slide> +<slide>slides/map/import-script1.xml</slide> +<slide>slides/map/import-sizes1.xml</slide> +<slide>slides/map/import-script2.xml</slide> + +<slide>slides/mongodb/idx-geo.xml</slide> +<slide>slides/mongodb/idx-geo2.xml</slide> +<slide>slides/mongodb/idx-geo3.xml</slide> + +<slide>slides/map/find-mongo.xml</slide> +<slide>slides/map/finding-food-take2.xml</slide> + +<slide>slides/map/mongo-country.xml</slide> + +<slide>slides/mongodb/resources.xml</slide> +<slide>slides/mongodb/idx-geo-geohash.xml</slide> +<slide>slides/map/find-mongo2.xml</slide> +<slide>slides/map/find-mongo-html.xml</slide> + +</presentation> diff --git a/mongo-tut-phpbnl13.xml b/mongo-tut-phpbnl13.xml new file mode 100644 index 0000000..0c523c6 --- /dev/null +++ b/mongo-tut-phpbnl13.xml @@ -0,0 +1,196 @@ +<?xml version="1.0" encoding="utf-8"?> +<presentation css="10gen-strict.css"> +<topic>mongoDB</topic> +<title>Hands-On MongoDB</title> +<event>PHP Benelux 2013</event> +<location>Edegem, Belgium</location> +<date>Jan 25th, 2013</date> +<speaker>Derick Rethans</speaker> +<email>derick@10gen.com</email> +<twitter>derickr</twitter> +<url>http://derickrethans.nl/talks.html</url> +<joindin>http://joind.in/7779</joindin> +<slide>slides/mongodb/title.xml</slide> +<slide>slides/mongodb/me.xml</slide> +<slide>slides/mongodb/half-tutorial-topics.xml</slide> + +<slide>slides/mongodb/section-intro.xml</slide> +<slide>slides/mongodb/databasefield.xml</slide> +<slide>slides/mongodb/collections-documents.xml</slide> +<slide>slides/mongodb/document.xml</slide> + +<slide>slides/mongodb/connecting.xml</slide> + +<slide>slides/mongodb/insert.xml</slide> +- single + +<slide>slides/mongodb/id.xml</slide> + +<slide>slides/mongodb/query.xml</slide> +<slide>slides/mongodb/query2.xml</slide> +- findOne +- find + +<slide>slides/mongodb/query-advanced-ops.xml</slide> + +<slide>slides/mongodb/cursors.xml</slide> +- cursor +<slide>slides/mongodb/limit-skip.xml</slide> +- limit/skip + +<slide>slides/mongodb/update2a.xml</slide> + +<!-- FIRST EXCERCISE --> +<slide>slides/mongodb/ex1-foursquare.xml</slide> +<slide>slides/map/osm-what.xml</slide> + +<slide>slides/map/osm-data.xml</slide> + +<slide>slides/map/osm-tags1.xml</slide> +<slide>slides/map/osm-tags2.xml</slide> +<slide>slides/map/osm-tags3.xml</slide> +<slide>slides/map/osm-tags4.xml</slide> + +<slide>slides/mongodb/osm-to-mongo-data.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data3.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data4.xml</slide> +<slide>slides/mongodb/osm-schema3.xml</slide> +<slide>slides/map/import-script.xml</slide> +<slide>slides/map/import-script-exercise.xml</slide> + +<slide>slides/map/query-exercise.xml</slide> +<slide>slides/map/query-exercise-checkin.xml</slide> + +<slide>slides/mongodb/commands.xml</slide> +<slide>slides/mongodb/commands-aggregation.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine.xml</slide> + +<slide>slides/mongodb/questions.xml</slide> + +<!-- SCHEMA DESIGN --> +<slide>slides/mongodb/section-schema-design.xml</slide> +Common Patterns + +- RDBMS-normalisation. + +<slide>slides/mongodb/normalisation.xml</slide> +<slide>slides/mongodb/blog.xml</slide> +<slide>slides/mongodb/blog2.xml</slide> + +<slide>slides/mongodb/considerations.xml</slide> + + +<slide>slides/mongodb/one-to-many1.xml</slide> +<slide>slides/mongodb/one-to-many2.xml</slide> +<slide>slides/mongodb/tip-array-key.xml</slide> +<slide>slides/mongodb/one-to-many3.xml</slide> +<slide>slides/mongodb/one-to-many4.xml</slide> +<slide>slides/mongodb/tip-paged-result.xml</slide> + +<slide>slides/mongodb/many-to-many1.xml</slide> +<slide>slides/mongodb/many-to-many2.xml</slide> +<slide>slides/mongodb/many-to-many3.xml</slide> + +<slide>slides/mongodb/embed-vs-link.xml</slide> + +<slide>slides/map/update-exercise.xml</slide> + +<slide>slides/mongodb/questions.xml</slide> + +<!-- INDEXES --> +<slide>slides/mongodb/section-indexes.xml</slide> +<slide>slides/mongodb/idx-whats-in-store.xml</slide> +<slide>slides/mongodb/idx-startup-quotes.xml</slide> + +<slide>slides/mongodb/idx-map.xml</slide> +<slide>slides/mongodb/idx-how-do-you-find-a-city.xml</slide> +<slide>slides/mongodb/idx-create.xml</slide> + +<slide>slides/mongodb/idx-cities-by-name.xml</slide> +<slide>slides/mongodb/idx-how-do-you-find-a-large-city.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop2.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop3.xml</slide> +<slide>slides/mongodb/idx-how-do-you-find-a-large-city-on-a-mountain.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem2.xml</slide> +<slide>slides/mongodb/idx-stored2.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem3.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem4.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem6.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem5.xml</slide> + +<slide>slides/mongodb/idx-recap1.xml</slide> +<slide>slides/mongodb/idx-recap2.xml</slide> + + +<slide>slides/mongodb/idx-unique.xml</slide> +<slide>slides/mongodb/idx-covered.xml</slide> +<slide>slides/mongodb/idx-multi-key.xml</slide> +<slide>slides/mongodb/idx-which-one-is-picked.xml</slide> +<slide>slides/mongodb/idx-or.xml</slide> + +<slide>slides/mongodb/idx-map2.xml</slide> +<slide>slides/mongodb/idx-geo.xml</slide> +<slide>slides/mongodb/idx-geo2.xml</slide> +<slide>slides/mongodb/idx-geo3.xml</slide> +<slide>slides/mongodb/idx-geo4.xml</slide> + +unique +sparse +indexonly +multikey +2d + +<slide>slides/mongodb/idx-recap3.xml</slide> +<slide>slides/mongodb/questions.xml</slide> + +<!-- REPLICATION --> +<slide>slides/mongodb/section-replication.xml</slide> +<slide>slides/mongodb/repl-use-cases.xml</slide> +<slide>slides/mongodb/repl-types-of-outage.xml</slide> +<slide>slides/mongodb/repl-features.xml</slide> +<slide>slides/mongodb/repl-works-basic.xml</slide> +<slide>slides/mongodb/repl-works-normal.xml</slide> +<slide>slides/mongodb/repl-works-failover.xml</slide> +<slide>slides/mongodb/repl-oplog.xml</slide> + +<slide>slides/mongodb/replication-setup.xml</slide> + +<slide>slides/mongodb/repl-managing.xml</slide> +<slide>slides/mongodb/safe3.xml</slide> +<slide>slides/mongodb/repl-write-concern.xml</slide> +<slide>slides/mongodb/repl-tagging.xml</slide> +<slide>slides/mongodb/repl-tagging2.xml</slide> +<slide>slides/mongodb/repl-tagging-example.xml</slide> +<slide>slides/mongodb/read-preference2.xml</slide> +<slide>slides/mongodb/read-preference.xml</slide> +<slide>slides/mongodb/repl-eventual-consistency.xml</slide> +<slide>slides/mongodb/repl-features2.xml</slide> + +<slide>slides/mongodb/repl-scenarios.xml</slide> +<slide>slides/mongodb/repl-set1.xml</slide> +<slide>slides/mongodb/repl-set2.xml</slide> +<slide>slides/mongodb/repl-set3.xml</slide> +<slide>slides/mongodb/repl-set4.xml</slide> +<slide>slides/mongodb/repl-set5.xml</slide> +<slide>slides/mongodb/repl-typical.xml</slide> + +- setup +- slaveOk +- journal +- write concerns + +<!-- SHARDING --> +<slide>slides/mongodb/section-sharding.xml</slide> +<slide>slides/mongodb/sharding.xml</slide> +<slide>slides/mongodb/sharding-key.xml</slide> +<slide>slides/mongodb/sharding-mongos.xml</slide> +<slide>slides/mongodb/sharding-config.xml</slide> +- mongos +- diagram +- transparent + +<slide>slides/mongodb/questions.xml</slide> +<slide>slides/mongodb/resources.xml</slide> +</presentation> diff --git a/slides/map/import-script-exercise.xml b/slides/map/import-script-exercise.xml new file mode 100644 index 0000000..4817d21 --- /dev/null +++ b/slides/map/import-script-exercise.xml @@ -0,0 +1,26 @@ +<slide> +<title>Exercise #1: The script</title> + +<list> + <bullet>%git clone git://github.com/derickr/mongo-workshop.git%</bullet> + <bullet>%cd mongo-workshop && git checkout import1%</bullet> + <bullet>Edit %import-data.php% to create the document structure at #1: + <list> + <bullet>Cast all values, due to SimpleXML weirdness</bullet> + <bullet>%_id% needs to be "n" + the node's ID (in + %$node['id']%)</bullet> + <bullet>Make sure to add the location (*lon*, *lat*) as a two + element array in the %loc% element.</bullet> + </list> + </bullet> + <bullet>Edit %import-data.php% to create the document structure at #3: + <list> + <bullet>%_id% needs to be "w" + the node's ID (in + %$way['id']%)</bullet> + </list> + </bullet> + <bullet>Add the %insert% statement at #2 and #4</bullet> + <bullet>Run the script: %php import-data.php compress.zlib://antwerp.xml.gz%</bullet> +</list> + +</slide> diff --git a/slides/map/import-script.xml b/slides/map/import-script.xml new file mode 100644 index 0000000..ab178fc --- /dev/null +++ b/slides/map/import-script.xml @@ -0,0 +1,18 @@ +<slide> +<title>The import script</title> + +<list> + <bullet>Open file with XML Reader</bullet> + <bullet>Loop over all nodes, and: + <list> + <bullet>*Store the node in the database*</bullet> + </list> + </bullet> + <bullet>Loop over all the ways, and: + <list> + <bullet>*Look up locations for each node in the database*</bullet> + <bullet>Store the way into the database</bullet> + </list> + </bullet> +</list> +</slide> diff --git a/slides/map/mongo-country.xml b/slides/map/mongo-country.xml new file mode 100644 index 0000000..238997f --- /dev/null +++ b/slides/map/mongo-country.xml @@ -0,0 +1,14 @@ +<slide> +<title>And now the planet?</title> + +<list> + <bullet>*London*: 2m nodes, 0.75m ways, 0.13GB data, 0.19GB index: <br />fits easily in RAM</bullet> + <bullet>*UK*: 45m nodes, 10m ways, 5.6GB data, 8.6GB index:<br />fits just in RAM</bullet> + <bullet>*Planet*: 1500m nodes, 141m ways…</bullet> +</list> +<div effect="fade-in"> +<blurb> +What do we do when we have 150GB of data and 230GB of indexes? +</blurb> +</div> +</slide> diff --git a/slides/map/query-exercise-checkin.xml b/slides/map/query-exercise-checkin.xml new file mode 100644 index 0000000..ae4ce37 --- /dev/null +++ b/slides/map/query-exercise-checkin.xml @@ -0,0 +1,23 @@ +<slide> +<title>Exercise #3: Querying</title> + +<list> + <bullet>Edit %functions.php% to create the query under #2</bullet> + <bullet>Hints:<list> + <bullet>We only need one result</bullet> + <bullet>The object ID that you need to query is stored in %$object%</bullet> + </list></bullet> +</list> + +<div effect="fade-in"> +<blurb>Expected, something like:</blurb> +<example> +$this->o = $this->c->findOne( + array( + '_id' => preg_replace( '/[^nw0-9]/', '', $object ) + ) +); +</example> +</div> + +</slide> diff --git a/slides/map/query-exercise.xml b/slides/map/query-exercise.xml new file mode 100644 index 0000000..1172197 --- /dev/null +++ b/slides/map/query-exercise.xml @@ -0,0 +1,20 @@ +<slide> +<title>Exercise #2: Querying</title> + +<list> + <bullet>Commit or stash your changes (%git stash%)</bullet> + <bullet>%git checkout web%</bullet> + <bullet>run: %php -S localhost:9002%</bullet> + <bullet>Browse to %http://localhost:9002%</bullet> +</list> +<div effect="fade-in"> +<list> + <bullet>Edit %fetch-poi.php% to create the queries under #1a, #1b and #1c</bullet> + <bullet>Hints:<list> + <bullet>A pub is an *amenity*</bullet> + <bullet>You can define a regular expression with:<br/>%new MongoRegex( '/…/' );%</bullet> + </list></bullet> +</list> +</div> + +</slide> diff --git a/slides/map/update-exercise.xml b/slides/map/update-exercise.xml new file mode 100644 index 0000000..8fdb579 --- /dev/null +++ b/slides/map/update-exercise.xml @@ -0,0 +1,46 @@ +<slide> +<title>Exercise #4: Updating</title> + +<div effect="fade-out"> +<list> + <bullet>Edit %functions.php% to create the update under #3</bullet> + <bullet>Things to keep in mind:<list> + <bullet>Where do you want to store the values?</bullet> + <bullet>Where are you storing the check-ins?</bullet> + <bullet>How often do we update?</bullet> + <bullet>How do we need to query the data in the future?</bullet> + </list></bullet> +</list> +</div> + +<div effect="fade-in"> +<blurb>Expected, something like:</blurb> +<example> +foreach( $values as $key => $value ) +{ + @$values[$key] = (string) $value; + + if ( $values[$key] === '?' || $values[$key] === '' || $values[$key] === 'Array' ) + { + continue; + } + + if ( array_key_exists( $key, $this->tags ) ) + { + if ( $values[$key] != $this->tags[$key] ) + { + $updates["possible.$key"] = array( $values[$key], 0 ); + } + } + else + { + $updates["possible.$key"] = array( $values[$key], 0 ); + } +} + +$update = array( '$addToSet' => $updates ); +$this->d->poi->update( array( '_id' => $this->o['_id'] ), $update ); +</example> +</div> + +</slide> diff --git a/slides/mongodb/10gen-small.png b/slides/mongodb/10gen-small.png new file mode 100644 index 0000000..b9c5776 Binary files /dev/null and b/slides/mongodb/10gen-small.png differ diff --git a/slides/mongodb/aggregation-example-cuisine.xml b/slides/mongodb/aggregation-example-cuisine.xml new file mode 100644 index 0000000..24ec818 --- /dev/null +++ b/slides/mongodb/aggregation-example-cuisine.xml @@ -0,0 +1,58 @@ +<slide> +<title>Aggregation example</title> +<div effect="fade-out"> +<example> +> db.cities.find({ name: 'Atlanta' }).pretty(); +{ + "_id" : ObjectId("4fe82d3044670a8156004ca0"), + "geonameid" : 4180439, + "name" : "Atlanta", + "asciiname" : "Atlanta", + "alternatenames" : [ + "ATL", "Atlanta", "Atlantae", "aeteullaenta", "arrlanra nagaram", + "atalanta", "atlanta", "atlanta", " jwrjya", "atoranta", "etalanta", + "etlanta", "ya te lan da", "Ατλάντα", "Атлантæ", "Атланта", "Ատլանտա", + "แอตแลนตา", "ཨ་ཊི་ལཱན་ཊཱ།", "အတ္တလန္တာမြို့", "ატლანტა", "アトランタ", + "亚特兰大", "애틀랜타" + ], + "feature_class" : "P", + "feature_code" : "PPLA", + "country_code" : "US", + "admin1_code" : "GA", + "admin2_code" : "121", + "population" : 420003, + "elevation" : 320, + "dem" : 336, + "timezone" : "America/New_York", + "modification_date" : "2011-06-16", + "location" : [ -84.38798, 33.749 ] +} +</example> +</div> + +<div effect="fade-in"> +<example result="1"><![CDATA[<?php +$m = new MongoClient(); +$c = $m->demo->cities; + +$res = $c->aggregate( [ + [ '$match' => [ 'name' => 'Atlanta' ] ], + [ '$unwind' => '$alternatenames' ], + [ '$project' => [ + 'name' => '$alternatenames', + 'meta' => [ + 'elevation' => '$dem', + 'population' => 1, + 'timezone' => 1, + ], + 'location' => 1, + '_id' => 0, + ] ], + [ '$sort' => [ 'name' => 1 ] ] +] ); + +var_dump( $res ); +?>]]> +</example> +</div> +</slide> diff --git a/slides/mongodb/bg.png b/slides/mongodb/bg.png new file mode 100644 index 0000000..bf92ae2 Binary files /dev/null and b/slides/mongodb/bg.png differ diff --git a/slides/mongodb/ex1-foursquare.xml b/slides/mongodb/ex1-foursquare.xml new file mode 100644 index 0000000..15adfb6 --- /dev/null +++ b/slides/mongodb/ex1-foursquare.xml @@ -0,0 +1,7 @@ +<slide> +<title>Exercise #1</title> + +<blurb class="big-centre">foursquare</blurb> + +<image filename="foursquare.jpg"/> +</slide> diff --git a/slides/mongodb/foursquare.jpg b/slides/mongodb/foursquare.jpg new file mode 100644 index 0000000..0fe9068 Binary files /dev/null and b/slides/mongodb/foursquare.jpg differ diff --git a/slides/mongodb/half-tutorial-topics.xml b/slides/mongodb/half-tutorial-topics.xml new file mode 100644 index 0000000..3630d13 --- /dev/null +++ b/slides/mongodb/half-tutorial-topics.xml @@ -0,0 +1,11 @@ +<slide> +<title>Today's Topics</title> + +<list> + <bullet>Introduction into MongoDB with PHP</bullet> + <bullet>Schema Design</bullet> + <bullet>Indexes</bullet> + <bullet>Practical Example of Schema Design and Indexes</bullet> + <bullet>Questions and Answers</bullet> +</list> +</slide> diff --git a/slides/mongodb/mongodb-small.png b/slides/mongodb/mongodb-small.png new file mode 100644 index 0000000..7c122c2 Binary files /dev/null and b/slides/mongodb/mongodb-small.png differ diff --git a/slides/mongodb/osm-to-mongo-data3.xml b/slides/mongodb/osm-to-mongo-data3.xml index ab8fe0b..5d067bd 100644 --- a/slides/mongodb/osm-to-mongo-data3.xml +++ b/slides/mongodb/osm-to-mongo-data3.xml @@ -1,5 +1,5 @@ <slide> -<title>Importing OSM into MongoDB (3)</title> +<title>Importing OSM into MongoDB</title> <div effect="fade-out"> <blurb>Find all pubs:</blurb> diff --git a/slides/mongodb/osm-to-mongo-data4.xml b/slides/mongodb/osm-to-mongo-data4.xml index e8056f2..cf7f1a1 100644 --- a/slides/mongodb/osm-to-mongo-data4.xml +++ b/slides/mongodb/osm-to-mongo-data4.xml @@ -1,5 +1,5 @@ <slide> -<title>Importing OSM into MongoDB (4)</title> +<title>Importing OSM into MongoDB</title> <example> { diff --git a/slides/mongodb/safe3.xml b/slides/mongodb/safe3.xml index 21303ab..b34f6f4 100644 --- a/slides/mongodb/safe3.xml +++ b/slides/mongodb/safe3.xml @@ -10,9 +10,8 @@ $m = new MongoClient( 'mongodb://localhost:13000/?replSet=seta&w=2' ); $c = $m->demo->talks; -$c->insert( - array( '_id' => 'mongodb' ), // document -); +$c->insert( array( '_id' => 'mongodb' ) ); +$c->insert( array( '_id' => 'mongodb' ) ); ?>]]></example> <list> diff --git a/slides/mongodb/title.xml b/slides/mongodb/title.xml index 1ee61a2..3c299f3 100644 --- a/slides/mongodb/title.xml +++ b/slides/mongodb/title.xml @@ -1,10 +1,12 @@ <slide type="title"> +<break lines="6"/> <blurb class="event-title">:-:title:-:</blurb> -<blurb class="event-date">:-:event:-: - :-:location:-: - :-:date:-:</blurb> -<blurb class="event-presenter">Derick Rethans - :-:email:-: - twitter: @:-:twitter:-:</blurb> -<blurb class="pres-url-small">:-:joindin:-:</blurb> +<break lines="1"/> +<blurb class="event-presenter">Derick Rethans - :-:email:-:</blurb> +<blurb class="event-presenter">@:-:twitter:-:</blurb> +<blurb class="event-presenter">:-:joindin:-:</blurb> <div class="footer"> -<image align="left" filename="10gen.png" pdf-scale="0.4" x-offset="2" y-offset="12.3"/> -<image align="right" filename="mongodb.png" pdf-scale="0.4" x-offset="18" y-offset="13.3"/> +<image align="left" filename="10gen-small.png" pdf-scale="0.4" x-offset="2" y-offset="12.3"/> +<image align="right" filename="mongodb-small.png" pdf-scale="0.4" x-offset="18" y-offset="13.3"/> </div> </slide>
diff --git a/mongo-osm-mug.xml b/mongo-osm-mug.xml new file mode 100644 index 0000000..947a109 --- /dev/null +++ b/mongo-osm-mug.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<presentation css="10gen-strict.css"> +<topic>Maps</topic> +<title>Store a city, a country or even a planet in your DB</title> +<event>MongoDB Meet-up #9</event> +<location>London, UK</location> +<date>November 26th, 2012</date> +<speaker>Derick Rethans</speaker> +<email>derick@10gen.com</email> +<twitter>derickr</twitter> +<joindin></joindin> +<slide>slides/map/title.xml</slide> + +<!-- +In this talk I will be explaining the strong points of OpenStreetMap and why +using GoogleMaps for your websites is generally a bad idea. Contrary to popular +belief, GoogleMaps isn't as amazing as it looks and they are a lot more evil +than they look. OpenStreetMap's data is also easily accessible for use in PHP +applications and the generated tiles can easily be embedded into a Web 2.0 +application. Its open nature is a welcome and powerful geo database that can be +added to and used in whatever way imaginary. +--> + +<!-- +What is X? +--> +<slide>slides/map/osm-what.xml</slide> + +<slide>slides/map/osm-data.xml</slide> + +<slide>slides/map/osm-tags1.xml</slide> +<slide>slides/map/osm-tags2.xml</slide> +<slide>slides/map/osm-tags3.xml</slide> +<slide>slides/map/osm-tags4.xml</slide> + +<slide>slides/map/osm-xapi.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data2.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data3.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data4.xml</slide> +<slide>slides/mongodb/osm-schema1.xml</slide> +<slide>slides/mongodb/osm-schema2.xml</slide> +<slide>slides/mongodb/osm-schema3.xml</slide> +<slide>slides/map/finding-food-import-mongo2.xml</slide> +<slide>slides/map/import-script1.xml</slide> +<slide>slides/map/import-sizes1.xml</slide> +<slide>slides/map/import-script2.xml</slide> + +<slide>slides/mongodb/idx-geo.xml</slide> +<slide>slides/mongodb/idx-geo2.xml</slide> +<slide>slides/mongodb/idx-geo3.xml</slide> + +<slide>slides/map/find-mongo.xml</slide> +<slide>slides/map/finding-food-take2.xml</slide> + +<slide>slides/map/mongo-country.xml</slide> + +<slide>slides/mongodb/resources.xml</slide> +<slide>slides/mongodb/idx-geo-geohash.xml</slide> +<slide>slides/map/find-mongo2.xml</slide> +<slide>slides/map/find-mongo-html.xml</slide> + +</presentation> diff --git a/mongo-tut-phpbnl13.xml b/mongo-tut-phpbnl13.xml new file mode 100644 index 0000000..0c523c6 --- /dev/null +++ b/mongo-tut-phpbnl13.xml @@ -0,0 +1,196 @@ +<?xml version="1.0" encoding="utf-8"?> +<presentation css="10gen-strict.css"> +<topic>mongoDB</topic> +<title>Hands-On MongoDB</title> +<event>PHP Benelux 2013</event> +<location>Edegem, Belgium</location> +<date>Jan 25th, 2013</date> +<speaker>Derick Rethans</speaker> +<email>derick@10gen.com</email> +<twitter>derickr</twitter> +<url>http://derickrethans.nl/talks.html</url> +<joindin>http://joind.in/7779</joindin> +<slide>slides/mongodb/title.xml</slide> +<slide>slides/mongodb/me.xml</slide> +<slide>slides/mongodb/half-tutorial-topics.xml</slide> + +<slide>slides/mongodb/section-intro.xml</slide> +<slide>slides/mongodb/databasefield.xml</slide> +<slide>slides/mongodb/collections-documents.xml</slide> +<slide>slides/mongodb/document.xml</slide> + +<slide>slides/mongodb/connecting.xml</slide> + +<slide>slides/mongodb/insert.xml</slide> +- single + +<slide>slides/mongodb/id.xml</slide> + +<slide>slides/mongodb/query.xml</slide> +<slide>slides/mongodb/query2.xml</slide> +- findOne +- find + +<slide>slides/mongodb/query-advanced-ops.xml</slide> + +<slide>slides/mongodb/cursors.xml</slide> +- cursor +<slide>slides/mongodb/limit-skip.xml</slide> +- limit/skip + +<slide>slides/mongodb/update2a.xml</slide> + +<!-- FIRST EXCERCISE --> +<slide>slides/mongodb/ex1-foursquare.xml</slide> +<slide>slides/map/osm-what.xml</slide> + +<slide>slides/map/osm-data.xml</slide> + +<slide>slides/map/osm-tags1.xml</slide> +<slide>slides/map/osm-tags2.xml</slide> +<slide>slides/map/osm-tags3.xml</slide> +<slide>slides/map/osm-tags4.xml</slide> + +<slide>slides/mongodb/osm-to-mongo-data.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data3.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data4.xml</slide> +<slide>slides/mongodb/osm-schema3.xml</slide> +<slide>slides/map/import-script.xml</slide> +<slide>slides/map/import-script-exercise.xml</slide> + +<slide>slides/map/query-exercise.xml</slide> +<slide>slides/map/query-exercise-checkin.xml</slide> + +<slide>slides/mongodb/commands.xml</slide> +<slide>slides/mongodb/commands-aggregation.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine.xml</slide> + +<slide>slides/mongodb/questions.xml</slide> + +<!-- SCHEMA DESIGN --> +<slide>slides/mongodb/section-schema-design.xml</slide> +Common Patterns + +- RDBMS-normalisation. + +<slide>slides/mongodb/normalisation.xml</slide> +<slide>slides/mongodb/blog.xml</slide> +<slide>slides/mongodb/blog2.xml</slide> + +<slide>slides/mongodb/considerations.xml</slide> + + +<slide>slides/mongodb/one-to-many1.xml</slide> +<slide>slides/mongodb/one-to-many2.xml</slide> +<slide>slides/mongodb/tip-array-key.xml</slide> +<slide>slides/mongodb/one-to-many3.xml</slide> +<slide>slides/mongodb/one-to-many4.xml</slide> +<slide>slides/mongodb/tip-paged-result.xml</slide> + +<slide>slides/mongodb/many-to-many1.xml</slide> +<slide>slides/mongodb/many-to-many2.xml</slide> +<slide>slides/mongodb/many-to-many3.xml</slide> + +<slide>slides/mongodb/embed-vs-link.xml</slide> + +<slide>slides/map/update-exercise.xml</slide> + +<slide>slides/mongodb/questions.xml</slide> + +<!-- INDEXES --> +<slide>slides/mongodb/section-indexes.xml</slide> +<slide>slides/mongodb/idx-whats-in-store.xml</slide> +<slide>slides/mongodb/idx-startup-quotes.xml</slide> + +<slide>slides/mongodb/idx-map.xml</slide> +<slide>slides/mongodb/idx-how-do-you-find-a-city.xml</slide> +<slide>slides/mongodb/idx-create.xml</slide> + +<slide>slides/mongodb/idx-cities-by-name.xml</slide> +<slide>slides/mongodb/idx-how-do-you-find-a-large-city.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop2.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop3.xml</slide> +<slide>slides/mongodb/idx-how-do-you-find-a-large-city-on-a-mountain.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem2.xml</slide> +<slide>slides/mongodb/idx-stored2.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem3.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem4.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem6.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem5.xml</slide> + +<slide>slides/mongodb/idx-recap1.xml</slide> +<slide>slides/mongodb/idx-recap2.xml</slide> + + +<slide>slides/mongodb/idx-unique.xml</slide> +<slide>slides/mongodb/idx-covered.xml</slide> +<slide>slides/mongodb/idx-multi-key.xml</slide> +<slide>slides/mongodb/idx-which-one-is-picked.xml</slide> +<slide>slides/mongodb/idx-or.xml</slide> + +<slide>slides/mongodb/idx-map2.xml</slide> +<slide>slides/mongodb/idx-geo.xml</slide> +<slide>slides/mongodb/idx-geo2.xml</slide> +<slide>slides/mongodb/idx-geo3.xml</slide> +<slide>slides/mongodb/idx-geo4.xml</slide> + +unique +sparse +indexonly +multikey +2d + +<slide>slides/mongodb/idx-recap3.xml</slide> +<slide>slides/mongodb/questions.xml</slide> + +<!-- REPLICATION --> +<slide>slides/mongodb/section-replication.xml</slide> +<slide>slides/mongodb/repl-use-cases.xml</slide> +<slide>slides/mongodb/repl-types-of-outage.xml</slide> +<slide>slides/mongodb/repl-features.xml</slide> +<slide>slides/mongodb/repl-works-basic.xml</slide> +<slide>slides/mongodb/repl-works-normal.xml</slide> +<slide>slides/mongodb/repl-works-failover.xml</slide> +<slide>slides/mongodb/repl-oplog.xml</slide> + +<slide>slides/mongodb/replication-setup.xml</slide> + +<slide>slides/mongodb/repl-managing.xml</slide> +<slide>slides/mongodb/safe3.xml</slide> +<slide>slides/mongodb/repl-write-concern.xml</slide> +<slide>slides/mongodb/repl-tagging.xml</slide> +<slide>slides/mongodb/repl-tagging2.xml</slide> +<slide>slides/mongodb/repl-tagging-example.xml</slide> +<slide>slides/mongodb/read-preference2.xml</slide> +<slide>slides/mongodb/read-preference.xml</slide> +<slide>slides/mongodb/repl-eventual-consistency.xml</slide> +<slide>slides/mongodb/repl-features2.xml</slide> + +<slide>slides/mongodb/repl-scenarios.xml</slide> +<slide>slides/mongodb/repl-set1.xml</slide> +<slide>slides/mongodb/repl-set2.xml</slide> +<slide>slides/mongodb/repl-set3.xml</slide> +<slide>slides/mongodb/repl-set4.xml</slide> +<slide>slides/mongodb/repl-set5.xml</slide> +<slide>slides/mongodb/repl-typical.xml</slide> + +- setup +- slaveOk +- journal +- write concerns + +<!-- SHARDING --> +<slide>slides/mongodb/section-sharding.xml</slide> +<slide>slides/mongodb/sharding.xml</slide> +<slide>slides/mongodb/sharding-key.xml</slide> +<slide>slides/mongodb/sharding-mongos.xml</slide> +<slide>slides/mongodb/sharding-config.xml</slide> +- mongos +- diagram +- transparent + +<slide>slides/mongodb/questions.xml</slide> +<slide>slides/mongodb/resources.xml</slide> +</presentation> diff --git a/slides/map/import-script-exercise.xml b/slides/map/import-script-exercise.xml new file mode 100644 index 0000000..4817d21 --- /dev/null +++ b/slides/map/import-script-exercise.xml @@ -0,0 +1,26 @@ +<slide> +<title>Exercise #1: The script</title> + +<list> + <bullet>%git clone git://github.com/derickr/mongo-workshop.git%</bullet> + <bullet>%cd mongo-workshop && git checkout import1%</bullet> + <bullet>Edit %import-data.php% to create the document structure at #1: + <list> + <bullet>Cast all values, due to SimpleXML weirdness</bullet> + <bullet>%_id% needs to be "n" + the node's ID (in + %$node['id']%)</bullet> + <bullet>Make sure to add the location (*lon*, *lat*) as a two + element array in the %loc% element.</bullet> + </list> + </bullet> + <bullet>Edit %import-data.php% to create the document structure at #3: + <list> + <bullet>%_id% needs to be "w" + the node's ID (in + %$way['id']%)</bullet> + </list> + </bullet> + <bullet>Add the %insert% statement at #2 and #4</bullet> + <bullet>Run the script: %php import-data.php compress.zlib://antwerp.xml.gz%</bullet> +</list> + +</slide> diff --git a/slides/map/import-script.xml b/slides/map/import-script.xml new file mode 100644 index 0000000..ab178fc --- /dev/null +++ b/slides/map/import-script.xml @@ -0,0 +1,18 @@ +<slide> +<title>The import script</title> + +<list> + <bullet>Open file with XML Reader</bullet> + <bullet>Loop over all nodes, and: + <list> + <bullet>*Store the node in the database*</bullet> + </list> + </bullet> + <bullet>Loop over all the ways, and: + <list> + <bullet>*Look up locations for each node in the database*</bullet> + <bullet>Store the way into the database</bullet> + </list> + </bullet> +</list> +</slide> diff --git a/slides/map/mongo-country.xml b/slides/map/mongo-country.xml new file mode 100644 index 0000000..238997f --- /dev/null +++ b/slides/map/mongo-country.xml @@ -0,0 +1,14 @@ +<slide> +<title>And now the planet?</title> + +<list> + <bullet>*London*: 2m nodes, 0.75m ways, 0.13GB data, 0.19GB index: <br />fits easily in RAM</bullet> + <bullet>*UK*: 45m nodes, 10m ways, 5.6GB data, 8.6GB index:<br />fits just in RAM</bullet> + <bullet>*Planet*: 1500m nodes, 141m ways…</bullet> +</list> +<div effect="fade-in"> +<blurb> +What do we do when we have 150GB of data and 230GB of indexes? +</blurb> +</div> +</slide> diff --git a/slides/map/query-exercise-checkin.xml b/slides/map/query-exercise-checkin.xml new file mode 100644 index 0000000..ae4ce37 --- /dev/null +++ b/slides/map/query-exercise-checkin.xml @@ -0,0 +1,23 @@ +<slide> +<title>Exercise #3: Querying</title> + +<list> + <bullet>Edit %functions.php% to create the query under #2</bullet> + <bullet>Hints:<list> + <bullet>We only need one result</bullet> + <bullet>The object ID that you need to query is stored in %$object%</bullet> + </list></bullet> +</list> + +<div effect="fade-in"> +<blurb>Expected, something like:</blurb> +<example> +$this->o = $this->c->findOne( + array( + '_id' => preg_replace( '/[^nw0-9]/', '', $object ) + ) +); +</example> +</div> + +</slide> diff --git a/slides/map/query-exercise.xml b/slides/map/query-exercise.xml new file mode 100644 index 0000000..1172197 --- /dev/null +++ b/slides/map/query-exercise.xml @@ -0,0 +1,20 @@ +<slide> +<title>Exercise #2: Querying</title> + +<list> + <bullet>Commit or stash your changes (%git stash%)</bullet> + <bullet>%git checkout web%</bullet> + <bullet>run: %php -S localhost:9002%</bullet> + <bullet>Browse to %http://localhost:9002%</bullet> +</list> +<div effect="fade-in"> +<list> + <bullet>Edit %fetch-poi.php% to create the queries under #1a, #1b and #1c</bullet> + <bullet>Hints:<list> + <bullet>A pub is an *amenity*</bullet> + <bullet>You can define a regular expression with:<br/>%new MongoRegex( '/…/' );%</bullet> + </list></bullet> +</list> +</div> + +</slide> diff --git a/slides/map/update-exercise.xml b/slides/map/update-exercise.xml new file mode 100644 index 0000000..8fdb579 --- /dev/null +++ b/slides/map/update-exercise.xml @@ -0,0 +1,46 @@ +<slide> +<title>Exercise #4: Updating</title> + +<div effect="fade-out"> +<list> + <bullet>Edit %functions.php% to create the update under #3</bullet> + <bullet>Things to keep in mind:<list> + <bullet>Where do you want to store the values?</bullet> + <bullet>Where are you storing the check-ins?</bullet> + <bullet>How often do we update?</bullet> + <bullet>How do we need to query the data in the future?</bullet> + </list></bullet> +</list> +</div> + +<div effect="fade-in"> +<blurb>Expected, something like:</blurb> +<example> +foreach( $values as $key => $value ) +{ + @$values[$key] = (string) $value; + + if ( $values[$key] === '?' || $values[$key] === '' || $values[$key] === 'Array' ) + { + continue; + } + + if ( array_key_exists( $key, $this->tags ) ) + { + if ( $values[$key] != $this->tags[$key] ) + { + $updates["possible.$key"] = array( $values[$key], 0 ); + } + } + else + { + $updates["possible.$key"] = array( $values[$key], 0 ); + } +} + +$update = array( '$addToSet' => $updates ); +$this->d->poi->update( array( '_id' => $this->o['_id'] ), $update ); +</example> +</div> + +</slide> diff --git a/slides/mongodb/10gen-small.png b/slides/mongodb/10gen-small.png new file mode 100644 index 0000000..b9c5776 Binary files /dev/null and b/slides/mongodb/10gen-small.png differ diff --git a/slides/mongodb/aggregation-example-cuisine.xml b/slides/mongodb/aggregation-example-cuisine.xml new file mode 100644 index 0000000..24ec818 --- /dev/null +++ b/slides/mongodb/aggregation-example-cuisine.xml @@ -0,0 +1,58 @@ +<slide> +<title>Aggregation example</title> +<div effect="fade-out"> +<example> +> db.cities.find({ name: 'Atlanta' }).pretty(); +{ + "_id" : ObjectId("4fe82d3044670a8156004ca0"), + "geonameid" : 4180439, + "name" : "Atlanta", + "asciiname" : "Atlanta", + "alternatenames" : [ + "ATL", "Atlanta", "Atlantae", "aeteullaenta", "arrlanra nagaram", + "atalanta", "atlanta", "atlanta", " jwrjya", "atoranta", "etalanta", + "etlanta", "ya te lan da", "Ατλάντα", "Атлантæ", "Атланта", "Ատլանտա", + "แอตแลนตา", "ཨ་ཊི་ལཱན་ཊཱ།", "အတ္တလန္တာမြို့", "ატლანტა", "アトランタ", + "亚特兰大", "애틀랜타" + ], + "feature_class" : "P", + "feature_code" : "PPLA", + "country_code" : "US", + "admin1_code" : "GA", + "admin2_code" : "121", + "population" : 420003, + "elevation" : 320, + "dem" : 336, + "timezone" : "America/New_York", + "modification_date" : "2011-06-16", + "location" : [ -84.38798, 33.749 ] +} +</example> +</div> + +<div effect="fade-in"> +<example result="1"><![CDATA[<?php +$m = new MongoClient(); +$c = $m->demo->cities; + +$res = $c->aggregate( [ + [ '$match' => [ 'name' => 'Atlanta' ] ], + [ '$unwind' => '$alternatenames' ], + [ '$project' => [ + 'name' => '$alternatenames', + 'meta' => [ + 'elevation' => '$dem', + 'population' => 1, + 'timezone' => 1, + ], + 'location' => 1, + '_id' => 0, + ] ], + [ '$sort' => [ 'name' => 1 ] ] +] ); + +var_dump( $res ); +?>]]> +</example> +</div> +</slide> diff --git a/slides/mongodb/bg.png b/slides/mongodb/bg.png new file mode 100644 index 0000000..bf92ae2 Binary files /dev/null and b/slides/mongodb/bg.png differ diff --git a/slides/mongodb/ex1-foursquare.xml b/slides/mongodb/ex1-foursquare.xml new file mode 100644 index 0000000..15adfb6 --- /dev/null +++ b/slides/mongodb/ex1-foursquare.xml @@ -0,0 +1,7 @@ +<slide> +<title>Exercise #1</title> + +<blurb class="big-centre">foursquare</blurb> + +<image filename="foursquare.jpg"/> +</slide> diff --git a/slides/mongodb/foursquare.jpg b/slides/mongodb/foursquare.jpg new file mode 100644 index 0000000..0fe9068 Binary files /dev/null and b/slides/mongodb/foursquare.jpg differ diff --git a/slides/mongodb/half-tutorial-topics.xml b/slides/mongodb/half-tutorial-topics.xml new file mode 100644 index 0000000..3630d13 --- /dev/null +++ b/slides/mongodb/half-tutorial-topics.xml @@ -0,0 +1,11 @@ +<slide> +<title>Today's Topics</title> + +<list> + <bullet>Introduction into MongoDB with PHP</bullet> + <bullet>Schema Design</bullet> + <bullet>Indexes</bullet> + <bullet>Practical Example of Schema Design and Indexes</bullet> + <bullet>Questions and Answers</bullet> +</list> +</slide> diff --git a/slides/mongodb/mongodb-small.png b/slides/mongodb/mongodb-small.png new file mode 100644 index 0000000..7c122c2 Binary files /dev/null and b/slides/mongodb/mongodb-small.png differ diff --git a/slides/mongodb/osm-to-mongo-data3.xml b/slides/mongodb/osm-to-mongo-data3.xml index ab8fe0b..5d067bd 100644 --- a/slides/mongodb/osm-to-mongo-data3.xml +++ b/slides/mongodb/osm-to-mongo-data3.xml @@ -1,5 +1,5 @@ <slide> -<title>Importing OSM into MongoDB (3)</title> +<title>Importing OSM into MongoDB</title> <div effect="fade-out"> <blurb>Find all pubs:</blurb> diff --git a/slides/mongodb/osm-to-mongo-data4.xml b/slides/mongodb/osm-to-mongo-data4.xml index e8056f2..cf7f1a1 100644 --- a/slides/mongodb/osm-to-mongo-data4.xml +++ b/slides/mongodb/osm-to-mongo-data4.xml @@ -1,5 +1,5 @@ <slide> -<title>Importing OSM into MongoDB (4)</title> +<title>Importing OSM into MongoDB</title> <example> { diff --git a/slides/mongodb/safe3.xml b/slides/mongodb/safe3.xml index 21303ab..b34f6f4 100644 --- a/slides/mongodb/safe3.xml +++ b/slides/mongodb/safe3.xml @@ -10,9 +10,8 @@ $m = new MongoClient( 'mongodb://localhost:13000/?replSet=seta&w=2' ); $c = $m->demo->talks; -$c->insert( - array( '_id' => 'mongodb' ), // document -); +$c->insert( array( '_id' => 'mongodb' ) ); +$c->insert( array( '_id' => 'mongodb' ) ); ?>]]></example> <list> diff --git a/slides/mongodb/title.xml b/slides/mongodb/title.xml index 1ee61a2..3c299f3 100644 --- a/slides/mongodb/title.xml +++ b/slides/mongodb/title.xml @@ -1,10 +1,12 @@ <slide type="title"> +<break lines="6"/> <blurb class="event-title">:-:title:-:</blurb> -<blurb class="event-date">:-:event:-: - :-:location:-: - :-:date:-:</blurb> -<blurb class="event-presenter">Derick Rethans - :-:email:-: - twitter: @:-:twitter:-:</blurb> -<blurb class="pres-url-small">:-:joindin:-:</blurb> +<break lines="1"/> +<blurb class="event-presenter">Derick Rethans - :-:email:-:</blurb> +<blurb class="event-presenter">@:-:twitter:-:</blurb> +<blurb class="event-presenter">:-:joindin:-:</blurb> <div class="footer"> -<image align="left" filename="10gen.png" pdf-scale="0.4" x-offset="2" y-offset="12.3"/> -<image align="right" filename="mongodb.png" pdf-scale="0.4" x-offset="18" y-offset="13.3"/> +<image align="left" filename="10gen-small.png" pdf-scale="0.4" x-offset="2" y-offset="12.3"/> +<image align="right" filename="mongodb-small.png" pdf-scale="0.4" x-offset="18" y-offset="13.3"/> </div> </slide>