2. agenda
let’s get started
what is problem that we face (or what we need/want)
sql - relational databases
shift of technologies - noSQL databases
mongoDB - what is mongo
how to install mongo
finally - drupal & mongo
mongoDB module - what we can do with it
benefits
q&a
3. about me
name: Vladimir Ilic
employed at: OWFG
email: v_ilic@hotmail.com
t witter: burgerboydaddy
7. what is problem that we face
or what we want to achieve
with Drupal based solutions
8. what is problem that we face
or what we want to achieve
with Drupal based solutions
speed
9. what is problem that we face
or what we want to achieve
with Drupal based solutions
speed
scale
10. what is problem that we face
or what we want to achieve
with Drupal based solutions
speed
scale
simplicity
11. how we can do that?
or how to speedup Drupal
server side
install Varnish for caching pages for
anonymous users.
install a persistent cache system
(Memcached, APC, Memcache).
use a CDN such as Akamai to ser ve
static files (JavaScript, CSS, images).
12. how to speedup drupal -
code side
use Pressflow, it allows Varnish to serve cached page for
anonymous users.
clean Drupal's watchdog table. Every time a watchdog
error gets logged, it consumes CPU resources on the web
ser ver and database server. It also increases load time
significantly.
implement static and persistent cache strategies until the
slow query log comes up clean.
avoid PHP errors that occur within nested foreach loops at
all costs.
uninstall unused modules.
turn on caching for Drupal core blocks and Views.
13. how to speedup drupal -
database side
Drupal sites live or die by their database.
make sure the tables are properly
indexed for faster searching.
do not store unnecessary records, a 100
node database will be always accessed
faster than a 3 million node database.
change how/where you store your data
14. speed -
shift of technologies
from Pentium 100MHz, 16MB RAM,
200 MB HDD to
my cell phone: dual core 1GHz, 1GB RAM,
32GB storage
or maybe some cloud ser ver with 32+
CPU’s, few TB RAM, ...
25. real life example
sell groceries
Product {
General Product
id: attributes
UPC:
brand:
description:
MSRP:
price:
in-stock:
...
PLU: 4011
unit of measure: lb
Item Specific
origin: BC attributes
seasonal: yes
...
26. real life example -
but we also sell books
Product {
id: General Product
UPC: attributes stay
brand:
description:
the same
MSRP:
price:
in-stock:
...
author: Isaac Asimov Book Specific
title: Foudation’s Edge attributes are
binding: Paperback
publication date: 1982 different
publisher name: Spectra
number of pages: 480
ISBN: 0553293389
27. real life example -
ops, we want more
Product {
General Product
id: attributes stay the
UPC: same
brand:
description:
MSRP:
price:
in-stock:
... Clothing specific
brand: Lee attributes are
gender: Mens totally different ...
make: Vintage
style: Straight Cut and not consistent
length: 34 across brands &
width: 42 make
color: Black
material: Cotton
...
30. shift of technologies -
db solutions
from well-established relational databases to NoSQL
technologies.
NoSQL was first introduced as concept in 1998, it really
wasn’t until 2009 that it emerged as a real trend.
NoSQL solutions aren't replacements traditional
solutions, but rather address a specific need in addition
to what one might get from traditional offerings.
In 90% of the time you’ll probably implement a hybrid
system.
put simply, NoSQL is about being open and aware of
alternative, existing and additional patterns and tools
for managing your data.
31. shift is happening now
few years ago (and still now) MySQL was
the undisputed king of the open-source
database hill.
It is still growing with great speed (40%
compound annual grow rate)
but
There are some competitors that are
emerging and grow even faster.
34. shift is happening now
451 Research notes:
"NoSQL database technologies are largely being adopted for
new projects that require additional scalability,
performance, relaxed consistency and agility."
35. shift is happening now
451 Research notes:
"NoSQL database technologies are largely being adopted for
new projects that require additional scalability, in other words:
performance, relaxed consistency and agility." web :-)
38. what is Not Only SQL?
•Non-Relational •Schema-Free
•Distributed •Replication Support
•Open-Source •Simple API
•Horizontally •Eventually
Scalable Consistent
39. mongoDB
agile and scalable
DB designed for today
MongoDB (from "humongous") is a
scalable, high-performance, open source
NoSQL database.
40. what is mongo
Application Document
Oriented
High
{ author: “vladimir”,
date: new Date(),
text: “drupal-MongoDB...”,
Performance tags: [“tech”, “database”]}
Fully
Consistent
Horizontally Scalable
41. other features of MongoDB
Document-based queries
Flexible document queries expressed in JSON/Javascript.
Map Reduce
Flexible aggregation and data processing.
Queries run in parallel on all shards.
GridFS
Store files of any size easily.
Geospatial Indexing
Find object based on location. (i.e. find closest n items to x)
Many Production Deployments
42. what is mongo
Document oriented storage
JSON-style documents with dynamic schemas offer simplicity and power.
Full index support (+geo)
Index on any attribute, just like you're used to.
Replication and High Availability
Mirror across LANs and WANs for scale and peace of mind.
Querying
Rich, document-based queries
Fast In-Place Updates
Map/Reduce
43. mongoDB philosophy
Keep functionality when we can (key/
value stores are great, but we need
more)
Non-relational (no joins) makes scaling
horizontally practical
Document data models are good
Database technology should run
anywhere VMs, cloud, etc
44. 6 mongoDB concepts
MongoDB has the same concept of a 'd atabase' with
which you are likely already familiar (or a schema
for you Oracle folks). Within a MongoDB instance
you can have zero or more databases, each acting
as high-level containers for everything else.
A database can have zero or more 'c ollections'. A
collection shares enough in common with a
traditional 'table' that you can safely think of the
t wo as the same thing.
Collections are made up of zero or more 'documents'.
Again, a document can safely be thought of as a
'row'.
45. 6 mongoDB concepts
A document is made up of one or more 'fields', which you
can probably guess are a lot like 'c olumns'.
'Indexes' in MongoDB function much like their RDBMS
counterparts.
'Cursors' are different than the other five concepts but
they are important enough, and often overlooked, that
I think they are worthy of their own discussion. The
important thing to understand about cursors is that
when you ask MongoDB for data, it returns a cursor,
which we can do things to, such as counting or skipping
ahead, without actually pulling down data.
49. our eCommerce problem again
{ "_id" : ObjectId("4fc19d5e0ddc54e49b84928c"),
‘customer_id’: ObjectId("4fc19d5e5eec78a34f24653d"),
Document ‘state’: ‘cart’,
- Analogous to a row in RDBMS ‘line_items’: [
- Represented as JSON (BSON) {‘UPC’:885909377275’,
‘name’: ‘Tide HE’,
‘quantity’: 2,
‘tax’: ‘HST’,
‘retail_price’: 10.99
},
Embedding {‘UPC’: ‘2348751987’,
- Analogous to a foreign key ‘name’: ‘bananas’,
‘weight’: 3.5,
- Can be ‘UOM’: kg,
- sub objects },
‘retail_price’: 2.75
- collections ],
‘shipping_address’: {
‘street’: ‘1245 76 Ave.’,
‘city’: ‘Surrey’,
‘province’: ‘BC’,
‘postal code’: ‘V1Q 1K8‘
}
‘subtotal’: 13.74
}
50. our eCommerce problem again
{ "_id" : ObjectId("4fc19d5e0ddc54e49b84928c"),
‘customer_id’: ObjectId("4fc19d5e5eec78a34f24653d"),
Document ‘state’: ‘cart’,
- Analogous to a row in RDBMS ‘line_items’: [
- Represented as JSON (BSON) {‘UPC’:885909377275’,
‘name’: ‘Tide HE’,
‘quantity’: 2,
‘tax’: ‘HST’,
‘retail_price’: 10.99
},
Embedding {‘UPC’: ‘2348751987’,
- Analogous to a foreign key ‘name’: ‘bananas’,
‘weight’: 3.5,
- Can be ‘UOM’: kg,
- sub objects },
‘retail_price’: 2.75
- collections ],
‘shipping_address’: {
‘street’: ‘1245 76 Ave.’,
‘city’: ‘Surrey’,
‘province’: ‘BC’,
‘postal code’: ‘V1Q 1K8‘
}
‘subtotal’: 13.74
}
51. our eCommerce problem again
{ "_id" : ObjectId("4fc19d5e0ddc54e49b84928c"),
‘customer_id’: ObjectId("4fc19d5e5eec78a34f24653d"),
Document ‘state’: ‘cart’,
- Analogous to a row in RDBMS ‘line_items’: [
- Represented as JSON (BSON) {‘UPC’:885909377275’,
‘name’: ‘Tide HE’,
‘quantity’: 2,
‘tax’: ‘HST’,
‘retail_price’: 10.99
},
Embedding {‘UPC’: ‘2348751987’,
- Analogous to a foreign key ‘name’: ‘bananas’,
‘weight’: 3.5,
- Can be ‘UOM’: kg,
- sub objects },
‘retail_price’: 2.75
- collections ],
‘shipping_address’: {
‘street’: ‘1245 76 Ave.’,
‘city’: ‘Surrey’,
‘province’: ‘BC’,
‘postal code’: ‘V1Q 1K8‘
}
‘subtotal’: 13.74
}
52. our eCommerce problem again
{ "_id" : ObjectId("4fc19d5e0ddc54e49b84928c"),
‘customer_id’: ObjectId("4fc19d5e5eec78a34f24653d"),
Document ‘state’: ‘cart’,
- Analogous to a row in RDBMS ‘line_items’: [
- Represented as JSON (BSON) {‘UPC’:885909377275’,
‘name’: ‘Tide HE’,
‘quantity’: 2,
‘tax’: ‘HST’,
‘retail_price’: 10.99
},
Embedding {‘UPC’: ‘2348751987’,
- Analogous to a foreign key ‘name’: ‘bananas’,
‘weight’: 3.5,
- Can be ‘UOM’: kg,
- sub objects },
‘retail_price’: 2.75
- collections ],
‘shipping_address’: {
‘street’: ‘1245 76 Ave.’,
References ‘city’: ‘Surrey’,
‘province’: ‘BC’,
‘postal code’: ‘V1Q 1K8‘
- Analogous to a foreign key }
- Think “relationship”
‘subtotal’: 13.74
}
53. our eCommerce problem again
{ "_id" : ObjectId("4fc19d5e0ddc54e49b84928c"),
‘customer_id’: ObjectId("4fc19d5e5eec78a34f24653d"),
Document ‘state’: ‘cart’,
- Analogous to a row in RDBMS ‘line_items’: [
- Represented as JSON (BSON) {‘UPC’:885909377275’,
‘name’: ‘Tide HE’,
‘quantity’: 2,
‘tax’: ‘HST’,
‘retail_price’: 10.99
},
Embedding {‘UPC’: ‘2348751987’,
- Analogous to a foreign key ‘name’: ‘bananas’,
‘weight’: 3.5,
- Can be ‘UOM’: kg,
- sub objects },
‘retail_price’: 2.75
- collections ],
‘shipping_address’: {
‘street’: ‘1245 76 Ave.’,
References ‘city’: ‘Surrey’,
‘province’: ‘BC’,
‘postal code’: ‘V1Q 1K8‘
- Analogous to a foreign key }
- Think “relationship”
‘subtotal’: 13.74
}
54. and some basic operations
Querying
All the following queries will find the document.
{ "_id" : ObjectId("4fc19d5e0ddc54e49b84928c"),
‘customer_id’: ObjectId("4fc19d5e5eec78a34f24653d"),
‘state’: ‘cart’,
By property value
‘line_items’: [
db.orders.find({‘state’: ‘cart’}) {‘UPC’:885909377275’,
‘name’: ‘Tide HE’,
‘quantity’: 2,
‘tax’: ‘HST’,
‘retail_price’: 10.99
},
By embedded object property value
{‘UPC’: ‘2348751987’,
‘name’: ‘bananas’,
db.orders.find({‘shipping_address.province’: ‘BC’}) ‘weight’: 3.5,
‘UOM’: kg,
‘retail_price’: 2.75
},
],
With comparison operators
‘shipping_address’: {
‘street’: ‘12345 76 Ave.’,
db.orders.find({‘subtotal’: {$gt: 10}) ‘city’: ‘Surrey’,
‘province’: ‘BC’,
‘postal code’: ‘V1Q 4K0‘
}
Values in collections (implicit “in”) ‘subtotal’: 13.74
}
db.orders.find({‘line_items.UPC’: ‘885909377275’})
55. how to install mongo
you can have mongo on virtually any platform
(Windows, OS X, Linux, Solaris, FreeBSD)
mongo on Ubuntu in less than 5min
add the 10gen GPG key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Open document /etc/apt/sources.list (sudo vim /etc/
apt/sources.list). Add at the bottom
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist
10gen
Update source list and install package
sudo apt-get update
sudo apt-get install mongodb-10gen
56. basic mongo commands
db.help() -- also db.help (no parentheses)
show dbs -- show databases
use -- for selecting database
db.getCollectionNames()
Since collections are schema-less, we don't
explicitly need to create them. We can
simply insert a document into a new
collection. To do so, use the insert command,
supplying it with the document to insert.
57. basic mongo commands
use learn <--- switched to db learn
> db.getCollectionNames()
[ ]
> db.starwars.insert({name: 'C-3PO', gender:
'robot', position: 'Protocol droid', homeworld:
'Tatooine'})
> db.getCollectionNames()
[ "starwars", "system.indexes" ]
What you're seeing is the name of the index, the
database and collection it was created against
and the fields included in the index
59. Drupal & mongo
In Drupal 7 if you use field API you want your fields inside
mongodb. If you store them inside sql you cannot query them
efficiently.
Storing data into SQL will crete cases where you will run into
denormalization issues, and with mongo that will be solved.
In Drupal 7 everything is entity; nodes are entity, users are
entity, comments are entity.
We only need few system tables in MySQL that are hard-
wired with core drupal; but those things are cached
(memcache)
everything else can go to mongo. and they (mongo &
memcache) are easy to scale.
61. mongoDB module
http://drupal.org/project/mongodb
mongodb: support library for the other modules
62. mongoDB module
http://drupal.org/project/mongodb
mongodb: support library for the other modules
mongodb_cache: Store cache items in mongodb.
63. mongoDB module
http://drupal.org/project/mongodb
mongodb: support library for the other modules
mongodb_cache: Store cache items in mongodb.
mongodb_field_storage: Store the fields in mongodb.
64. mongoDB module
http://drupal.org/project/mongodb
mongodb: support library for the other modules
mongodb_cache: Store cache items in mongodb.
mongodb_field_storage: Store the fields in mongodb.
mongodb_session: Store sessions in mongodb.
65. mongoDB module
http://drupal.org/project/mongodb
mongodb: support library for the other modules
mongodb_cache: Store cache items in mongodb.
mongodb_field_storage: Store the fields in mongodb.
mongodb_session: Store sessions in mongodb.
mongodb_watchdog: Store watchdog messages in
mongodb
66. mongoDB module
http://drupal.org/project/mongodb
mongodb: support library for the other modules
mongodb_cache: Store cache items in mongodb.
mongodb_field_storage: Store the fields in mongodb.
mongodb_session: Store sessions in mongodb.
mongodb_watchdog: Store watchdog messages in
mongodb
mongodb_block: Store block information in
mongodb.
Very close to the core block API.
69. EntityFieldQuery Views
Backend
http://drupal.org/
project/efq_views
This module enables Views to use
EntityFieldQuery as the query
backend, allowing you to query all
defined entity types and their fields,
even the ones stored in non-sql
storage such as mongodb.
70. Load into nodes into mongo
<?php
// Connect
$mongo = new Mongo();
// Get the database (it is created automatically)
$db = $mongo->testDatabase;
// Get the collection for nodes (it is created automatically)
$collection = $db->nodes;
// Get a listing of all of the node IDs
$r = db_query('SELECT nid FROM {node}');
// Loop through all of the nodes...
foreach($r as $row) {
print "Writing node $row->nidn";
// Load each node and convert it to an array.
$node = (array)node_load($row->nid);
// Store the node in MongoDB
$collection->save($node);
}
?>
72. code sample
# drush php-script mongoimport.php
# use testDatabase;
# db.nodes.find( {title: /Distineo/i} , {title: true}).limit(4);
// how to use mongo in php code
<?php
// Connect
$mongo = new Mongo();
// Write our search filter (same as shell example above)
$filter = array(
'title' => new MongoRegex('/Distineo/i'),
);
// Run the query, getting only 5 results.
$res = $mongo->testDatabase->nodes->find($filter)->limit(5);
// Loop through and print the title of each article.
foreach ($res as $row) {
print $row['title'] . PHP_EOL;
}
?>
73. Where mongo won’t
work
Joining across Entities
ex. return birthday from profile
belonging to author of current node
Pressflow is a distribution of Drupal with integrated performance, scalability, availability, and testing&#xA0;enhancements.\nGreat for Drupal 6, but in case of Drupal 7 just some minor setting changes.\nPressflow addresses a long-standing problem: High-traffic sites use stable versions of Drupal, and stable versions of Drupal are ineligible for enhancements to solve performance bottlenecks discovered after widespread&#xA0;deployment.\n\n
Drupal sites live or die by their database. - I think that every Drupal developer (module dev) should have this printed and hanged over his desk.\n
\n
see this image, that was first class computer from the time when...\nyeah, when first relational database was created.\n
see this image, that was first class computer from the time when...\nyeah, when first relational database was created.\n
Remember in 1995 there were around 10,000 websites. Mosiac, Lynx, Mozilla (pre netscape) and IE 2.0 were the only web browsers. \nApache (Dec &#x2019;95), Java (&#x2019;96), PHP (June &#x2019;95), and .net didn&#x2019;t exist yet. Linux just barely (1.0 in &#x2019;94)\n
Remember in 1995 there were around 10,000 websites. Mosiac, Lynx, Mozilla (pre netscape) and IE 2.0 were the only web browsers. \nApache (Dec &#x2019;95), Java (&#x2019;96), PHP (June &#x2019;95), and .net didn&#x2019;t exist yet. Linux just barely (1.0 in &#x2019;94)\n
Remember in 1995 there were around 10,000 websites. Mosiac, Lynx, Mozilla (pre netscape) and IE 2.0 were the only web browsers. \nApache (Dec &#x2019;95), Java (&#x2019;96), PHP (June &#x2019;95), and .net didn&#x2019;t exist yet. Linux just barely (1.0 in &#x2019;94)\n
please take this question mark with grain of salt. We still use this models as they work (more or less) and decades of development created bitten path that everyone knows.\n- Once you have related data, you need joins\n- Indexing on joints does not work that well\n... So you:\n- Introduce denormalization\n- Build extra tables\n\n
please take this question mark with grain of salt. We still use this models as they work (more or less) and decades of development created bitten path that everyone knows.\n- Once you have related data, you need joins\n- Indexing on joints does not work that well\n... So you:\n- Introduce denormalization\n- Build extra tables\n\n
\n
\n
\n
\n
Nothing could be more representative of this sudden shift than the progress of NoSQL technologies against well-established relational databases. It almost seems like one day the web was being driven by a few RDBMS' and the next, five or so NoSQL solutions had established themselves as worthy solutions.\n\nAs a document-oriented database, Mongo is a more generalized NoSQL solution. It should be viewed as an alternative to relational databases. Like relational databases, it too can benefit from being paired with some of the more specialized NoSQL solutions. MongoDB has advantages and drawbacks\n
- Where NoSQL poses a clear and present danger to MySQL is in the web application market where MySQL has made its name. Few are going to rip and replace a database for existing applications, but new applications are increasingly going the NoSQL route. As 451 Research notes: "NoSQL database technologies are largely being adopted for new projects that require additional scalability, performance, relaxed consistency and agility."\n- From no real alternatives to MySQL to an overabundance, and in just two years. That's an amazingly fast shift, and it says a great deal about how open source drives innovation.\n
- Where NoSQL poses a clear and present danger to MySQL is in the web application market where MySQL has made its name. Few are going to rip and replace a database for existing applications, but new applications are increasingly going the NoSQL route. As 451 Research notes: "NoSQL database technologies are largely being adopted for new projects that require additional scalability, performance, relaxed consistency and agility."\n\n- From no real alternatives to MySQL to an overabundance, and in just two years. That's an amazingly fast shift, and it says a great deal about how open source drives innovation.\n
- Where NoSQL poses a clear and present danger to MySQL is in the web application market where MySQL has made its name. Few are going to rip and replace a database for existing applications, but new applications are increasingly going the NoSQL route. As 451 Research notes: "NoSQL database technologies are largely being adopted for new projects that require additional scalability, performance, relaxed consistency and agility."\n\n- From no real alternatives to MySQL to an overabundance, and in just two years. That's an amazingly fast shift, and it says a great deal about how open source drives innovation.\n
- Where NoSQL poses a clear and present danger to MySQL is in the web application market where MySQL has made its name. Few are going to rip and replace a database for existing applications, but new applications are increasingly going the NoSQL route. As 451 Research notes: "NoSQL database technologies are largely being adopted for new projects that require additional scalability, performance, relaxed consistency and agility."\n\n- From no real alternatives to MySQL to an overabundance, and in just two years. That's an amazingly fast shift, and it says a great deal about how open source drives innovation.\n
\n
\n
MongoDB is a high performance NoSQL database that is significantly faster than mysql for reads and writes. \n
Document-oriented storage\nJSON-style documents with dynamic schemas offer simplicity and power.\n(JSON - JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for many languages.)\n\nFull Index Support\nIndex on any attribute, just like you're used to.\n\nReplication & High Availability\nMirror across LANs and WANs for scale and peace of mind.\n\nAuto-Sharding\nScale horizontally without compromising functionality.\n\nQuerying\nRich, document-based queries.\n\nFast In-Place Updates\nAtomic modifiers for contention-free performance.\n\nMap/Reduce\nFlexible aggregation and data processing.\n\nGridFS\nStore files of any size without complicating your stack.\n\nCommercial Support\nEnterprise class support, training, and consulting available.\n
MapReduce is a framework for processing embarrassingly parallel problems across huge datasets using a large number of computers (nodes), collectively referred to as a cluster (if all nodes are on the same local network and use similar hardware) or a grid (if the nodes are shared across geographically and administratively distributed systems, and use more heterogenous hardware). Computational processing can occur on data stored either in a filesystem (unstructured) or in a database (structured).\n
Document-oriented storage\nJSON-style documents with dynamic schemas offer simplicity and power.\n\nFull Index Support\nIndex on any attribute, just like you're used to.\n\nReplication & High Availability\nMirror across LANs and WANs for scale and peace of mind.\n\nAuto-Sharding\nScale horizontally without compromising functionality.\n\nQuerying\nRich, document-based queries.\n\nFast In-Place Updates\nAtomic modifiers for contention-free performance.\n\nMap/Reduce\nFlexible aggregation and data processing.\n\nGridFS\nStore files of any size without complicating your stack.\n\nCommercial Support\nEnterprise class support, training, and consulting available.\n
By reducing transactional semantics the db provides, one can still solve an interesting set of problems where performance is very important, and horizontal scaling then becomes easier.\n\n
\n
a.To recap, MongoDB is made up of&#xA0;databases&#xA0;which contain&#xA0;collections. A&#xA0;collection&#xA0;is made up of&#xA0;documents. Each&#xA0;document&#xA0;is made up of&#xA0;fields.&#xA0;Collections&#xA0;can be&#xA0;indexed, which improves lookup and sorting performance. Finally, when we get data from MongoDB we do so through a&#xA0;cursor&#xA0;whose actual execution is delayed until necessary.\nb.You might be wondering, why use new terminology (collection vs. table, document vs. row and field vs. column). Is it just to make things more complicated? The truth is that while these concepts are similar to their relational database counterparts, they are not identical. The core difference comes from the fact that relational databases define&#xA0;columns&#xA0;at the&#xA0;table&#xA0;level whereas a document-oriented database defines its&#xA0;fields&#xA0;at the&#xA0;document&#xA0;level. That is to say that each&#xA0;document&#xA0;within a&#xA0;collection&#xA0;can have its own unique set of&#xA0;fields. As such, a&#xA0;collection&#xA0;is a dumbed down container in comparison to a&#xA0;table, while a&#xA0;document&#xA0;has a lot more information than a&#xA0;row.\nc.Ultimately, the point is that a collection isn't strict about what goes in it (it's schema-less). Fields are tracked with each individual document. The benefits and drawbacks of this&#xA0;\n
\n
\n
\n
\n
\n
\n
\n
\n
you can do the same thing manually, but in that case you need to deal with all aliases, scripts, starting db as service, etc (recommended for unix admin & prod env).\nafter this do not forget to install mongo driver for php (additional few commands).\n
\n
\n
\n
Traditionally if you want something (some property) from node, you run query that filters all the properties that belongs to the node and fish out all the fields from all these tables that you are interested in.\nIn Drupal 7 this is slow way.\nIn Drupal 7 regardless to mongo what you want to do is to grab node id, user id, term ids, and to run multiple runs agains them because you have entity cache and all this things instead to come from various sql tables will come as one blob from memcache. And that is way faster.\n\n
Cache backend (not big deal)\n- Field_storage (Oh yes)\nIn Drupal 7 we store every field in different table. That is not going to be good from performance point of view\n- Session - lots of writes moved to mongo\n- Watchdog \n- Block\n- Queue\nBIG, BIG THING IS FIELDS_STORAGE!!!\n
Cache backend (not big deal)\n- Field_storage (Oh yes)\nIn Drupal 7 we store every field in different table. That is not going to be good from performance point of view\n- Session - lots of writes moved to mongo\n- Watchdog \n- Block\n- Queue\nBIG, BIG THING IS FIELDS_STORAGE!!!\n
Cache backend (not big deal)\n- Field_storage (Oh yes)\nIn Drupal 7 we store every field in different table. That is not going to be good from performance point of view\n- Session - lots of writes moved to mongo\n- Watchdog \n- Block\n- Queue\nBIG, BIG THING IS FIELDS_STORAGE!!!\n
Cache backend (not big deal)\n- Field_storage (Oh yes)\nIn Drupal 7 we store every field in different table. That is not going to be good from performance point of view\n- Session - lots of writes moved to mongo\n- Watchdog \n- Block\n- Queue\nBIG, BIG THING IS FIELDS_STORAGE!!!\n
Cache backend (not big deal)\n- Field_storage (Oh yes)\nIn Drupal 7 we store every field in different table. That is not going to be good from performance point of view\n- Session - lots of writes moved to mongo\n- Watchdog \n- Block\n- Queue\nBIG, BIG THING IS FIELDS_STORAGE!!!\n
Cache backend (not big deal)\n- Field_storage (Oh yes)\nIn Drupal 7 we store every field in different table. That is not going to be good from performance point of view\n- Session - lots of writes moved to mongo\n- Watchdog \n- Block\n- Queue\nBIG, BIG THING IS FIELDS_STORAGE!!!\n
Updated just few days ago (possible for this presentation).\nCheck discrepancy between number of downloads and reported installs. More than 130x!!! \nNote: there is big possibility that everyone who use mongodb has update module turned off, but anyway...\n\nAs per 451 research; 49% of survey respondents abandoning MySQL planned on retaining or adopting NoSQL databases. --> only 12.7% said they had actually deployed NoSQL db as direct replacement for MySQL.\n