<commit_before><!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">

		<title>Breaking performance barriers with MongoDB</title>

		<meta name="description" content="Session about MongoDB and Drupal - initially presented at BADCamp 2013.">
		<meta name="author" content="<NAME>">

		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<link rel="stylesheet" href="css/reveal.min.css">
		<link rel="stylesheet" href="css/theme/night.css" id="theme">

		<!-- For syntax highlighting -->
		<link rel="stylesheet" href="lib/css/zenburn.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="css/custom.css">

		<!-- If the query includes 'print-pdf', use the PDF print sheet -->
		<script>
			document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
		</script>

		<!--[if lt IE 9]>
		<script src="lib/js/html5shiv.js"></script>
		<![endif]-->
	</head>

	<body>

		<div class="reveal">

			<!-- Any section element inside of this container is displayed as a slide -->
			<div class="slides">
				<section>
					<h1>Breaking performance barriers with MongoDB</h1>
					<h3>A.K.A How to convince Drupal to love MongoDB</h3>
					<p>
						<small><a href="http://janezurevc.name"><NAME></a> / <a href="http://twitter.com/slashrsm">@slashrsm</a></small>
					</p>
				</section>

				<section>
					<img src="./img/examiner.png" />
				</section>

        <section>
          <img src="./img/nosql.jpg" />
          <small class="attribution">Photo by <NAME> - <a href="http://www.flickr.com/photos/25086260">http://www.flickr.com/photos/25086260</a></small>

          <aside class="notes">
            - SQL does not work so well for problems we have nowdays<br />
            - performance<br />
            - scalability<br />
            - lots of different paradigms fall under this buzzword<br />
            - i.e. document-oriented, key-value, ...
          </aside>
        </section>

        <section>
          <section>
            <img src="./img/mongo.png" />
          </section>

          <section>
            <h2>MongoDB?</h2>
            <ul>
              <li>document-oriented storage</li>
              <li>free software - GNU AGPL v3.0 (DBMS), Apache (drivers)</li>
              <li>can store complex data structures</li>
              <li>stores data as JSON documents</li>
              <li>schemaless</li>
              <li>MongoDB company (professional support, training, ...)</li>
            </ul>
          </section>

          <section>
            <pre class="stretch"><code data-trim>
> show dbs;
local	0.078125GB
> use drupal;
> show collections;
> db.awesomestuff.insert({"a":1, "b":2});
> db.awesomestuff.find();
{"_id":ObjectId("526965cd93259605e9afbc41"), "a":1, "b":2}
> show collections;
system.indexes
awesomestuff
> show dbs;
bla 0.203125GB
local 0.078125GB
            </code></pre>
            <aside class="notes">
              - dbs and collections created in a implicit way<br />
              - we simply insert, no need to define schema
            </aside>
          </section>

          <section>
            <pre class="stretch"><code data-trim>
