SlideShare a Scribd company logo
Technical Support Engineer, 10gen
Gianfranco Palumbo
#bigdatajaspersoft
How to leverage MongoDB for
Big Data Analysis and
Operations
@MongoDBDublin
Join us this evening at Dublin
MUG
meetup.com/DublinMUG/
Big Data
http://www.worldwidewebsize.com/
Exponential Data Growth
MongoDB solves our needs
• Ideal operational database
• Provides high performance for storage and
retrieval at large scale
• Has a robust query interface permitting intelligent
operations
• Is not a data processing engine, but provides
processing functionality
Data Processing in MongoDB
• Process in MongoDB using Map/Reduce
• Process in MongoDB using Aggregation
Framework
• Process outside MongoDB using Hadoop and
other external tools
The goal
Real Time
Analytics Engine
Data
SourceData
SourceData
Source
Sample Customers
Solution goals
• Lots of data sources
• Lots of data from each source
High write volume
• Users can drill down into dataDynamic queries
• Lots of clients
• High request rate
Fast queries
• How long before an event appears
in a report?
Minimize delay
between collection &
query
System architecture
Systems Architecture
Data
Sources
Asynchronous writes
Upserts avoid
unnecessary reads
Writes buffered in
RAM and flushed to
disk in bulk
Data
Sources
Data
Sources
Data
Sources
Spread writes over
multiple shards
Simple log storage
Design Pattern
Sample data
Original
Event Data
127.0.0.1 - frank [10/Jun/2013:13:55:36 -0700] "GET
/apache_pb.gif HTTP/1.0" 200 2326
“http://www.example.com/start.html" Mozilla/5.0 (Macintosh; U; Intel
Mac OS X 10_7_4; en-US)”
As JSON doc = {
_id: ObjectId('4f442120eb03305789000000'),
host: "127.0.0.1",
time: ISODate("2013-06-10T20:55:36Z"),
path: “/apache_pb.gif",
referer: “http://www.example.com/start.html",
user_agent: "Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_7_4; en-US)”
}
Insert to
MongoDB
db.logs.insert( doc )
Dynamic Queries
Find all logs for a
URL
db.logs.find( { ‘path’ : ‘/index.html’ } )
Find all logs for a
time range
db.logs.find( {
‘time’ : {
‘$gte’: new Date(2013, 0),
‘$lt’: new Date(2013, s1) }
} )
Find all logs for a
host over a range of
dates
db.logs.find( {
‘host’ : ‘127.0.0.1’,
‘time’ : {
‘$gte’: new Date(2013, 0),
‘$lt’: new Date(2013, 1) }
} )
Aggregation
Framework
MongoDB Aggregation
Framework
Aggregation Framework
Requests
per day by
URL
db.logs.aggregate( [
{ '$match': {
'time': {
'$gte': new Date(2013, 0),
'$lt': new Date(2013, 1) } } },
{ '$project': {
'path': 1,
'date': {
'y': { '$year': '$time' },
'm': { '$month': '$time' },
'd': { '$dayOfMonth': '$time' } } } },
{ '$group': {
'_id': {
'p': '$path',
'y': '$date.y',
'm': '$date.m',
'd': '$date.d' },
'hits': { '$sum': 1 } } },
])
Aggregation Framework
{
‘ok’: 1,
‘result’: [
{ '_id': {'p':’/index.html’,'y': 2013,'m': 1,'d': 1 },
'hits’: 124 },
{ '_id': {'p':’/index.html’,'y': 2013,'m': 1,'d': 2 },
'hits’: 245 },
{ '_id': {'p':’/index.html’,'y': 2013,'m': 1,'d': 3 },
'hits’: 322 },
{ '_id': {'p':’/index.html’,'y': 2013,'m': 1,'d': 4 },
'hits’: 175 },
{ '_id': {'p':’/index.html’,'y': 2013,'m': 1,'d': 5 },
'hits’: 94 }
]
}
Aggregation Framework
Benefits
• Real-time
• Simple yet powerful interface
• Declared in JSON, executes in C++
• Runs inside MongoDB on local data

• Adds load to your DB
• Limited how much data it can return
Roll-ups with map-
reduce
Design Pattern
MongoDB Map/Reduce
Map Reduce – Map Phase
Generate hourly
rollups from log
data
var map = function() {
var key = {
p: this.path,
d: new Date(
this.ts.getFullYear(),
this.ts.getMonth(),
this.ts.getDate(),
this.ts.getHours(),
0, 0, 0) };
emit( key, { hits: 1 } );
}
Map Reduce – Reduce Phase
Generate hourly
rollups from log
data
var reduce = function(key, values) {
var r = { hits: 0 };
values.forEach(function(v) {
r.hits += v.hits;
});
return r;
}
)
MongoDB Map/Reduce
• Real-time
• Output directly to document or collection
• Runs inside MongoDB on local data
• V8 engine
• Adds load to your DB
• In JavaScript
Integrations
REPORTING
Charting
APACHE HADOOP
Log
Aggregation
with MongoDB
as sink
More complex
aggregations or
integration with tools like
Mahout
MongoDB
MongoDB with Hadoop
MongoDB with Hadoop
MongoDB with Hadoop
MongoDB and Hadoop
• Away from data store
• Can leverage existing data processing infrastructure
• Can horizontally scale your data processing
• Offline batch processing
• Requires synchronization between store &
processor
• Infrastructure is much more complex
The Future of Big Data and
MongoDB
What is Big?
Big today is normal
tomorrow
http://www.worldwidewebsize.com/
Big is only getting bigger
IBM - http://www-01.ibm.com/software/data/bigdata/
90% of the data in the
world today has been
created in the last two
years
MongoDB enables
you to scale to the
redefinition of BIG
MongoDB is evolving
to enable you to process
the new BIG
Gianfranco Palumbo – slides tweeted from @MongoDBDublin
MongoDB is committed to
working with the best data
processing tools
• Map Reduce
• Aggregation Framework
• Hadoop adapter
– docs.mongodb.org/ecosystem/tutorial/getting-started-with-hadoop/
• Storm
– github.com/christkv/mongo-storm
• Disco
– github.com/mongodb/mongo-disco
• Spark (coming soon)
Technical Support Engineer, 10gen
Gianfranco Palumbo
#bigdatajaspersoft
Thank you
@MongoDBDublin

More Related Content

What's hot (20)

PPTX
Introduction to MongoDB and Hadoop
Steven Francia
 
PPTX
Back to Basics Webinar 1: Introduction to NoSQL
MongoDB
 
PPTX
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
CAPSiDE
 
PPTX
High Performance Applications with MongoDB
MongoDB
 
PDF
Barcelona MUG MongoDB + Hadoop Presentation
Norberto Leite
 
PDF
Using MongoDB + Hadoop Together
MongoDB
 
PPTX
Beyond the Basics 2: Aggregation Framework
MongoDB
 
PDF
Dan Sullivan - Data Analytics and Text Mining with MongoDB - NoSQL matters Du...
NoSQLmatters
 
PPT
Introduction to MongoDB
Ravi Teja
 
PPTX
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
MongoDB
 
PDF
MongoDB and Python
Norberto Leite
 
PPTX
Using MongoDB As a Tick Database
MongoDB
 
PPTX
Introduction to MongoDB
MongoDB
 
PDF
Python and MongoDB
Norberto Leite
 
PPTX
Conceptos básicos. Seminario web 2: Su primera aplicación MongoDB
MongoDB
 
PPTX
Introduction to MongoDB
NodeXperts
 
PPTX
Basics of MongoDB
HabileLabs
 
PPTX
MongoDB and Hadoop: Driving Business Insights
MongoDB
 
PPTX
How Thermo Fisher Is Reducing Mass Spectrometry Experiment Times from Days to...
MongoDB
 
PPT
Mongo Web Apps: OSCON 2011
rogerbodamer
 
Introduction to MongoDB and Hadoop
Steven Francia
 
Back to Basics Webinar 1: Introduction to NoSQL
MongoDB
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
CAPSiDE
 
High Performance Applications with MongoDB
MongoDB
 
Barcelona MUG MongoDB + Hadoop Presentation
Norberto Leite
 
Using MongoDB + Hadoop Together
MongoDB
 
Beyond the Basics 2: Aggregation Framework
MongoDB
 
Dan Sullivan - Data Analytics and Text Mining with MongoDB - NoSQL matters Du...
NoSQLmatters
 
Introduction to MongoDB
Ravi Teja
 
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
MongoDB
 
MongoDB and Python
Norberto Leite
 
Using MongoDB As a Tick Database
MongoDB
 
Introduction to MongoDB
MongoDB
 
Python and MongoDB
Norberto Leite
 
Conceptos básicos. Seminario web 2: Su primera aplicación MongoDB
MongoDB
 
Introduction to MongoDB
NodeXperts
 
Basics of MongoDB
HabileLabs
 
MongoDB and Hadoop: Driving Business Insights
MongoDB
 
How Thermo Fisher Is Reducing Mass Spectrometry Experiment Times from Days to...
MongoDB
 
Mongo Web Apps: OSCON 2011
rogerbodamer
 

Viewers also liked (20)

PPTX
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
PPTX
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB
 
PDF
MongoDB at the energy frontier
Valentin Kuznetsov
 
PPTX
MongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB
 
PPTX
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
MongoDB
 
ODP
MongoDB & Machine Learning
Tom Maiaroto
 
PPTX
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB
 
PPTX
Plus de flexibilité et de scalabilité chez Bouygues Télécom grâce à MongoDB
Pierre-Alban DEWITTE
 
PPT
NoSQL Analytics: JSON Data Analysis and Acceleration in MongoDB World
Ajay Gupte
 
PDF
Analytic Data Report with MongoDB
Li Jia Li
 
PDF
Практическое применение MongoDB Aggregation Framework
Денис Кравченко
 
PDF
Webinar: Data Processing and Aggregation Options
MongoDB
 
PPTX
MongoDB Aggregation MongoSF May 2011
Chris Westin
 
PPTX
Introduction to MongoDB and Workshop
AhmedabadJavaMeetup
 
PDF
Analytics with MongoDB Aggregation Framework and Hadoop Connector
Henrik Ingo
 
PDF
Collaborative Line of Business Applications on IBM Bluemix
Niklas Heidloff
 
PDF
MongoDB et Elasticsearch, meilleurs ennemis ?
Sébastien Prunier
 
ODP
MongoDB - Ekino PHP
Florent DENIS
 
PDF
Apache Spark and MongoDB - Turning Analytics into Real-Time Action
João Gabriel Lima
 
PPTX
Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
MongoDB
 
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB
 
MongoDB at the energy frontier
Valentin Kuznetsov
 
MongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB
 
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
MongoDB
 
MongoDB & Machine Learning
Tom Maiaroto
 
MongoDB for Time Series Data Part 2: Analyzing Time Series Data Using the Agg...
MongoDB
 
Plus de flexibilité et de scalabilité chez Bouygues Télécom grâce à MongoDB
Pierre-Alban DEWITTE
 
NoSQL Analytics: JSON Data Analysis and Acceleration in MongoDB World
Ajay Gupte
 
Analytic Data Report with MongoDB
Li Jia Li
 
Практическое применение MongoDB Aggregation Framework
Денис Кравченко
 
Webinar: Data Processing and Aggregation Options
MongoDB
 
MongoDB Aggregation MongoSF May 2011
Chris Westin
 
Introduction to MongoDB and Workshop
AhmedabadJavaMeetup
 
Analytics with MongoDB Aggregation Framework and Hadoop Connector
Henrik Ingo
 
Collaborative Line of Business Applications on IBM Bluemix
Niklas Heidloff
 
MongoDB et Elasticsearch, meilleurs ennemis ?
Sébastien Prunier
 
MongoDB - Ekino PHP
Florent DENIS
 
Apache Spark and MongoDB - Turning Analytics into Real-Time Action
João Gabriel Lima
 
Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
MongoDB
 
Ad

Similar to How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's Aggregation Framework and Map Reduce (20)

PPTX
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
PDF
Webinar: Managing Real Time Risk Analytics with MongoDB
MongoDB
 
PPTX
Operational Intelligence with MongoDB Webinar
MongoDB
 
PPT
MongoDB Tick Data Presentation
MongoDB
 
PDF
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
MongoDB
 
PDF
Big Query - Women Techmarkers (Ukraine - March 2014)
Ido Green
 
PPTX
Big data week presentation
Joseph Adler
 
PPTX
Eagle6 mongo dc revised
MongoDB
 
PPTX
Eagle6 Enterprise Situational Awareness
MongoDB
 
PPTX
MongoDb and NoSQL
TO THE NEW | Technology
 
PPTX
Webinar: MongoDB Use Cases within the Oil, Gas, and Energy Industries
MongoDB
 
PDF
Buildingsocialanalyticstoolwithmongodb
MongoDB APAC
 
PDF
MongoDB Evenings Dallas: What's the Scoop on MongoDB & Hadoop
MongoDB
 
PPTX
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PPTX
Webinar: How Banks Use MongoDB as a Tick Database
MongoDB
 
PDF
SQL vs NoSQL, an experiment with MongoDB
Marco Segato
 
PPTX
Introduction to MongoDB
Raghunath A
 
PDF
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB
 
PPTX
MongoDB 3.4 webinar
Andrew Morgan
 
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
Webinar: Managing Real Time Risk Analytics with MongoDB
MongoDB
 
Operational Intelligence with MongoDB Webinar
MongoDB
 
MongoDB Tick Data Presentation
MongoDB
 
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
MongoDB
 
Big Query - Women Techmarkers (Ukraine - March 2014)
Ido Green
 
Big data week presentation
Joseph Adler
 
Eagle6 mongo dc revised
MongoDB
 
Eagle6 Enterprise Situational Awareness
MongoDB
 
MongoDb and NoSQL
TO THE NEW | Technology
 
Webinar: MongoDB Use Cases within the Oil, Gas, and Energy Industries
MongoDB
 
Buildingsocialanalyticstoolwithmongodb
MongoDB APAC
 
MongoDB Evenings Dallas: What's the Scoop on MongoDB & Hadoop
MongoDB
 
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
Webinar: How Banks Use MongoDB as a Tick Database
MongoDB
 
SQL vs NoSQL, an experiment with MongoDB
Marco Segato
 
Introduction to MongoDB
Raghunath A
 
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB
 
MongoDB 3.4 webinar
Andrew Morgan
 
Ad

Recently uploaded (20)

PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Digital Circuits, important subject in CS
contactparinay1
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 

How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's Aggregation Framework and Map Reduce

Editor's Notes

  • #2: i'm going to talk about How to leveragei hope you end with learning about mongodb
  • #4: Start by saying "I want to start asking a question what is it?”
  • #5: Google, Amazon, and Facebook built custom tools to handle massive amounts of data.MongoDB led an opensource movement to provide a viable alternative to proprietary solutions to handle big dataIt’s just Data! Don’t panic
  • #7: We will be demonstrating how to do each of these today and discuss why and when you would use each.
  • #8: Chart, Trends, Insights
  • #9: Traackr social mediaIntuit small business, personal finance and tax software
  • #10: Not only data size but also the rate the data comes inFor example twitterWhat is the tolerable delay? How complex is the processing of the data?
  • #17: I often think of Map reduce as the Marmite of MongoDB - people either love it or hate it.For that very reason we've produced the aggregation framework in 2.2 and its only getting better in 2.4!
  • #18: $project, $match, $unwind, $group - $limit, $skip, $sortNojavascript code$outMore operators coming soon
  • #22: The original aggregation utility in mongodb.Simplified view -> from mongodbc++ to the js runtime1) You create a map function2) MAP returns results mongoDB then groups and sorts the results3) Then passes the values to reduce4) Finialise is optionalBack to the c++ runtime
  • #23: Summarise by hour and save that in a collection.
  • #24: Map and reduce need to return the same object. Because it can the reduce can be run again.
  • #25: V8 in 2.4 & muiltithreaded
  • #28: JobsHigher latency
  • #36: The mongodbhadoop adapter allows you to stream data into hadoop and outSo you can scale data processing across many machines for batch processing.
  • #37: Another common usecase we see is warehousing of data - again the connector allows you to utilise existing libraries via hadoop
  • #38: The third most common usecase is an ETL - extract transform load - function.Then putting the aggregated data into mongodb for further analysis.
  • #42: Google, Amazon, and Facebook built custom tools to handle massive amounts of data.MongoDB led an opensource movement to provide a viable alternative to proprietary solutions to handle big data
  • #43: Horizontally scale out and providing sharding tools out the box
  • #44: Horizontally scale out and providing sharding tools out the box
  • #45: Our next challenge is helping you make sense of your data
  • #46: Map / Reduce - allows complex programable aggregationsAggregation Framework - easy and simple access to aggregationHadoop - the start of our integration with external toolsStorm Distributed and fault-tolerant realtime computation system. - used by Twitter, Groupon, etcmore flexible, incremental processingDisco is an open-source implementation of the Map-Reduce framework for distributed computing. - developed by Nokia Research Center
  • #47: Meetupeducation.10gen.com