SlideShare a Scribd company logo
Is MongoDB Right for Your Project?
     (...or your organization)?


             Tony Bibbs
I’m Nobody Special. Seriously.

• Routine Geek Stuff


• Crappy code + 3NF databases


• These days, less crappy code


• Still using 3NF databases
About The GForge Group

• Not-so-crappy code


• Rigid, 3NF PostgreSQL DB


• ORM helps some


• If it won’t fit on paper....


• ...it won’t fit in a slide -->
RDMS are like light beer   You can party with it but ......
NoSQL Databases....   are more like liquor
Anatomy of LAMP Application

• PHP Code


• ORM


• REST API (JSON)


• APC


• Memcache


• MySQL
Crazy routine to try and make an RDBMS Scale...
Who can guess the exact name of the #1 process
hogging CPU on PHP/PostgreSQL apps. PHP/
MySQL apps?
My Path to NoSQL

•I knew RDBMS was a problem
•Likes of FB, Twitter, Guardian
•Far better geeks than I using it
•I wanted to iterate faster
•“The Dream” of Web Scale
Basic Types of NoSQL Solutions

• Key-Value (Memcache)


• Column-Tab (Cassandra, HBase)


• Graph Databases (Neo4j, VertexDB)


• Document Databases (CouchDB, MongoDB)


• (Never lose sight of RDBMS which are adding NoSQL features)
Secondary considerations...

• Language Support


• Query interface


• How do they scale out?
What attracted me to MongoDB

• Low ramp


• Document oriented applications (most things web facing)


• Trivial single server setup


• Native PHP driver (Java/Scala, .NET and about 9 others)


• Easy to make PHP use MongoDB as session store


• Fluent Query API


• Atomic operations despite not being ACID
What hooked me on MongoDB

• Large file support with GridFS


• MapReduce support when basic native query interface won’t do


• Cloud Friendly


• Native Geospatial Support (think location-based applications)


• Single Master to sharded cluster with zero downtime


• Fluid schemas and it’s all JSON (BSON, really)
MongoDB Ain’t All Roses

• Record limit of 4MB in 1.6.x and 16MB in 1.8.x


• Use 64-bit systems (or don’t even bother)


• Lack of full text search


• Not ACID


• Writes can be problematic (which can be overcome)


• Backup and Disaster Recovery
What I Considered Before MongoDB

• Started with Cassandra (influenced by Twitter)


• Gave HBase/Hadoop a try (influenced by T8 Webware)


• Realized a) I have different needs and b) HBase people are smarter than I am
Walk Over, Limp Back

• Take Physical DBA Approach


• Know Internals of MongoDB


• Know hardware (RAM)


• Know schema design


• OOID <> GUID
MongoDB Plans at The GForge Group

• New feedback application


• Possible heterogeneous use of
  PostgreSQL and MongoDB


• GeoSpatial Mobile Applications


• Internal CRM Application
Questions?
Tony Bibbs
   tony@gforgegroup.com
   http://gforgegroup.com
@tonybibbs and @gforgegroup
Credits

• Steve Francia at 10gen


• Light Beer - http://www.flickr.com/photos/iandavid


• Bar - http://www.flickr.com/photos/mediafury


• Ving Rhames - http://www.flickr.com/photos/16180154@N07

More Related Content

Viewers also liked

Nerd Herding
Nerd HerdingNerd Herding
Nerd Herding
Tony Bibbs
 
Technology Is Annoying
Technology Is AnnoyingTechnology Is Annoying
Technology Is Annoying
Harper Reed
 
Web Security Overview and Demo
Web Security Overview and DemoWeb Security Overview and Demo
Web Security Overview and Demo
Tony Bibbs
 
20070921 Uni Softwareengineering
20070921 Uni Softwareengineering20070921 Uni Softwareengineering
20070921 Uni Softwareengineering
Tony Bibbs
 
Fed Up Of Framework Hype Dcphp
Fed Up Of Framework Hype DcphpFed Up Of Framework Hype Dcphp
Fed Up Of Framework Hype Dcphp
Tony Bibbs
 
Improving Untestable Code
Improving Untestable CodeImproving Untestable Code
Improving Untestable Code
Tony Bibbs
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request Forgery
Tony Bibbs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 

Viewers also liked (8)

Nerd Herding
Nerd HerdingNerd Herding
Nerd Herding
 
Technology Is Annoying
Technology Is AnnoyingTechnology Is Annoying
Technology Is Annoying
 
Web Security Overview and Demo
Web Security Overview and DemoWeb Security Overview and Demo
Web Security Overview and Demo
 
