com presentations: Added FrOSCon slides with polishes: jump-froscon17.xml nonscalar-froscon17.xml slides/mongodb/document-validation.xml slides/mongodb/me.xml slides/mongodb/resources.xml slides/mongodb/scalar-couchdb.xml slides/mongodb/scalar-document.xml slides/mongodb/scalar-elasticsearch-insert.xml slides/mongodb/scalar-key-value.xml slides/mongodb/scalar-query-mongodb.xml slides/mongodb/scalar-query-mysql.xml slides/mongodb/scalar-relational

[email protected] (Derick Rethans) Thu, 17 Aug 2017 11:34:06 +0000
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    62549591a487d0302e769dddbe0e412bc96dd400
Author:    Derick Rethans <[email protected]>         Thu, 17 Aug 2017 12:34:06 +0100
Parents:   c6b71cf138f441a6819fc61e16e82c1bb8f9723e
Branches:  master

Link:       http://git.php.net/?p=presentations.git;a=commitdiff;h=62549591a487d0302e769dddbe0e412bc96dd400

Log:
Added FrOSCon slides with polishes

Changed paths:
  A  jump-froscon17.xml
  A  nonscalar-froscon17.xml
  M  slides/mongodb/document-validation.xml
  M  slides/mongodb/me.xml
  M  slides/mongodb/resources.xml
  M  slides/mongodb/scalar-couchdb.xml
  M  slides/mongodb/scalar-document.xml
  M  slides/mongodb/scalar-elasticsearch-insert.xml
  M  slides/mongodb/scalar-key-value.xml
  M  slides/mongodb/scalar-query-mongodb.xml
  M  slides/mongodb/scalar-query-mysql.xml
  M  slides/mongodb/scalar-relational.xml
  M  slides/mongodb/update-atomicity.xml
  M  slides/xdebug/vld-path-3-paths.xml
