SlideShare ist ein Scribd-Unternehmen logo
1 von 60
Downloaden Sie, um offline zu lesen
Simplifying & Accelerating
Application Development With
MongoDB’s Intelligent
Operational Data Platform
4
MongoDB’s
Intelligent Operational Data Platform
is the best way of making your data simple
to Organize, Use, & Enrich
in Real Time, Anywhere
You probably have thousands of tables
6
Go from this….
Customer Opportunity Contact
Opportunity
Team
Phone Phone
Objects
Tables
Lead
NameNameOpen Activities
ARR Address Contact Roles
SummaryCustomer Detail Activity History
Object Relational Mapping Layer
7
To this: store objects directly…
Customer
Customer
Opportunity
Opportunity
Contact
Contact
Lead
Lead
Objects
Database
8
Document Model
{
first_name: ‘Paul’,
surname: ‘Miller’,
city: ‘London’,
location: {
type : ‘Point’,
coordinates : [45.123,47.232]
},
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
MongoDB
RDBMS
9
Developer Agility - Documents
{
first_name: ‘Paul’,
surname: ‘Miller’,
ID: 125678,
city: ‘London’,
location: {
type : ‘Point’,
coordinates : [45.123,47.232]
},
Profession: [‘banking’, ‘finance’, ‘trader’],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
]
}
Fields can contain an array
of sub-documents
Typed field values
Fields can contain
arrays
String
Number
Geo-Location
Fields
10
Developer Agility – Flexible Schema
{
product_name: ‘Acme Paint’,
sku: "123-567-845",
color: [‘Red’, ‘Green’],
size_oz: [8, 32],
finish: [‘satin’, ‘eggshell’]
}
{
product_name: ‘T-shirt’,
sku : "123-589-234",
size: [‘S’, ‘M’, ‘L’, ‘XL’],
color: [‘Heather Gray’ … ],
material: ‘100% cotton’,
wash: ‘cold’,
dry: ‘tumble dry low’
}
{
product_name: ‘Mountain Bike’,
sku : "143-534-678",
brake_style: ‘mechanical disc’,
color: ‘grey’,
frame_material: ‘aluminum’,
no_speeds: 21,
package_height: ‘7.5x32.9x55’,
weight_lbs: 44.05,
suspension_type: ‘dual’,
wheel_size_in: 26
}
11
Developer Agility – Use Your Favourites
Morphia
MEAN Stack
12
Easy: MongoDB Multi-Document ACID Transactions
Just like relational transactions
• Multi-statement, familiar relational syntax
• Easy to add to any application
• Multiple documents in 1 or many collections and databases
ACID guarantees
• Snapshot isolation, all or nothing execution
• No performance impact for non-transactional operations
Planning
• MongoDB 4.0: replica set
• MongoDB 4.2: extended to sharded clusters
13
Fully Indexable
Fully featured secondary indexes
• Primary Index
– Every Collection has a primary key index
• Compound Index
– Index against multiple keys in the document
• MultiKey Index
– Index into arrays
• Text Indexes
– Support for text searches
• GeoSpatial Indexes
– 2d & 2dSphere indexes for spatial geometries
• Hashed Indexes
– Hashed based values for sharding
Index Types
• TTL Indexes
– Single Field indexes, when expired delete the document
• Unique Indexes
– Ensures value is not duplicated
• Partial Indexes
– Expression based indexes, allowing indexes on subsets of data
• Case Insensitive Indexes
• supports text search using case insensitive search
• Sparse Indexes
– Only index documents which have the given field
Index Features
14
Aggregations
Advanced data processing
pipeline for transformations
and analytics
• Multiple stages
• Similar to a unix pipe
– Build complex pipeline by
chaining commands together
• Rich Expressions
Collection
db.orders.aggregate( [
$match stage { $match: { status: "A" } },
$group stage { $group: { _id: "$cust_id",total: { $sum: "$amount" } } }
] )
{
cust_id: "A123",
amount: 500,
status: "A",
}
{
cust_id: "A123",
amount: 250,
status: "A",
}
{
cust_id: "B212",
amount: 200,
status: "A",
}
{
cust_id: "A123",
amount: 300,
status: "D",
}
Orders
{
cust_id: "A123",
amount: 500,
status: "A",
}
{
cust_id: "A123",
amount: 250,
status: "A",
}
{
cust_id: "B212",
amount: 200,
status: "A",
}
{
id: "A123",
total: 750
}
{
id: "B212",
total: 200
}
$match $group
15
Aggregation Features
A feature rich analytical framework
• $match
• $group
• $facet
• $geoNear
• $graphLookup
Pipeline Stages
• Mathematical
– $add, $abs,
$substract,
$multiply, $divide,
$log, $log10,
$stdDevPop,
$stdDevSam, $avg,
$sqrt, $pow, $sum,
$zip, $convert, etc.
• Array
– $push, $reduce,
$reverseArray,
$addToSet,
$arrayElemAt,
$slice, etc.
Operators
• $lookup
• $project
• $sort
• $unwind
• $out
• Conditionals
– $and, $or, $eq, $lt,
$lte, $gt, $gte,
$cmp, $cond,
$switch, $in, etc
• Date
– $dateFromParts,
$dateToParts,
$dateFromString,
$dateToString,
$dayOfMonth,
$isoWeek, $minute,
$month, $year, etc.
• String
– $toUpper, $toLower,
$substr,
$strcasecmp,
$concat, $split, etc.
• Laterals
– $exp, $let, $literal,
$map, $type, etc
16
Compared to SQL JOINs and aggregation
SELECT
city,
SUM(annual_spend) Total_Spend,
AVG(annual_spend) Average_Spend,
MAX(annual_spend) Max_Spend,
COUNT(annual_spend) customers
FROM (
SELECT t1.city, customer.annual_spend
FROM customer
LEFT JOIN (
SELECT address.address_id, city.city,
address.customer_id, address.location
FROM address LEFT JOIN city
ON address.city_id = city.city_id
) AS t1
ON
(customer.customer_id = t1.customer_id AND
t1.location = "home")
) AS t2
GROUP BY city;
SQL queries have a
nested structure
Understanding the outer
layers requires
understanding the inner
ones
So SQL has to be read
“inside-out”
17
db.customers.aggregate([
{
$unwind: "$address",
},
{
$match: {"address.location": "home"}
},
{
$group: {
_id: "$address.city",
totalSpend: {$sum: "$annualSpend"},
averageSpend: {$avg: "$annualSpend"},
maximumSpend: {$max: "$annualSpend"},
customers: {$sum: 1}
}
}
])
Versatile: Complex queries fast to create, optimize, & maintain
MongoDB’s aggregation framework has the flexibility you need to get
value from your data, but without the complexity and fragility of SQL
These “phases” are distinct and
easy to understand
They can be thought about in
order… no nesting.
18
Developer Agility – Compass – MongoDB GUI
Debug & Optimize
Visualize & Explore
Insert, Modify, & Delete
19
Sophisticated Analytics & Visualizations Of Data In Place
• Rich MongoDB query
language & idiomatic
drivers
• Connector for BI
• Connector for Spark
• Charts (beta)
MongoDB Charts: Create, Visualize, Share
Work with complex data Connect to data sources securely.
Filter. Sample. Visualize.
Share dashboards and
collaborate
21
Versatile: MongoDB Change Streams
Enabling developers to build
reactive, real-time servicesChangeStreamsAPI
Business
Apps
User Data
Sensors
Clickstream
Real-Time
Event Notifications
Message Queue
22
High Availability and Data Durability – Replica Sets
SecondarySecondary
Primary
23
Replica Set Creation
SecondarySecondary
Primary
Heartbeat
24
Replica Set Node Failure
SecondarySecondary
Primary
No Heartbeat
25
Replica Set Recovery
SecondarySecondary
Heartbeat
And Election
26
New Replica Set – 2 Nodes
SecondaryPrimary
Heartbeat
And New Primary
27
Replica Set Repair
SecondaryPrimary
Secondary
Rejoin and resync
28
Replica Set Stable
SecondaryPrimary
Secondary
Heartbeat
29
Strong Consistency
SecondarySecondary
Primary
Client Application
Client Driver
Write
Read
30
Eventual Consistency
SecondarySecondary
Primary
Client Application
Client Driver
Write
Read
Read
Developing with MongoDB
Application
Driver
mongod
/data
32
Replica Set
Read Preference
Write Concern
Read Concern
33
Replica Set Bottlenecks
Application
Driver
Primary
/data
Secondary
/data
Secondary
/data
RAM Limits on
single server
CPU Limits on
single server
Network
Bandwidth
Disk I/O
34
Reasons to Shard
Performance
Data locality
Recovery Time
Objective (RTO)
Sharded Cluster
Application
mongos mongos mongos
Driver
36
Sharded Cluster
Application
mongos mongos mongos
Driver
Config Server
Cloud ManagerOps Manager MongoDB Atlas
Private DBaaS
Compatibility multi-environment
Hybrid DBaaS Public DBaaS
Fully managed
Same codebase, same API & same UI
38
Operational Agility – Atlas - Database as a
Service
Self-service, elastic,
and automated
Secure by defaultGlobal and highly
available
Continuous
backups
Real-time monitoring and
optimization
Cloud agnostic
39
Demo!
Evolution of Computing Models
Evolution to more streamlined, managed infrastructure
Large Data Center Virtual Machines VMs in the Cloud (EC2) Containers Serverless
Manage H/W Manage less H/W Size & provision VMs Size & provision containers Just send in requests
Wasted resources Better utilization Rent, not buy Rent with less waste Pay as you go
$$$$$ $$$$ $$$ $$ $
Cheaper to build
Cheaper to run
Faster time to market
MongoDB Stitch
The Best Way to Work With Data
Focus Your Energy Where You Can Make a Difference
App Backend Infrastructure
Core Database Functionality
Storage
Service integrations, data access control
Code that moves the business forward
Managing OS, Scale, Security, Backups, etc.
Time
40%
40%
20%
Focus Your Energy Where You Can Make a Difference
App Backend Infrastructure
Core Database Functionality
Storage
Service integrations, data access control
Code that moves the business forward
Managing OS, Scale, Security, Backups, etc.
MongoDB
Atlas
Time
40%
40%
20%
Focus Your Energy Where You Can Make a Difference
App Backend Infrastructure
Core Database Functionality
Storage
Service integrations, data access control
Code that moves the business forward
Managing OS, Scale, Security, Backups, etc.
MongoDB
Atlas
MongoDB
Stitch Fully managed
Elastic scale
Highly Available
Secure
Time
40%
40%
20%
Focus Your Energy Where You Can Make a Difference
App Backend Infrastructure
Core Database Functionality
Storage
Service integrations, data access control
Code that moves the business forward
Managing OS, Scale, Security, Backups, etc.
MongoDB
Atlas
MongoDB
Stitch Fully managed
Elastic scale
Highly Available
Secure
Customer can focus here
Time
40%
40%
20%
Streamlines app development with simple, secure access to data and services from the client with thousands of lines less
code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs.
Stitch QueryAnywhere
Full power of MongoDB
document model & query
language in frontend code
Fine-grained security
policies through
declarative rules
MongoDB Stitch Serverless Platform Services
Streamlines app development with simple, secure access to data and services from the client with thousands of lines less
code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs.
Stitch QueryAnywhere
Full power of MongoDB
document model & query
language in frontend code
Fine-grained security
policies through
declarative rules
Stitch Functions
Run simple JavaScript
functions in Stitch’s
serverless environment
Power apps with Server-side
logic, or enable Data as a
Service with custom APIs.
MongoDB Stitch Serverless Platform Services
Streamlines app development with simple, secure access to data and services from the client with thousands of lines less
code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs.
Stitch QueryAnywhere
Full power of MongoDB
document model & query
language in frontend code
Fine-grained security
policies through
declarative rules
Stitch Functions
Run simple JavaScript
functions in Stitch’s
serverless environment
Power apps with Server-side
logic, or enable Data as a
Service with custom APIs.
Stitch Triggers
Real-time notifications that
launch functions in response
to changes in the database
Make further database
changes, push data to other
places, or interact with users
MongoDB Stitch Serverless Platform Services
Stitch QueryAnywhere
Full power of MongoDB
document model & query
language in frontend code
Fine-grained security
policies through
declarative rules
Stitch Functions
Run simple JavaScript
functions in Stitch’s
serverless environment
Power apps with Server-side
logic, or enable Data as a
Service with custom APIs.
Stitch Mobile Sync
Automatically synchronizes
data between documents
held locally in MongoDB
Mobile and the backend
database
(coming soon)
Streamlines app development with simple, secure access to data and services from the client with thousands of lines less
code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs.
Stitch Triggers
Real-time notifications that
launch functions in response
to changes in the database
Make further database
changes, push data to other
places, or interact with users
MongoDB Stitch Serverless Platform Services
50
Demo!
MongoDB Stitch Benefits
Reduce Time to Market
Functions as a Service: No
waiting on infrastructure
Service Integrations: Save
coding
Cross-Platform: Develop
once
Existing Apps Untouched:
No reverse-engineering
MongoDB Stitch Benefits
Reduce Time to Market
Functions as a Service: No
waiting on infrastructure
Service Integrations: Save
coding
Cross-Platform: Develop
once
Existing Apps Untouched:
No reverse-engineering
Reduce Operational costs
Serverless: We manage the
platform for you
PaYG: No up-front cost
Capacity on Demand: Zero
wasted resources
Secure by Default: Less ops
effort
MongoDB Stitch Benefits
Reduce Time to Market
Functions as a Service: No
waiting on infrastructure
Service Integrations: Save
coding
Cross-Platform: Develop
once
Existing Apps Untouched:
No reverse-engineering
Reduce Development Effort
Backend Integrations Built in:
Don't write generic backend code
HA & Scalability Built in: Hard
and time consuming to build
Orchestrate Data Between
Services: Reuse what's out there
Stitch Runs Your Code: The only
backend you need
Reduce Operational costs
Serverless: We manage the
platform for you
PaYG: No up-front cost
Capacity on Demand: Zero
wasted resources
Secure by Default: Less ops
effort
MongoDB Stitch Benefits
Reduce Time to Market
Functions as a Service: No
waiting on infrastructure
Service Integrations: Save
coding
Cross-Platform: Develop
once
Existing Apps Untouched:
No reverse-engineering
Reduce Development Effort
Backend Integrations Built in:
Don't write generic backend code
HA & Scalability Built in: Hard
and time consuming to build
Orchestrate Data Between
Services: Reuse what's out there
Stitch Runs Your Code: The only
backend you need
Reduce Operational costs
Serverless: We manage the
platform for you
PaYG: No up-front cost
Capacity on Demand: Zero
wasted resources
Secure by Default: Less ops
effort
Secure Data Access:
Simple, Declarative Rules
Complete Authentication &
Authorization out of the box:
Authenticate anything and
anyone; protect anything
Precise, Flexible, Extensible
Rules: Lock access down tighter
Flexible Auth Options: Choose
which auth service(s) to use
All the Functionality & Scalability of MongoDB
•Full feature set
– Not just key-value store
•Scale up or out
•Retain traditional access methods
•No lock-in
•AWS at start of beta, extending to
on-premises and other cloud providers.
56
Conclusion
@MBeugnet MaBeuLux88
57
Community is awesome!
https://mongo-db.slack.com
https://mongodb.influitive.com/
Where Europe’s fastest growing database community comes to
connect, explore, and learn.
MongoDB Europe 2018
November 8th, Old Billingsgate
● Register at
mongodbworld.com/europe18
● Use code MUG25 to get 25%
off tickets
● Groups get an additional 25%
off!
Ready to Register?
Simplifying & accelerating application development with MongoDB's intelligent operational data platform

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And WhentranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
 
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDBMongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
 
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demandsMongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
MongoDB .local Toronto 2019: MongoDB – Powering the new age data demands
 