20070921 Uni Softwareengineering
20070921 Uni Softwareengineering20070921 Uni Softwareengineering
20070921 Uni Softwareengineering
 
Fed Up Of Framework Hype Dcphp
Fed Up Of Framework Hype DcphpFed Up Of Framework Hype Dcphp
Fed Up Of Framework Hype Dcphp
 
Improving Untestable Code
Improving Untestable CodeImproving Untestable Code
Improving Untestable Code
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request Forgery
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to Is MongoDB Right For Your Project (or Organization)

MongoDB Administration 20110922
MongoDB Administration 20110922MongoDB Administration 20110922
MongoDB Administration 20110922
radiocats
 
Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)
Oren Eini
 
Mongodb, Node.js and You: PART I
Mongodb, Node.js and You: PART IMongodb, Node.js and You: PART I
Mongodb, Node.js and You: PART I
Mitch Pirtle
 
Not Just Another Overview of Apache Hadoop
Not Just Another Overview of Apache HadoopNot Just Another Overview of Apache Hadoop
Not Just Another Overview of Apache Hadoop
Adaryl "Bob" Wakefield, MBA
 
Chris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for YouChris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for You
Carsonified Team
 
Drop acid
Drop acidDrop acid
Drop acid
Mike Feltman
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06
jimbojsb
 
SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy  SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy
Lohika_Odessa_TechTalks
 
Spark in the BigData dark
Spark in the BigData darkSpark in the BigData dark
Spark in the BigData dark
Sergey Levandovskiy
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP Developers
Rick Hightower
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
Ricard Clau
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQL
RTigger
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
Ahmed Elharouny
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015
Himanshu Desai
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
Serdar Buyuktemiz
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
Jimmy Ray
 
Real time data driven applications (and SQL vs NoSQL databases)
Real time data driven applications (and SQL vs NoSQL databases)Real time data driven applications (and SQL vs NoSQL databases)
Real time data driven applications (and SQL vs NoSQL databases)
GoDataDriven
 
5 Popular Choices for NoSQL on a Microsoft Platform
5 Popular Choices for NoSQL on a Microsoft Platform5 Popular Choices for NoSQL on a Microsoft Platform
5 Popular Choices for NoSQL on a Microsoft Platform
All Things Open
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
Matthew Groves
 
BW Tech Meetup: Hadoop and The rise of Big Data
BW Tech Meetup: Hadoop and The rise of Big Data BW Tech Meetup: Hadoop and The rise of Big Data
BW Tech Meetup: Hadoop and The rise of Big Data
Mindgrub Technologies
 

Similar to Is MongoDB Right For Your Project (or Organization) (20)

MongoDB Administration 20110922
MongoDB Administration 20110922MongoDB Administration 20110922
MongoDB Administration 20110922
 
Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)Know thy cost (or where performance problems lurk)
Know thy cost (or where performance problems lurk)
 
Mongodb, Node.js and You: PART I
Mongodb, Node.js and You: PART IMongodb, Node.js and You: PART I
Mongodb, Node.js and You: PART I
 
Not Just Another Overview of Apache Hadoop
Not Just Another Overview of Apache HadoopNot Just Another Overview of Apache Hadoop
Not Just Another Overview of Apache Hadoop
 
Chris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for YouChris Lea - What does NoSQL Mean for You
Chris Lea - What does NoSQL Mean for You
 
Drop acid
Drop acidDrop acid
Drop acid
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06
 
SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy  SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy
 
Spark in the BigData dark
Spark in the BigData darkSpark in the BigData dark
Spark in the BigData dark
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP Developers
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
Sql vs NoSQL
Sql vs NoSQLSql vs NoSQL
Sql vs NoSQL
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
Real time data driven applications (and SQL vs NoSQL databases)
Real time data driven applications (and SQL vs NoSQL databases)Real time data driven applications (and SQL vs NoSQL databases)
Real time data driven applications (and SQL vs NoSQL databases)
 
5 Popular Choices for NoSQL on a Microsoft Platform
5 Popular Choices for NoSQL on a Microsoft Platform5 Popular Choices for NoSQL on a Microsoft Platform
5 Popular Choices for NoSQL on a Microsoft Platform
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
 
BW Tech Meetup: Hadoop and The rise of Big Data
BW Tech Meetup: Hadoop and The rise of Big Data BW Tech Meetup: Hadoop and The rise of Big Data
BW Tech Meetup: Hadoop and The rise of Big Data
 

Recently uploaded

Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 

Recently uploaded (20)

Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 