diff_62549591a487d0302e769dddbe0e412bc96dd400.txt (text/plain, 16.5 KB)
diff --git a/jump-froscon17.xml b/jump-froscon17.xml
new file mode 100644
index 0000000..a3c3f8a
--- /dev/null
+++ b/jump-froscon17.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<presentation css="10gen-strict.css">
+<topic>PHP</topic>
+<title>It's All About the Goto</title>
+<event>FrOSCon</event>
+<location>Sankt Augustin, Germany</location>
+<date>August 20th, 2017</date>
+<speaker>Derick Rethans</speaker>
+<email>[email protected]</email>
+<twitter>derickr</twitter>
+<joindin>https://derickrethans.nl/talks/jump-froscon17</joindin>
+
+<slide>slides/mongodb/title.xml</slide>
+<slide>slides/mongodb/me.xml</slide>
+
+<slide>slides/internals/title-agenda.xml</slide>
+
+<slide>slides/internals/title-stages.xml</slide>
+<!-- INTRODUCTION
+Compile stages:
+Parse script
+Create AST
+Convert to opcodes
+Run the code
+Opcache for caching
+-->
+<slide>slides/internals/stages.xml</slide>
+
+<!-- STAGES
+Parse
+- Show parser rules
+- Show "compiler" rules
+-->
+
+<slide>slides/internals/title-parsing.xml</slide>
+<slide>slides/internals/parse-state-machine.xml</slide>
+<slide>slides/internals/parse-tokenization.xml</slide>
+<slide>slides/internals/scanner.xml</slide>
+<slide>slides/internals/scanner-rules.xml</slide>
+<slide>slides/internals/ast.xml</slide>
+<slide>slides/internals/ast1.xml</slide>
+<slide>slides/internals/scanner-ast.xml</slide>
+<slide>slides/internals/scanner-ast2.xml</slide>
+<slide>slides/internals/bytecode0.xml</slide>
+<slide>slides/internals/bytecode½.xml</slide>
+<slide>slides/internals/bytecode1.xml</slide>
+
+<slide>slides/internals/jumps.xml</slide>
+
+<!--
+AST
+- Show AST for various control structures
+
+Opcodes
+- Show AST for the same control structures
+-->
+
+<slide>slides/internals/jumps-if.xml</slide>
+<slide>slides/internals/jumps-if-else.xml</slide>
+
+<slide>slides/internals/rings.xml</slide>
+<slide>slides/internals/jumps-for.xml</slide>
+<slide>slides/internals/jumps-for-rewritten.xml</slide>
+<slide>slides/internals/jumps-while.xml</slide>
+<slide>slides/internals/jumps-do-while.xml</slide>
+<slide>slides/internals/jumps-foreach.xml</slide>
+<slide>slides/internals/jumps-complex.xml</slide>
+<slide>slides/internals/loops.xml</slide>
+<slide>slides/internals/jumps-complex-dot.xml</slide>
+
+<!--
+Try/Catch nonsense
+- FASTCALL/FASTRET
+-->
+<slide>slides/internals/catch.xml</slide>
+<slide>slides/internals/jumps-try-catch.xml</slide>
+
+<!--
+Dead code analysis
+- Show how Xdebug does it through VLD
+-->
+<slide>slides/internals/deadcode.xml</slide>
+<slide>slides/internals/deadcode-vld.xml</slide>
+
+<!--
+Path analysis
+- Branch and Path
+-->
+<slide>slides/internals/branches.xml</slide>
+<slide>slides/xdebug/vld-path-2-paths.xml</slide>
+<slide>slides/xdebug/vld-path-4-code.xml</slide>
+<slide>slides/xdebug/vld-path-4-output.xml</slide>
+
+<slide>slides/xdebug/vld-path-3-code.xml</slide>
+<slide>slides/xdebug/vld-path-3-output.xml</slide>
+<slide>slides/xdebug/vld-path-3-paths.xml</slide>
+
+<!-- Conclusion
+
+Code -> Tokens -> AST -> opode
+
+Transformation of control structures
+
+Useful implementations 
+
+-->
+<slide>slides/internals/recap.xml</slide>
+<slide>slides/internals/recap-content.xml</slide>
+
+
+
+<slide>slides/mongodb/questions.xml</slide>
+
+<slide>slides/mongodb/resources.xml</slide>
+
+</presentation>
diff --git a/nonscalar-froscon17.xml b/nonscalar-froscon17.xml
new file mode 100644
index 0000000..e31512c
--- /dev/null
+++ b/nonscalar-froscon17.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<presentation css="10gen-strict.css">
+<topic>MongoDB</topic>
+<title>Storing Non-Scalar Data</title>
+<event>FrOSCon</event>
+<location>Sankt Augustin, Germany</location>
+<date>August 19th, 2017</date>
+<speaker>Derick Rethans</speaker>
+<email>[email protected]</email>
+<twitter>derickr</twitter>
+<url>http://derickrethans.nl/talks.html</url>
+<joindin>https://derickrethans.nl/talks/nonscalar-froscon17</joindin>
+<slide>slides/mongodb/title.xml</slide>
+<slide>slides/mongodb/me.xml</slide>
+
+<slide>slides/mongodb/scalar-non-scalar-examples.xml</slide>
+<!-- <slide>slides/mongodb/scalar-non-scalar-example-vector.xml</slide> -->
+<slide>slides/mongodb/scalar-non-scalar-example-tag-cloud.xml</slide>
+<slide>slides/mongodb/scalar-non-scalar-example-product-properties.xml</slide>
+<!-- <slide>slides/mongodb/scalar-non-scalar-example-addresses.xml</slide> -->
+<slide>slides/mongodb/scalar-what-is-it-not.xml</slide>
+
+<slide>slides/mongodb/scalar-agenda.xml</slide>
+
+Intro into DB types and their data types
+<slide>slides/mongodb/scalar-section-dbs-and-types.xml</slide>
+
+    Key/Value:
+        Redis
+            LISTS
+            SETS
+            HASHES
+            Sorted SET
+<slide>slides/mongodb/scalar-key-value.xml</slide>
+<slide>slides/mongodb/scalar-redis.xml</slide>
+<!-- <slide>slides/mongodb/scalar-redis-lists.xml</slide> -->
+<slide>slides/mongodb/scalar-redis-sets.xml</slide>
+<slide>slides/mongodb/scalar-redis-hashses.xml</slide>
+<!-- <slide>slides/mongodb/scalar-redis-sorted-set.xml</slide> -->
+
+    Document:
+        MongoDB
+        CouchDB
+        Elastic Search
+<slide>slides/mongodb/scalar-document.xml</slide>
+<slide>slides/mongodb/scalar-mongodb.xml</slide>
+<slide>slides/mongodb/document-complex.xml</slide>
+<slide>slides/mongodb/phplib-crud-insert.xml</slide>
+<slide>slides/mongodb/scalar-couchdb.xml</slide>
+<slide>slides/mongodb/scalar-couchdb-example.xml</slide>
+<slide>slides/mongodb/scalar-couchdb-insert.xml</slide>
+<slide>slides/mongodb/scalar-elasticsearch.xml</slide>
+<slide>slides/mongodb/scalar-elasticsearch-example.xml</slide>
+<slide>slides/mongodb/scalar-elasticsearch-insert.xml</slide>
+
+    Relational:
+        MySQL
+            JSON
+        PostgreSQL
+            HSTORE
+            JSON
+            JSONB
+<slide>slides/mongodb/scalar-relational.xml</slide>
+<slide>slides/mongodb/scalar-mysql.xml</slide>
+<slide>slides/mongodb/scalar-mysql-json.xml</slide>
+<slide>slides/mongodb/scalar-mysql-json-example.xml</slide>
+<slide>slides/mongodb/scalar-postgresql.xml</slide>
+<slide>slides/mongodb/scalar-postgresql-hstore.xml</slide>
+<slide>slides/mongodb/scalar-postgresql-jsonb.xml</slide>
+<slide>slides/mongodb/scalar-postgresql-jsonb-example.xml</slide>
+
+<!-- <slide>slides/mongodb/scalar-storage-overview.xml</slide> -->
+
+<slide>slides/mongodb/scalar-section-query.xml</slide>
+
+Manipulation
+
+    Query
+        Query operators for $in, $elemMatch, etc
+        Query operations on nested fields
+
+<slide>slides/mongodb/scalar-query-redis.xml</slide>
+<slide>slides/mongodb/scalar-query-couchdb.xml</slide>
+<slide>slides/mongodb/scalar-query-mongodb.xml</slide>
+<slide>slides/mongodb/scalar-query-mongodb-aggregation.xml</slide>
+<slide>slides/mongodb/scalar-query-elasticsearch.xml</slide>
+<slide>slides/mongodb/scalar-query-mysql.xml</slide>
+<slide>slides/mongodb/scalar-query-postgresql-hstore.xml</slide>
+<!-- <slide>slides/mongodb/scalar-query-postgresql-jsonb.xml</slide> -->
+
+    Indexes
+        Redis
+        MongoDB
+        CouchDB
+        ElasticSearch
+        MySQL
+            only through virtual columns
+            Not on arrays
+        PostgreSQL
+            GIN/GIST 
+        Geospatial from GeoJSON sources (not PostGIS)
+
+<slide>slides/mongodb/indexes-title.xml</slide>
+<slide>slides/mongodb/scalar-index-redis.xml</slide>
+<slide>slides/mongodb/scalar-index-couchdb.xml</slide>
+<slide>slides/mongodb/index.xml</slide>
+<slide>slides/mongodb/scalar-index-elasticsearch.xml</slide>
+<slide>slides/mongodb/scalar-index-postgresql.xml</slide>
+<slide>slides/mongodb/scalar-index-mysql.xml</slide>
+
+
+<slide>slides/mongodb/scalar-section-manipulation.xml</slide>
+    Storing/Update
+        Atomicity
+            ACID
+            Single document with update specifiers
+        Partitioning on JSON data
+        Manipulation of JSON data
+<slide>slides/mongodb/scalar-atomicity.xml</slide>
+<!-- <slide>slides/mongodb/acid.xml</slide> -->
+<slide>slides/mongodb/scalar-nosql-acid.xml</slide>
+<slide>slides/mongodb/scalar-atomic-redis.xml</slide>
+<slide>slides/mongodb/scalar-atomic-couchdb.xml</slide>
+<slide>slides/mongodb/update-atomicity.xml</slide>
+
+    Schema validation
+        None can do that, besides MongoDB
+
+<slide>slides/mongodb/scalar-validate.xml</slide>
+<slide>slides/mongodb/document-validation.xml</slide>
+
+<slide>slides/mongodb/scalar-conclusion.xml</slide>
+
+
+Conclusion
+
+
+
+<slide>slides/mongodb/questions.xml</slide>
+<slide>slides/mongodb/resources.xml</slide>
+
+</presentation>
diff --git a/slides/mongodb/document-validation.xml b/slides/mongodb/document-validation.xml
index f4d9b98..c03dafa 100644
--- a/slides/mongodb/document-validation.xml
+++ b/slides/mongodb/document-validation.xml
@@ -5,7 +5,6 @@
 	<bullet>New in MongoDB 3.2</bullet>
 	<bullet>Allows you to set a *validator*, a query that every new or updated document must match</bullet>
 </list>
