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

PPTX
MongoDB Introduction - Document Oriented Nosql Database
PDF
PDF
Scaling with MongoDB
PPTX
Fusion-io and MySQL at Craigslist
PPTX
mongodb_Introduction
PPTX
Mongodb open data day 2014
PPTX
Getting Started with MongoDB
KEY
Introduction to MongoDB (from Austin Code Camp)
MongoDB Introduction - Document Oriented Nosql Database
Scaling with MongoDB
Fusion-io and MySQL at Craigslist
mongodb_Introduction
Mongodb open data day 2014
Getting Started with MongoDB
Introduction to MongoDB (from Austin Code Camp)

Viewers also liked (8)

PPT
Nerd Herding
PPT
Technology Is Annoying
PPT
Web Security Overview and Demo
PPT
20070921 Uni Softwareengineering
PPT
Fed Up Of Framework Hype Dcphp
PDF
Improving Untestable Code
PPT
Cross Site Request Forgery
PDF
Study: The Future of VR, AR and Self-Driving Cars
Nerd Herding
Technology Is Annoying
Web Security Overview and Demo
20070921 Uni Softwareengineering
Fed Up Of Framework Hype Dcphp
Improving Untestable Code
Cross Site Request Forgery
Study: The Future of VR, AR and Self-Driving Cars
Ad

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

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

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
cuic standard and advanced reporting.pdf
Network Security Unit 5.pdf for BCA BBA.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Weekly Chronicles - August'25 Week I
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx

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

  • #2: 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
  • #3: - Aerospace\n- Ag\n- Marketing\n- Public Service\n- GForge\n\nLAMP but continuously dabbling in other stuff.\n
  • #4: 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
  • #5: 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
  • #6: Get a lot more people drunk faster. \n
  • #7: 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
  • #8: - 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
  • #9: 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
  • #10: 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
  • #11: Are there others?\n\nHow may people are using NoSQL in production? Which flavor?\n\nAny quick plugs for those solutions?\n
  • #12: 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
  • #13: 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
  • #14: 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
  • #15: 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
  • #16: 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
  • #17: 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
  • #18: \n
  • #19: \n
  • #20: \n
  • #21: \n