NoSQL Data Modeling using Couchbase
NoSQL Data Modeling using CouchbaseNoSQL Data Modeling using Couchbase
NoSQL Data Modeling using Couchbase
 
Webinar: How Banks Use MongoDB as a Tick Database
Webinar: How Banks Use MongoDB as a Tick DatabaseWebinar: How Banks Use MongoDB as a Tick Database
Webinar: How Banks Use MongoDB as a Tick Database
 
The Right (and Wrong) Use Cases for MongoDB
The Right (and Wrong) Use Cases for MongoDBThe Right (and Wrong) Use Cases for MongoDB
The Right (and Wrong) Use Cases for MongoDB
 
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
 
MongoDB + Spring
MongoDB + SpringMongoDB + Spring
MongoDB + Spring
 
Jumpstart: Introduction to MongoDB
Jumpstart: Introduction to MongoDBJumpstart: Introduction to MongoDB
Jumpstart: Introduction to MongoDB
 
MongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
MongoDB Evenings DC: MongoDB - The New Default Database for Giant IdeasMongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
MongoDB Evenings DC: MongoDB - The New Default Database for Giant Ideas
 
IOOF IT System Modernisation
IOOF IT System ModernisationIOOF IT System Modernisation
IOOF IT System Modernisation
 
MongoDB .local Munich 2019: Managing a Heterogeneous Stack with MongoDB & SQL
MongoDB .local Munich 2019: Managing a Heterogeneous Stack with MongoDB & SQLMongoDB .local Munich 2019: Managing a Heterogeneous Stack with MongoDB & SQL
MongoDB .local Munich 2019: Managing a Heterogeneous Stack with MongoDB & SQL
 
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB ChartsMongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
 