> db.awesomestuff.insert({"a": [1, 2, 3], "b":"some string"});
> db.awesomestuff.insert({"a": [[1,2,4], [4,5,6], [7,8,9]]});
> db.awesomestuff.insert({
  "a": {
    "name" : "foo",
    "interests" : ["Drupal", "MongoDB"]
  }
);
            </code></pre>
            <aside class="notes">
              - arrays, arrays of arrays<br />
              - documents /w documents as their values<br />
              - other funky stuff
            </aside>
          </section>

          <section>
            <h2>What else?</h2>
            <ul>
              <li>no joins</li>
              <li>no transactions (there are atomic update operations)</li>
              <li>allows you to index on anything</li>
              <li>seamless replication and scaling (sharding)</li>
              <li>capped collections</li>
              <li>geospatial indexes</li>
              <li>aggregation and MapReduce frameworks</li>
            </ul>

            <aside class="notes">
              - transacitions: can use $isolated for multi-updates to be atomic (no rollback)<br />
              - index limitation: only one array in index<br />
              - MapReduce - Hadoop can use it as source/destination<br />
            </aside>
          </section>

          <section><commit_msg>by slashrsm: Few minor fixes.<commit_after><!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">

		<title>Breaking performance barriers with MongoDB</title>

		<meta name="description" content="Session about MongoDB and Drupal - initially presented at BADCamp 2013.">
		<meta name="author" content="<NAME>">

		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<link rel="stylesheet" href="css/reveal.min.css">
		<link rel="stylesheet" href="css/theme/night.css" id="theme">

		<!-- For syntax highlighting -->
		<link rel="stylesheet" href="lib/css/zenburn.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="css/custom.css">

		<!-- If the query includes 'print-pdf', use the PDF print sheet -->
		<script>
			document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
		</script>

		<!--[if lt IE 9]>
		<script src="lib/js/html5shiv.js"></script>
		<![endif]-->
	</head>

	<body>

		<div class="reveal">

			<!-- Any section element inside of this container is displayed as a slide -->
			<div class="slides">
				<section>
					<h1>Breaking performance barriers with MongoDB</h1>
					<h3>A.K.A How to convince Drupal to love MongoDB</h3>
					<p>
						<small><a href="http://janezurevc.name"><NAME></a> / <a href="http://twitter.com/slashrsm">@slashrsm</a></small>
					</p>
				</section>

				<section>
					<img src="./img/examiner.png" />
				</section>

        <section>
          <img src="./img/nosql.jpg" />
          <small class="attribution">Photo by <NAME> - <a href="http://www.flickr.com/photos/25086260">http://www.flickr.com/photos/25086260</a></small>

          <aside class="notes">
            - SQL does not work so well for problems we have nowdays<br />
            - performance<br />
            - scalability<br />
            - lots of different paradigms fall under this buzzword<br />
            - i.e. document-oriented, key-value, ...
          </aside>
        </section>

        <section>
          <section>
            <img src="./img/mongo.png" />
          </section>

          <section>
            <h2>MongoDB?</h2>
            <ul>
              <li>document-oriented storage</li>
              <li>free software - GNU AGPL v3.0 (DBMS), Apache (drivers)</li>
              <li>can store complex data structures</li>
              <li>stores data as JSON documents</li>
              <li>schemaless</li>
              <li>MongoDB company (professional support, training, ...)</li>
            </ul>
          </section>

          <section>
            <pre class="stretch"><code data-trim>
> show dbs;
local	0.078125GB
> use drupal;
> show collections;
> db.awesomestuff.insert({"a":1, "b":2});
> db.awesomestuff.find();
{"_id":ObjectId("526965cd93259605e9afbc41"), "a":1, "b":2}
> show collections;
system.indexes
awesomestuff
> show dbs;
drupal 0.203125GB
local 0.078125GB
            </code></pre>
            <aside class="notes">
              - dbs and collections created in a implicit way<br />
              - we simply insert, no need to define schema
            </aside>
          </section>

          <section>
            <pre class="stretch"><code data-trim>
> db.awesomestuff.insert({
  "a": [1, 2, 3], "b":"some string"
});
> db.awesomestuff.insert({
  "a": [[1,2,4], [4,5,6], [7,8,9]]
});
> db.awesomestuff.insert({
  "a": {
    "name" : "Dries",
    "interests" : ["Drupal", "MongoDB"]
  }
);
            </code></pre>
            <aside class="notes">
              - arrays, arrays of arrays<br />
              - documents /w documents as their values<br />
              - other funky stuff
            </aside>
          </section>

          <section>
            <h2>What else?</h2>
            <ul>
              <li>no joins</li>
              <li>no transactions (there are atomic update operations)</li>
              <li>allows you to index on anything</li>
              <li>seamless replication and scaling (sharding)</li>
              <li>capped collections</li>
              <li>geospatial indexes</li>
              <li>aggregation and MapReduce frameworks</li>
            </ul>

            <aside class="notes">
              - transacitions: can use $isolated for multi-updates to be atomic (no rollback)<br />
              - index limitation: only one array in index<br />
              - MapReduce - Hadoop can use it as source/destination<br />
            </aside>
          </section>

          <section>
{'fraction_non_alphanumeric': 0.164079822616408, 'fraction_numerical': 0.019216555801921657, 'mean_word_length': 2.15103127079175, 'pattern_counts': {'":': 18, '<': 263, '<?xml version=': 0, '>': 283, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4836731', 'n_tokens_mistral': 3293, 'n_tokens_neox': 2971, 'n_words': 715}