-<break lines="1"/>
 <blurb>Example:</blurb>
 <example inline="1">
 db.runCommand( {
@@ -18,4 +17,7 @@ db.runCommand( {
 	validationAction: *"warn"*, // error, 
 } )
 </example>
+<list>
+	<bullet>MongoDB 3.6 adds JSON Schema support</bullet>
+</list>
 </slide>
diff --git a/slides/mongodb/me.xml b/slides/mongodb/me.xml
index 59a5055..82ddf85 100644
--- a/slides/mongodb/me.xml
+++ b/slides/mongodb/me.xml
@@ -7,8 +7,8 @@
 	<blurb>Derick Rethans</blurb>
 	<list>
 		<bullet>I'm ---Dutch/British--- European, living in London</bullet>
-		<bullet>One of the PHP/HHVM *MongoDB* driver maintainers</bullet>
-		<bullet>Author of the PHP debugger tool *Xdebug*, PHP's Date/Time/Timezone support, and a bunch of other PHP extensions</bullet>
+		<bullet>One of the *MongoDB* driver maintainers</bullet>
+		<bullet>Author of the PHP debugger tool *Xdebug*, PHP's Date/Time support, and a bunch of other PHP extensions</bullet>
 		<bullet>I ♥🌍 maps, I ♥🍺 beer, I ♥🥃  whisky</bullet>
 		<bullet>twitter: @derickr</bullet>
 	</list>
diff --git a/slides/mongodb/resources.xml b/slides/mongodb/resources.xml
index 3fd20cf..a58d208 100644
--- a/slides/mongodb/resources.xml
+++ b/slides/mongodb/resources.xml
@@ -2,6 +2,6 @@
 <break/>
 <qrcode>http://derickrethans.nl/talks/:-:talk_id:-:</qrcode>
 <break/>
-<blurb align="center" class="pres-url-small">:-:joindin:-:</blurb>
-<blurb align="center" class="pres-url-small">:-:email:-:—@:-:twitter:-:</blurb>
+<blurb align="center" class="pres-url-small">*Slides &amp; Resources*<br/>:-:joindin:-:</blurb>
+<blurb align="center" class="pres-url-small">*Contact*<br/>:-:email:-:—@:-:twitter:-:</blurb>
 </slide>
diff --git a/slides/mongodb/scalar-couchdb.xml b/slides/mongodb/scalar-couchdb.xml
index 034a5e7..f34313d 100644
--- a/slides/mongodb/scalar-couchdb.xml
+++ b/slides/mongodb/scalar-couchdb.xml
@@ -2,7 +2,7 @@
 <title>CouchDB</title>
 
 <list>
-	<bullet>An Apache project</bullet>
+	<bullet>An Open Source Apache project</bullet>
 	<bullet>Documents are JSON objects</bullet>
 	<bullet>Interaction through REST API (curl), or an HTTP Client (like Guzzle)</bullet>
 </list>
diff --git a/slides/mongodb/scalar-document.xml b/slides/mongodb/scalar-document.xml
index ac6f4b0..8f1c3ee 100644
--- a/slides/mongodb/scalar-document.xml
+++ b/slides/mongodb/scalar-document.xml
@@ -4,7 +4,7 @@
 <list>
 	<bullet>Richer Datatypes</bullet>
 	<bullet>Operations on keys and values</bullet>
-	<bullet>Represented in JSON, stored differently</bullet>
+	<bullet>Represented in JSON, stored more efficiently</bullet>
 	<bullet>Examples: *MongoDB*, *CouchDB*, *Elasticsearch*</bullet>
 </list>
 
diff --git a/slides/mongodb/scalar-elasticsearch-insert.xml b/slides/mongodb/scalar-elasticsearch-insert.xml
index c46d3ed..19c1584 100644
--- a/slides/mongodb/scalar-elasticsearch-insert.xml
+++ b/slides/mongodb/scalar-elasticsearch-insert.xml
@@ -2,11 +2,6 @@
 <slide>
 <title>Elasticsearch: Insert Document</title>
 
-<example>
-curl -XPUT 'localhost:9200/users?pretty&amp;pretty'
-</example>
-
-
 <example inline="2">
 curl -XPUT 'localhost:9200/users/external/derick@localhost?pretty&amp;pretty' \
 	-H 'Content-Type: application/json' -d'
diff --git a/slides/mongodb/scalar-key-value.xml b/slides/mongodb/scalar-key-value.xml
index f6632f4..bd60469 100644
--- a/slides/mongodb/scalar-key-value.xml
+++ b/slides/mongodb/scalar-key-value.xml
@@ -2,10 +2,10 @@
 <title>Key/Value Stores</title>
 
 <list>
-	<bullet>The simplest type</bullet>
+	<bullet>The "simplest"  data store</bullet>
 	<bullet>Operations by key *only*</bullet>
 	<bullet>Values do not have to be simple scalars</bullet>
-	<bullet>*Redis*</bullet>
+	<bullet>Example: *Redis*</bullet>
 </list>
 
 </slide>
diff --git a/slides/mongodb/scalar-query-mongodb.xml b/slides/mongodb/scalar-query-mongodb.xml
index 954d546..b04399b 100644
--- a/slides/mongodb/scalar-query-mongodb.xml
+++ b/slides/mongodb/scalar-query-mongodb.xml
@@ -61,18 +61,13 @@ db.checkins.find( {
 </div>
 
 <div effect="fade-in">
-<example inline="2">
-{
-	"_id" : ObjectId("569c1bd8b8c96e09421b292a"),
-	"whisky" : "Auriverdes",
-	"rating" : 3.5
-}
-{
-	"_id" : ObjectId("56a2b8fcb8c96e7205499230"),
-	"whisky" : "Bunnahabhain 12",
-	"rating" : 3.5,
-	"age" : 12
-}
+<break lines="1"/>
+<blurb>As SQL:</blurb>
+<example class="big">
+SELECT whisky, rating, age
+FROM   checkins
+WHERE  region_slug = "scotland-islay" AND
+       rating >= 3;
 </example>
 </div>
 
diff --git a/slides/mongodb/scalar-query-mysql.xml b/slides/mongodb/scalar-query-mysql.xml
index 68bacd8..89a5bd8 100644
--- a/slides/mongodb/scalar-query-mysql.xml
+++ b/slides/mongodb/scalar-query-mysql.xml
@@ -3,26 +3,26 @@
 
 <blurb>Create and Insert:</blurb>
 <example>
-CREATE TABLE whisky (name VARCHAR(255), properties JSON);
+CREATE TABLE whisky (name VARCHAR(255), props JSON);
 
 INSERT INTO whisky VALUES
   ( "Glen Albyn 24", '{"age": 24, "cask_strength": false, "abv": 47.5 }' ),
-  ( "Glenrothes-Glenlivet 24", '{"age": 24, "cask_strength": true, "coloured": false }' );
+  ( "Glenrothes 24", '{"age": 24, "cask_strength": true, "coloured": false }' );
 </example>
 
 <break/>
 <blurb>Query:</blurb>
 <example inline="2">
-SELECT name, *properties->>"$.age"* FROM whisky WHERE *properties->"$.cask_strength" = true*;
+SELECT name, *props->>"$.age"* FROM whisky WHERE *props->"$.cask_strength" = true*;
 </example>
 
 <break/>
 <blurb>Result:</blurb>
 <example>
 +-------------------------+---------------------+
-| name                    | properties->"$.age" |
+| name                    | props->"$.age"      |
 +-------------------------+---------------------+
-| Glenrothes-Glenlivet 24 | 24                  |
+| Glenrothes 24           | 24                  |
 +-------------------------+---------------------+
 </example>
 </slide>
diff --git a/slides/mongodb/scalar-relational.xml b/slides/mongodb/scalar-relational.xml
index 933cf6d..2196fec 100644
--- a/slides/mongodb/scalar-relational.xml
+++ b/slides/mongodb/scalar-relational.xml
@@ -2,8 +2,8 @@
 <title>Relational Databases</title>
 
 <list>
-	<bullet>Traditionally data is stored normalized</bullet>
-	<bullet>Normal forms</bullet>
+	<bullet>Traditionally data is stored normalised</bullet>
+	<bullet>Theory: Normal Forms</bullet>
 	<bullet>Additional data types to store "unstructured" data</bullet>
 	<bullet>Examples: *MySQL*, *PostgreSQL*</bullet>
 </list>
diff --git a/slides/mongodb/update-atomicity.xml b/slides/mongodb/update-atomicity.xml
index 6c89e22..0b4a618 100644
--- a/slides/mongodb/update-atomicity.xml
+++ b/slides/mongodb/update-atomicity.xml
@@ -1,26 +1,26 @@
 <slide>
-<title>Atomicity (ACID): Update operators</title>
+<title>MongoDB: Update Operators</title>
 
 <div effect="fade-out">
 <blurb>Don't do this:</blurb>
-<example inline="1">
+<example inline="1"><![CDATA[&lt;?php
 $m = new MongoClient;
 $c = $m->demo->steps;
 $r = $c->findOne( [ 'person' => 'derickr' ] );
 *$r['steps_made']["20170202"] = $r['steps_made']["20170202"] + 7124;*
 *$c->update( [ 'person' => 'derickr' ], $r );*
-</example>
+]]></example>
 </div>
 
 <div effect="fade-in">
 <blurb>Do this instead:</blurb>
-<example inline="1">
+<example inline="1"><![CDATA[&lt;?php
 $m = new MongoClient;
 $c = $m->demo->steps;
 $c->update(
     [ 'person' => 'derickr' ], 
     [ *'$inc'* => [ "steps_made.20170202" => 7124 ] ] 
-);
+);]]>
 </example>
 
 <blurb>Other operators:</blurb>
diff --git a/slides/xdebug/vld-path-3-paths.xml b/slides/xdebug/vld-path-3-paths.xml
index 6af2011..7bd1560 100644
--- a/slides/xdebug/vld-path-3-paths.xml
+++ b/slides/xdebug/vld-path-3-paths.xml
@@ -21,7 +21,7 @@
 <blurb>branch.php</blurb>
 <example><![CDATA[…
 xdebug_start_code_coverage(
-	XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK
+    XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE | XDEBUG_CC_BRANCH_CHECK
 );
 
 ifthenelse( true, false );