MongoDB on Azure
MongoDB on AzureMongoDB on Azure
MongoDB on Azure
 
Introducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemIntroducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No Problem
 
Python and MongoDB as a Market Data Platform by James Blackburn
Python and MongoDB as a Market Data Platform by James BlackburnPython and MongoDB as a Market Data Platform by James Blackburn
Python and MongoDB as a Market Data Platform by James Blackburn
 
Query in Couchbase. N1QL: SQL for JSON
Query in Couchbase.  N1QL: SQL for JSONQuery in Couchbase.  N1QL: SQL for JSON
Query in Couchbase. N1QL: SQL for JSON
 
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local Munich 2019: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB and Azure Databricks
MongoDB and Azure DatabricksMongoDB and Azure Databricks
MongoDB and Azure Databricks
 
N1QL workshop: Indexing & Query turning.
N1QL workshop: Indexing & Query turning.N1QL workshop: Indexing & Query turning.
N1QL workshop: Indexing & Query turning.
 

Ähnlich wie Simplifying & accelerating application development with MongoDB's intelligent operational data platform

Building your First MEAN App
Building your First MEAN AppBuilding your First MEAN App
Building your First MEAN App
MongoDB
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revised
MongoDB
 
MongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB Tick Data Presentation
MongoDB Tick Data Presentation
MongoDB
 

