The document discusses optimizing Drupal using MongoDB. It provides an agenda for the discussion, including an introduction to MongoDB and how to install and configure it for use with Drupal. The benefits of using MongoDB with Drupal are highlighted, with a focus on speed, scale, and simplicity compared to traditional SQL databases. Examples are given showing how document-based data storage in MongoDB can more flexibly support different data models compared to relational databases.
A presentation by Jai Prakash and Vinod Bhasyam from Sapient, presented at Sitecore User Group Bangalore - August 2015 meetup held at Verndale, Bangalore.
Webinar: MongoDB and Drupal 8 - Life without SQLMongoDB
Drupal, the popular PHP content management system, has undergone vast changes since its last stable release more than two years ago. While Drupal 7 already allowed for some integration with MongoDB, you will be able to run Drupal without any SQL in Drupal 8. Learn how a few seemingly unrelated initiatives played perfectly into this and how you can use Drupal with MongoDB.
During this session we will cover the best practices for implementing a product catalog with MongoDB. We will cover how to model an item properly when it can have thousands of variations and thousands of properties of interest. You'll learn how to index properly and allow for faceted search with milliseconds response latency and how to implement per-store, per-sku pricing while still keeping a sane number of documents. We will also cover operational considerations, like how to bring the data closer to users to cut down the network latency.
A presentation by Jai Prakash and Vinod Bhasyam from Sapient, presented at Sitecore User Group Bangalore - August 2015 meetup held at Verndale, Bangalore.
Webinar: MongoDB and Drupal 8 - Life without SQLMongoDB
Drupal, the popular PHP content management system, has undergone vast changes since its last stable release more than two years ago. While Drupal 7 already allowed for some integration with MongoDB, you will be able to run Drupal without any SQL in Drupal 8. Learn how a few seemingly unrelated initiatives played perfectly into this and how you can use Drupal with MongoDB.
During this session we will cover the best practices for implementing a product catalog with MongoDB. We will cover how to model an item properly when it can have thousands of variations and thousands of properties of interest. You'll learn how to index properly and allow for faceted search with milliseconds response latency and how to implement per-store, per-sku pricing while still keeping a sane number of documents. We will also cover operational considerations, like how to bring the data closer to users to cut down the network latency.
Slides from workshop held on 12/14 in Asbury Park, NJ
http://www.meetup.com/Jersey-Shore-Tech/events/148118762/?gj=ro2_e&a=ro2_gnl&rv=ro2_e&_af_eid=148118762&_af=event
This presentation was given at the LDS Tech SORT Conference 2011 in Salt Lake City. The slides are quite comprehensive covering many topics on MongoDB. Rather than a traditional presentation, this was presented as more of a Q & A session. Topics covered include. Introduction to MongoDB, Use Cases, Schema design, High availability (replication) and Horizontal Scaling (sharding).
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And WhenDavid Peyruc
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
Massimo Brignoli, MongoDB Inc
The presentation will illustrate what MongoDB is, the advantages of the document based approach and some of the use cases where MongoDB is a perfect fit.
CouchDB presentation with some technical details, made for a technical audience, shows use cases, comparison to other nosql databases and why it's useful for publishers
Con MongoDB 3.6, podrá avanzar al ritmo que marcan sus datos. Los plazos de lanzamiento de las nuevas aplicaciones se acelerarán, y estas funcionarán de forma segura y fiable en entornos de cualquier tamaño, además de aportar información útil en tiempo real. https://www.mongodb.com/mongodb-3.6
When it comes time to select database software for your project, there are a bewildering number of choices. How do you know if your project is a good fit for a relational database, or whether one of the many NoSQL options is a better choice?
In this webinar you will learn when to use MongoDB and how to evaluate if MongoDB is a fit for your project. You will see how MongoDB's flexible document model is solving business problems in ways that were not previously possible, and how MongoDB's built-in features allow running at scale.
Topics covered include:
Performance and Scalability
MongoDB's Data Model
Popular MongoDB Use Cases
Customer Stories
Considerations for using NoSQL technology on your next IT project - Akmal Cha...jaxconf
Over the past few years, we have seen the emergence and growth of NoSQL technology. This has attracted interest from organizations looking to solve new business problems. There are also examples of how this technology has been used to bring practical and commercial benefits to some organizations. However, since it is still an emerging technology, careful consideration is required in finding the relevant developer skills and choosing the right product. This presentation will discuss these issues in greater detail. In particular, it will focus on some of the leading NoSQL products, such as MongoDB, Cassandra, Redis, and Neo4j and will discuss their architectures and suitability for different problems. Short demonstrations, using Java, are planned to give the audience a feel for the practical aspects of such products.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Slides from workshop held on 12/14 in Asbury Park, NJ
http://www.meetup.com/Jersey-Shore-Tech/events/148118762/?gj=ro2_e&a=ro2_gnl&rv=ro2_e&_af_eid=148118762&_af=event
This presentation was given at the LDS Tech SORT Conference 2011 in Salt Lake City. The slides are quite comprehensive covering many topics on MongoDB. Rather than a traditional presentation, this was presented as more of a Q & A session. Topics covered include. Introduction to MongoDB, Use Cases, Schema design, High availability (replication) and Horizontal Scaling (sharding).
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And WhenDavid Peyruc
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
Massimo Brignoli, MongoDB Inc
The presentation will illustrate what MongoDB is, the advantages of the document based approach and some of the use cases where MongoDB is a perfect fit.
CouchDB presentation with some technical details, made for a technical audience, shows use cases, comparison to other nosql databases and why it's useful for publishers
Con MongoDB 3.6, podrá avanzar al ritmo que marcan sus datos. Los plazos de lanzamiento de las nuevas aplicaciones se acelerarán, y estas funcionarán de forma segura y fiable en entornos de cualquier tamaño, además de aportar información útil en tiempo real. https://www.mongodb.com/mongodb-3.6
When it comes time to select database software for your project, there are a bewildering number of choices. How do you know if your project is a good fit for a relational database, or whether one of the many NoSQL options is a better choice?
In this webinar you will learn when to use MongoDB and how to evaluate if MongoDB is a fit for your project. You will see how MongoDB's flexible document model is solving business problems in ways that were not previously possible, and how MongoDB's built-in features allow running at scale.
Topics covered include:
Performance and Scalability
MongoDB's Data Model
Popular MongoDB Use Cases
Customer Stories
Considerations for using NoSQL technology on your next IT project - Akmal Cha...jaxconf
Over the past few years, we have seen the emergence and growth of NoSQL technology. This has attracted interest from organizations looking to solve new business problems. There are also examples of how this technology has been used to bring practical and commercial benefits to some organizations. However, since it is still an emerging technology, careful consideration is required in finding the relevant developer skills and choosing the right product. This presentation will discuss these issues in greater detail. In particular, it will focus on some of the leading NoSQL products, such as MongoDB, Cassandra, Redis, and Neo4j and will discuss their architectures and suitability for different problems. Short demonstrations, using Java, are planned to give the audience a feel for the practical aspects of such products.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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