accra mongodb user group
DESCRIPTION
TRANSCRIPT
Accra MongoDB User Group
Meeting held on 10th November 2012Presented by Yusuf Hamza(Founder and Co-Organizer)
What is MongoDB?
- Database Management System
-Open Source
-Document Oriented
-Schema less
-Scalability
-Agility
-Rich Text Query
A Brief on 10gen
Founders-Dwight Merriman: former DoubleClick Founder and CTO
-Eliot Horowitz: former DoubleClick engineer and ShopWiki Founder and CTO
Dwight + Eliot =experiences building large scale, high availability, robust systems.
Management
-Dwight Merriman, CEO & Co-FounderTwitter: http://twitter.com/dmerr blog: http://dmerr.tumblr.com/
-Max Schireson, PresidentTwitter: http://twitter.com/mschireson blog: http://maxmschireson.com/
Eliot Horowitz, CTO & Co-FounderTwitter: http://twitter.com/elliothorowitz blog: http://elliothorowitz.com/
Offices
-New York City (New York)
-Palo Alto (Carlifornia)
-Reston (Virginia)
-London(Great Britain)
-Dublin(Ireland)
-Barcelona(Spain)
-Sydney( Australia)
Investors
-Flybridge Capital Partners: www.flybridge.com
-Sequoia Capital: http://www.sequoiacap.com/us/technology
-Union Square Ventures: http:// www.usv.com/
-New Enterprise Associate, Inc. (NEA): http:// www.nea.com/
Customer Portofolio : USA-Buddy Media -Prizee -Wordnik-Cisco -Rangespan - Zuberance -Craiglist -Server Density-CustomLink -Shopcade-Disney -Shurterfly-Forbes -Smartling-Foursquare -Sruq-Intuit - The Guardian-Mtv Networks -Tracckr
Why Join MongoDB User Group?
-Stimulate your intelligence
-Job Trends
-New way of dealing with Data
-Meet the demands of the future
- Learn and Share ideas in a relaxed and free session
- Get solutions to your database problems
- Collaborate to undertake new projects
- Any issue worth pursuing.
Cloud and Hosting Partners:
-Amazon Web Services
-Engine Yard
-Joyent
-Windows Azure
-MongoHQ
-MongoLab
-Rackspace Hosting
-RedHat
-VMWare
- Enovance
Use Cases:
- Operational Intelligence
- Content Management
- Product Data Management
- High Volume Data Feeds
- User Profile Management
- Hadoop.
Basic MongoDB Operations
• http://www.10gen.com/static/downloads/mongodb_qrc_queries.pdf
Queries and what they match
MongoDB Commands
• http://www.10gen.com/static/downloads/mongodb_qrc_commands.pdf
MongoDB accounts for 43% of all mention of NoSQL technologies in linked in Profiles.
Credit: Mathew Asslet
MongoDB 2.2. what’s new?
Concurrency
• DB level Locking -Replication not impeded by other operations -Can be spited into Dbs
• Yielding with Disk Acess - Finish making sure no disk acess in a lock - can measure globally and per db if it happens - Can measure faults per db
Aggregation Framework
Map Reduce = complicated (javascrip codes) and not too awesome
MongoDB 2.2 Proves a simpler and more awesome approach e.g Simple JSON Aggegation db.post.aggregate( { $unwind : “$tags” , { $group : { id : “$tags” , total : { $sum : 1 } } } )
TTL Collections
• Currently works with dates
• Db.sessions.ensureindex({ lastupdated : 1 } , { expiresAfterSeconds :
86400 } ) ;
• Background Job deleting entries
• Storage engines configured for no fragmentation
Fragmentation
Reasons why it’s a problem
Storage engine free list stored by a power of 2
- Non heterogeneous sized data can fragment
-Always allocate power of 2
- db.carts.runCommand(
- “collmod” ,
-{ usePowerOf2sizes : true } )
Benefit: Consistency in performance
Setback: Unused disk spaces(Expensive)
Data Center Awareness
• Tagging for sharding• Can tag shard –A, B,C• Can define tag ranges - 0 -100 > A - 100-200 > B - ……
Use Cases• Geo Collocating Data
• Isolating Collections/data to specific shards/regions/types
• Non heterogeneous hardware
• Multi tenancy
A simple Applicationsusing MongoDB
Developing an application to find nearby restaurant serving ‘Fufu ‘Using MongoDB as datasore.
“Fufu” is a favorite delicacy in Ghana
• Geolocation Primer: Mehods to determine location
• Detecting the location of a web visitor: The W3C geolocation API
• Browsers support for the API
• The Geolocation object: getCurrentPosition() method
• Drawing map using the Google Maps API
• Geospational Indexes: creating geospatial indexe
• Performing location queries:finding restaurants near you using geoNear()
Command and bounded queries
• Geospatial Haystack Indexing: finding restaurants near you serving “fufu”
Free online courses from 10gen Education
10gen Education
• An online learning platform run by 10gen (the MongoDB company) available to anyone in the world with an internet connection.
• free courses will teach you how to develop for and administer MongoDB quickly and efficiently.
• Frequent assessments help you verify your understanding, and at the end of a course, you'll receive a certificate of completion from 10gen.
• You'll also become a member of 10gen's community of cutting-edge NoSQL technologists.
• Over time, 10gen will be adding classes on schema design, advanced scaling and replication, and other topics, so check back often!
• 10gen's education platform was developed under a collaboration with edX, the not-for-profit consortium between MIT, Harvard and Berkeley.