Ähnlich wie Simplifying & accelerating application development with MongoDB's intelligent operational data platform (20)

MongoDB 3.4 webinar
MongoDB 3.4 webinarMongoDB 3.4 webinar
MongoDB 3.4 webinar
 
Confluent & MongoDB APAC Lunch & Learn
Confluent & MongoDB APAC Lunch & LearnConfluent & MongoDB APAC Lunch & Learn
Confluent & MongoDB APAC Lunch & Learn
 
Data Analytics with MongoDB - Jane Fine
Data Analytics with MongoDB - Jane FineData Analytics with MongoDB - Jane Fine
Data Analytics with MongoDB - Jane Fine
 
Building your First MEAN App
Building your First MEAN AppBuilding your First MEAN App
Building your First MEAN App
 
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - What's new with MongoDB 6.0 and AtlasData Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
Introduction to MongoDB and Workshop
Introduction to MongoDB and WorkshopIntroduction to MongoDB and Workshop
Introduction to MongoDB and Workshop
 
Big Data Analytics in the Cloud with Microsoft Azure
Big Data Analytics in the Cloud with Microsoft AzureBig Data Analytics in the Cloud with Microsoft Azure
Big Data Analytics in the Cloud with Microsoft Azure
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revised
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
 
MongoDB Tick Data Presentation
MongoDB Tick Data PresentationMongoDB Tick Data Presentation
MongoDB Tick Data Presentation
 