Is MongoDB Right For Your Project (or Organization)

  • 1. Is MongoDB Right for Your Project? (...or your organization)? Tony Bibbs
  • 2. I’m Nobody Special. Seriously. • Routine Geek Stuff • Crappy code + 3NF databases • These days, less crappy code • Still using 3NF databases
  • 3. About The GForge Group • Not-so-crappy code • Rigid, 3NF PostgreSQL DB • ORM helps some • If it won’t fit on paper.... • ...it won’t fit in a slide -->
  • 4. RDMS are like light beer You can party with it but ......
  • 5. NoSQL Databases.... are more like liquor
  • 6. Anatomy of LAMP Application • PHP Code • ORM • REST API (JSON) • APC • Memcache • MySQL
  • 7. Crazy routine to try and make an RDBMS Scale...
  • 8. Who can guess the exact name of the #1 process hogging CPU on PHP/PostgreSQL apps. PHP/ MySQL apps?
  • 9. My Path to NoSQL •I knew RDBMS was a problem •Likes of FB, Twitter, Guardian •Far better geeks than I using it •I wanted to iterate faster •“The Dream” of Web Scale
  • 10. Basic Types of NoSQL Solutions • Key-Value (Memcache) • Column-Tab (Cassandra, HBase) • Graph Databases (Neo4j, VertexDB) • Document Databases (CouchDB, MongoDB) • (Never lose sight of RDBMS which are adding NoSQL features)
  • 11. Secondary considerations... • Language Support • Query interface • How do they scale out?
  • 12. What attracted me to MongoDB • Low ramp • Document oriented applications (most things web facing) • Trivial single server setup • Native PHP driver (Java/Scala, .NET and about 9 others) • Easy to make PHP use MongoDB as session store • Fluent Query API • Atomic operations despite not being ACID
  • 13. What hooked me on MongoDB • Large file support with GridFS • MapReduce support when basic native query interface won’t do • Cloud Friendly • Native Geospatial Support (think location-based applications) • Single Master to sharded cluster with zero downtime • Fluid schemas and it’s all JSON (BSON, really)
  • 14. MongoDB Ain’t All Roses • Record limit of 4MB in 1.6.x and 16MB in 1.8.x • Use 64-bit systems (or don’t even bother) • Lack of full text search • Not ACID • Writes can be problematic (which can be overcome) • Backup and Disaster Recovery
  • 15. What I Considered Before MongoDB • Started with Cassandra (influenced by Twitter) • Gave HBase/Hadoop a try (influenced by T8 Webware) • Realized a) I have different needs and b) HBase people are smarter than I am
  • 16. Walk Over, Limp Back • Take Physical DBA Approach • Know Internals of MongoDB • Know hardware (RAM) • Know schema design • OOID <> GUID
  • 17. MongoDB Plans at The GForge Group • New feedback application • Possible heterogeneous use of PostgreSQL and MongoDB • GeoSpatial Mobile Applications • Internal CRM Application
  • 19. Tony Bibbs tony@gforgegroup.com http://gforgegroup.com @tonybibbs and @gforgegroup
  • 20. Credits • Steve Francia at 10gen • Light Beer - http://www.flickr.com/photos/iandavid • Bar - http://www.flickr.com/photos/mediafury • Ving Rhames - http://www.flickr.com/photos/16180154@N07