Webinar: How Banks Use MongoDB as a Tick Database
Webinar: How Banks Use MongoDB as a Tick DatabaseWebinar: How Banks Use MongoDB as a Tick Database
Webinar: How Banks Use MongoDB as a Tick Database
 
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
 Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDB
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Schema Agnostic Indexing with Azure DocumentDB
Schema Agnostic Indexing with Azure DocumentDBSchema Agnostic Indexing with Azure DocumentDB
Schema Agnostic Indexing with Azure DocumentDB
 
No SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBNo SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDB
 
Which Questions We Should Have
Which Questions We Should HaveWhich Questions We Should Have
Which Questions We Should Have
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Simplifying & accelerating application development with MongoDB's intelligent operational data platform

  • 1.
  • 2. Simplifying & Accelerating Application Development With MongoDB’s Intelligent Operational Data Platform
  • 3.
  • 4. 4 MongoDB’s Intelligent Operational Data Platform is the best way of making your data simple to Organize, Use, & Enrich in Real Time, Anywhere
  • 5. You probably have thousands of tables
  • 6. 6 Go from this…. Customer Opportunity Contact Opportunity Team Phone Phone Objects Tables Lead NameNameOpen Activities ARR Address Contact Roles SummaryCustomer Detail Activity History Object Relational Mapping Layer
  • 7. 7 To this: store objects directly… Customer Customer Opportunity Opportunity Contact Contact Lead Lead Objects Database
  • 8. 8 Document Model { first_name: ‘Paul’, surname: ‘Miller’, city: ‘London’, location: { type : ‘Point’, coordinates : [45.123,47.232] }, cars: [ { model: ‘Bentley’, year: 1973, value: 100000, … }, { model: ‘Rolls Royce’, year: 1965, value: 330000, … } ] } MongoDB RDBMS
  • 9. 9 Developer Agility - Documents { first_name: ‘Paul’, surname: ‘Miller’, ID: 125678, city: ‘London’, location: { type : ‘Point’, coordinates : [45.123,47.232] }, Profession: [‘banking’, ‘finance’, ‘trader’], cars: [ { model: ‘Bentley’, year: 1973, value: 100000, … }, { model: ‘Rolls Royce’, year: 1965, value: 330000, … } ] } Fields can contain an array of sub-documents Typed field values Fields can contain arrays String Number Geo-Location Fields
  • 10. 10 Developer Agility – Flexible Schema { product_name: ‘Acme Paint’, sku: "123-567-845", color: [‘Red’, ‘Green’], size_oz: [8, 32], finish: [‘satin’, ‘eggshell’] } { product_name: ‘T-shirt’, sku : "123-589-234", size: [‘S’, ‘M’, ‘L’, ‘XL’], color: [‘Heather Gray’ … ], material: ‘100% cotton’, wash: ‘cold’, dry: ‘tumble dry low’ } { product_name: ‘Mountain Bike’, sku : "143-534-678", brake_style: ‘mechanical disc’, color: ‘grey’, frame_material: ‘aluminum’, no_speeds: 21, package_height: ‘7.5x32.9x55’, weight_lbs: 44.05, suspension_type: ‘dual’, wheel_size_in: 26 }
  • 11. 11 Developer Agility – Use Your Favourites Morphia MEAN Stack
  • 12. 12 Easy: MongoDB Multi-Document ACID Transactions Just like relational transactions • Multi-statement, familiar relational syntax • Easy to add to any application • Multiple documents in 1 or many collections and databases ACID guarantees • Snapshot isolation, all or nothing execution • No performance impact for non-transactional operations Planning • MongoDB 4.0: replica set • MongoDB 4.2: extended to sharded clusters
  • 13. 13 Fully Indexable Fully featured secondary indexes • Primary Index – Every Collection has a primary key index • Compound Index – Index against multiple keys in the document • MultiKey Index – Index into arrays • Text Indexes – Support for text searches • GeoSpatial Indexes – 2d & 2dSphere indexes for spatial geometries • Hashed Indexes – Hashed based values for sharding Index Types • TTL Indexes – Single Field indexes, when expired delete the document • Unique Indexes – Ensures value is not duplicated • Partial Indexes – Expression based indexes, allowing indexes on subsets of data • Case Insensitive Indexes • supports text search using case insensitive search • Sparse Indexes – Only index documents which have the given field Index Features
  • 14. 14 Aggregations Advanced data processing pipeline for transformations and analytics • Multiple stages • Similar to a unix pipe – Build complex pipeline by chaining commands together • Rich Expressions Collection db.orders.aggregate( [ $match stage { $match: { status: "A" } }, $group stage { $group: { _id: "$cust_id",total: { $sum: "$amount" } } } ] ) { cust_id: "A123", amount: 500, status: "A", } { cust_id: "A123", amount: 250, status: "A", } { cust_id: "B212", amount: 200, status: "A", } { cust_id: "A123", amount: 300, status: "D", } Orders { cust_id: "A123", amount: 500, status: "A", } { cust_id: "A123", amount: 250, status: "A", } { cust_id: "B212", amount: 200, status: "A", } { id: "A123", total: 750 } { id: "B212", total: 200 } $match $group
  • 15. 15 Aggregation Features A feature rich analytical framework • $match • $group • $facet • $geoNear • $graphLookup Pipeline Stages • Mathematical – $add, $abs, $substract, $multiply, $divide, $log, $log10, $stdDevPop, $stdDevSam, $avg, $sqrt, $pow, $sum, $zip, $convert, etc. • Array – $push, $reduce, $reverseArray, $addToSet, $arrayElemAt, $slice, etc. Operators • $lookup • $project • $sort • $unwind • $out • Conditionals – $and, $or, $eq, $lt, $lte, $gt, $gte, $cmp, $cond, $switch, $in, etc • Date – $dateFromParts, $dateToParts, $dateFromString, $dateToString, $dayOfMonth, $isoWeek, $minute, $month, $year, etc. • String – $toUpper, $toLower, $substr, $strcasecmp, $concat, $split, etc. • Laterals – $exp, $let, $literal, $map, $type, etc
  • 16. 16 Compared to SQL JOINs and aggregation SELECT city, SUM(annual_spend) Total_Spend, AVG(annual_spend) Average_Spend, MAX(annual_spend) Max_Spend, COUNT(annual_spend) customers FROM ( SELECT t1.city, customer.annual_spend FROM customer LEFT JOIN ( SELECT address.address_id, city.city, address.customer_id, address.location FROM address LEFT JOIN city ON address.city_id = city.city_id ) AS t1 ON (customer.customer_id = t1.customer_id AND t1.location = "home") ) AS t2 GROUP BY city; SQL queries have a nested structure Understanding the outer layers requires understanding the inner ones So SQL has to be read “inside-out”
  • 17. 17 db.customers.aggregate([ { $unwind: "$address", }, { $match: {"address.location": "home"} }, { $group: { _id: "$address.city", totalSpend: {$sum: "$annualSpend"}, averageSpend: {$avg: "$annualSpend"}, maximumSpend: {$max: "$annualSpend"}, customers: {$sum: 1} } } ]) Versatile: Complex queries fast to create, optimize, & maintain MongoDB’s aggregation framework has the flexibility you need to get value from your data, but without the complexity and fragility of SQL These “phases” are distinct and easy to understand They can be thought about in order… no nesting.
  • 18. 18 Developer Agility – Compass – MongoDB GUI Debug & Optimize Visualize & Explore Insert, Modify, & Delete
  • 19. 19 Sophisticated Analytics & Visualizations Of Data In Place • Rich MongoDB query language & idiomatic drivers • Connector for BI • Connector for Spark • Charts (beta)
  • 20. MongoDB Charts: Create, Visualize, Share Work with complex data Connect to data sources securely. Filter. Sample. Visualize. Share dashboards and collaborate
  • 21. 21 Versatile: MongoDB Change Streams Enabling developers to build reactive, real-time servicesChangeStreamsAPI Business Apps User Data Sensors Clickstream Real-Time Event Notifications Message Queue
  • 22. 22 High Availability and Data Durability – Replica Sets SecondarySecondary Primary
  • 24. 24 Replica Set Node Failure SecondarySecondary Primary No Heartbeat
  • 26. 26 New Replica Set – 2 Nodes SecondaryPrimary Heartbeat And New Primary
  • 32. 32 Replica Set Read Preference Write Concern Read Concern
  • 33. 33 Replica Set Bottlenecks Application Driver Primary /data Secondary /data Secondary /data RAM Limits on single server CPU Limits on single server Network Bandwidth Disk I/O
  • 34. 34 Reasons to Shard Performance Data locality Recovery Time Objective (RTO)
  • 36. 36 Sharded Cluster Application mongos mongos mongos Driver Config Server
  • 37. Cloud ManagerOps Manager MongoDB Atlas Private DBaaS Compatibility multi-environment Hybrid DBaaS Public DBaaS Fully managed Same codebase, same API & same UI
  • 38. 38 Operational Agility – Atlas - Database as a Service Self-service, elastic, and automated Secure by defaultGlobal and highly available Continuous backups Real-time monitoring and optimization Cloud agnostic
  • 40. Evolution of Computing Models Evolution to more streamlined, managed infrastructure Large Data Center Virtual Machines VMs in the Cloud (EC2) Containers Serverless Manage H/W Manage less H/W Size & provision VMs Size & provision containers Just send in requests Wasted resources Better utilization Rent, not buy Rent with less waste Pay as you go $$$$$ $$$$ $$$ $$ $ Cheaper to build Cheaper to run Faster time to market
  • 41. MongoDB Stitch The Best Way to Work With Data
  • 42. Focus Your Energy Where You Can Make a Difference App Backend Infrastructure Core Database Functionality Storage Service integrations, data access control Code that moves the business forward Managing OS, Scale, Security, Backups, etc. Time 40% 40% 20%
  • 43. Focus Your Energy Where You Can Make a Difference App Backend Infrastructure Core Database Functionality Storage Service integrations, data access control Code that moves the business forward Managing OS, Scale, Security, Backups, etc. MongoDB Atlas Time 40% 40% 20%
  • 44. Focus Your Energy Where You Can Make a Difference App Backend Infrastructure Core Database Functionality Storage Service integrations, data access control Code that moves the business forward Managing OS, Scale, Security, Backups, etc. MongoDB Atlas MongoDB Stitch Fully managed Elastic scale Highly Available Secure Time 40% 40% 20%
  • 45. Focus Your Energy Where You Can Make a Difference App Backend Infrastructure Core Database Functionality Storage Service integrations, data access control Code that moves the business forward Managing OS, Scale, Security, Backups, etc. MongoDB Atlas MongoDB Stitch Fully managed Elastic scale Highly Available Secure Customer can focus here Time 40% 40% 20%
  • 46. Streamlines app development with simple, secure access to data and services from the client with thousands of lines less code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs. Stitch QueryAnywhere Full power of MongoDB document model & query language in frontend code Fine-grained security policies through declarative rules MongoDB Stitch Serverless Platform Services
  • 47. Streamlines app development with simple, secure access to data and services from the client with thousands of lines less code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs. Stitch QueryAnywhere Full power of MongoDB document model & query language in frontend code Fine-grained security policies through declarative rules Stitch Functions Run simple JavaScript functions in Stitch’s serverless environment Power apps with Server-side logic, or enable Data as a Service with custom APIs. MongoDB Stitch Serverless Platform Services
  • 48. Streamlines app development with simple, secure access to data and services from the client with thousands of lines less code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs. Stitch QueryAnywhere Full power of MongoDB document model & query language in frontend code Fine-grained security policies through declarative rules Stitch Functions Run simple JavaScript functions in Stitch’s serverless environment Power apps with Server-side logic, or enable Data as a Service with custom APIs. Stitch Triggers Real-time notifications that launch functions in response to changes in the database Make further database changes, push data to other places, or interact with users MongoDB Stitch Serverless Platform Services
  • 49. Stitch QueryAnywhere Full power of MongoDB document model & query language in frontend code Fine-grained security policies through declarative rules Stitch Functions Run simple JavaScript functions in Stitch’s serverless environment Power apps with Server-side logic, or enable Data as a Service with custom APIs. Stitch Mobile Sync Automatically synchronizes data between documents held locally in MongoDB Mobile and the backend database (coming soon) Streamlines app development with simple, secure access to data and services from the client with thousands of lines less code to write and no infrastructure to manage – getting your apps to market faster while reducing operational costs. Stitch Triggers Real-time notifications that launch functions in response to changes in the database Make further database changes, push data to other places, or interact with users MongoDB Stitch Serverless Platform Services
  • 51. MongoDB Stitch Benefits Reduce Time to Market Functions as a Service: No waiting on infrastructure Service Integrations: Save coding Cross-Platform: Develop once Existing Apps Untouched: No reverse-engineering
  • 52. MongoDB Stitch Benefits Reduce Time to Market Functions as a Service: No waiting on infrastructure Service Integrations: Save coding Cross-Platform: Develop once Existing Apps Untouched: No reverse-engineering Reduce Operational costs Serverless: We manage the platform for you PaYG: No up-front cost Capacity on Demand: Zero wasted resources Secure by Default: Less ops effort
  • 53. MongoDB Stitch Benefits Reduce Time to Market Functions as a Service: No waiting on infrastructure Service Integrations: Save coding Cross-Platform: Develop once Existing Apps Untouched: No reverse-engineering Reduce Development Effort Backend Integrations Built in: Don't write generic backend code HA & Scalability Built in: Hard and time consuming to build Orchestrate Data Between Services: Reuse what's out there Stitch Runs Your Code: The only backend you need Reduce Operational costs Serverless: We manage the platform for you PaYG: No up-front cost Capacity on Demand: Zero wasted resources Secure by Default: Less ops effort
  • 54. MongoDB Stitch Benefits Reduce Time to Market Functions as a Service: No waiting on infrastructure Service Integrations: Save coding Cross-Platform: Develop once Existing Apps Untouched: No reverse-engineering Reduce Development Effort Backend Integrations Built in: Don't write generic backend code HA & Scalability Built in: Hard and time consuming to build Orchestrate Data Between Services: Reuse what's out there Stitch Runs Your Code: The only backend you need Reduce Operational costs Serverless: We manage the platform for you PaYG: No up-front cost Capacity on Demand: Zero wasted resources Secure by Default: Less ops effort Secure Data Access: Simple, Declarative Rules Complete Authentication & Authorization out of the box: Authenticate anything and anyone; protect anything Precise, Flexible, Extensible Rules: Lock access down tighter Flexible Auth Options: Choose which auth service(s) to use
  • 55. All the Functionality & Scalability of MongoDB •Full feature set – Not just key-value store •Scale up or out •Retain traditional access methods •No lock-in •AWS at start of beta, extending to on-premises and other cloud providers.
  • 58. Where Europe’s fastest growing database community comes to connect, explore, and learn. MongoDB Europe 2018 November 8th, Old Billingsgate
  • 59. ● Register at mongodbworld.com/europe18 ● Use code MUG25 to get 25% off tickets ● Groups get an additional 25% off! Ready to Register?