Editor's Notes

  1. This is about if MongoDB is best for your project. But we&amp;#x2019;ll try and lead you to other alternatives if needed.\n
  2. - Aerospace\n- Ag\n- Marketing\n- Public Service\n- GForge\n\nLAMP but continuously dabbling in other stuff.\n
  3. Diagram represents the rigidity of RDBMS in most organizations.\n\nRelated things broken out across multiple pages so either you need to create multiple logical models focusing on one part of business or be patient connecting all the dots and lines.\n\nAnd this is just the design aspect...we haven&amp;#x2019;t even touched SQL to access this crap.\n
  4. It works, but you have to have a lot of it and even then you are left feeling bloated.\n\nShould be noted that &amp;#x201C;If it ain&amp;#x2019;t broke, don&amp;#x2019;t fix it&amp;#x201D;. F- dogma. Most of the best geeks I know find a way to dabble with new technologies in ways that allow for true evaluation. Strive for this. Startups may not be able to do this...innovation is, at times, about risk.\n
  5. Get a lot more people drunk faster. \n
  6. Four of these things are DB or DB related. WTF...\n\nIt&amp;#x2019;s expensive to find developers that can master all these\n\nWe haven&amp;#x2019;t even added the complication of the Cloud (e.g. AWS)\n
  7. - Index verification\n- Page Size Optimizations (who does this anymore?)\n- Query caching\n- Denormalizing data (blow mind of classically trained DBAs)\n- Cluster (and insane sys admin&amp;#x2019;ing)\n- Sharding (use Digg example) Requires expensive DBMS or custom API for fluent access to shards.\n
  8. This is where I get mad at PHP haters. Performance problems in all my apps have started at the database. PHP has seldom been the problem. Find a new reasons to hate PHP...performance ain&amp;#x2019;t it.\n\nSo despite APC, Memcache, denormalizing, query caching, etc the DB is still the biggest problem.\n
  9. Started with a &amp;#x201C;hunch&amp;#x201D; things could be better.\n\nRSS feeds started filling up with NoSQL chatter.\n\nI admit I&amp;#x2019;m not working for FB, Twitter, etc but that&amp;#x2019;s the Web Scale &amp;#x201C;dream&amp;#x201D;\n\nFaster iteration over conventional RDBMS web development...particularly for proof of concepts/prototyping.\n
  10. Are there others?\n\nHow may people are using NoSQL in production? Which flavor?\n\nAny quick plugs for those solutions?\n
  11. Thrift - anybody here like thrift? \n\nThrift interface for Cassandra == fail. Might as well write assembler.\n\nWanted native PHP support if possible, not a PHP/Thrift wrapper.\n
  12. In PHP Mongo is a quick PECL extension. Installs in one command on most sane Linux installs (and, happily, on OSX)\n\nMongo install is almost as easy. \n\nAPI is dead simple for an idiot like myself.\n\nAlmost everything I do is document based. In stark contrast to companies that do a lot of batch processing or high volume transaction processing. That&amp;#x2019;s a BigTable problem so you&amp;#x2019;ll want to explore other NoSQL solutions.\n\nI only mention the session thing because if you are using something that, at it&amp;#x2019;s very core, is distributed then first thing on todo list is session handling.\n
  13. Admittedly, I haven&amp;#x2019;t used GridFS but it&amp;#x2019;s in production use on large scale system for storing things like audio and video.\n\nMapReduce is BigTable type stuff. It&amp;#x2019;s the only way to do real analytics (read: complicated queries) in NoSQL systems. I&amp;#x2019;ve avoided this to date but looks simple enough in MongoDB. HBase/Hadoop...not so much (but same basic concept).\n\nGeoSpatial support allows distance-based queries that are intuitive. Initial benchmarks show it performs much better than doing similar queries in MySQL.\n\nFluid schemas means each record in a document collection can have entirely different data. This can be good or bad. Good because it is managed in code bad because nothing but code can enforce schema changes. ORM still has a role here, IMHO.\n\nJSON is synonymous with API&amp;#x2019;s and having DB support it natively means no special work to get data into JSON\n
  14. You can do full text search in Mongo using other tools like Lucene if required.\n\nWhile not ACID has atomic operators like push that allow you to, say, push multiple comments to a blog post without fear of collisions. In other words, no need to worry about programming around concurrency issues.\n\n\n
  15. Cassandra was fine but Thrift interface sucked. Hard. Getting data in was fine but query interface was much lower level. Example query on email to get ID. Query on ID to get blog posts. This can be done with one call in MongoDB\n\nHBase/Hadoop is mind blowing. Store data in HBase, Hadoop for MapReduce, ZooKeeper...more moving parts, more complicated but meant to give high performant, non-relational solution for high volumn processing (talking trillions of records). In short I may not be smart enough for HBase.\n\nKey is to know what your organization needs, how the NoSQL databases differ and be sure to find up-to-date input on big organizations using it. NoSQL teams are iterating quickly so limitations are quickly resolved so be sure to stay current.\n
  16. This is really true of all NoSQL implementations. Don&amp;#x2019;t do it and you&amp;#x2019;ll be blaming the tool, limping back to your boss.\n\nGreat example is there is a right and wrong way to shut MongoDB down. Wrong way can lead to data loss...only takes once and it&amp;#x2019;s easy to blame the tool\n\nMongoDB wants to work in RAM. You want it to work in RAM, too. Many times you&amp;#x2019;ll want to query an item before updating it to make sure updates is as fast as possible.\n\nShould know how they use the network. I admit I&amp;#x2019;m weak here but I&amp;#x2019;m aware of it so I know when to bounce things of network geeks.\n\nSchema design even in &amp;#x201C;schema-less&amp;#x201D; environments is still key. Takes some getting use to to\n\nOOID = timestamp + machine ID + process ID + counter\n
  17. \n
  18. \n
  19. \n
  20. \n