
Introduction MongoDB wasn’t designed in a lab. We built MongoDB from our own experiences building large scale, high availability, robust systems. We didn’t start from scratch, we really tried to figure out what was broken, and tackle that. So the way I think about MongoDB is that if you take MySql, and change the data model from relational to document based, you get a lot of great features: embedded docs for speed, manageability, agile development with schema-less databases, easier horizontal scalability because joins aren’t as important. There are lots of things that work great in relational databases: indexes, dynamic queries and updates to name a few, and we haven’t changed much there. For example, the way you design your indexes in MongoDB should be exactly the way you do it in MySql or Oracle, you just have the option of indexing an embedded field. Operations MongoDB is a server process that runs on Linux, Windows and OS X. MongoDB can also be configured for data replication.
Administration Tutorials — MongoDB Manual 2.6.6 The administration tutorials provide specific step-by-step instructions for performing common MongoDB setup, maintenance, and configuration operations. Configuration, Maintenance, and Analysis Describes routine management operations, including configuration and performance analysis. Manage mongod Processes Start, configure, and manage running mongod process. Rotate Log Files Archive the current log files and start new ones. Continue reading from Configuration, Maintenance, and Analysis for additional tutorials of fundamental MongoDB maintenance procedures. Backup and Recovery Outlines procedures for data backup and restoration with mongod instances and deployments. Backup and Restore with Filesystem Snapshots An outline of procedures for creating MongoDB data set backups using system-level file snapshot tool, such as LVM or native storage appliance tools. Backup and Restore Sharded Clusters Detailed procedures and considerations for backing up sharded clusters and single shards. MongoDB Scripting
Atomic Operations Overview Write operations are atomic on the level of a single document: no single write operation can atomically affect more than one document or more than one collection. When a single write operation modifies multiple documents, the operation as a whole is not atomic, and other operations may interleave. The modification of a single document, or record, is always atomic, even if the write operation modifies multiple sub-documents within the single record. No other operations are atomic; however, you can isolate a single write operation that affects multiple documents using the isolation operator. This document describes one method of updating documents only if the local copy of the document reflects the current state of the document in the database. the findAndModify() provides an isolated query and modify operation.Perform Two Phase CommitsCreate a unique index, to ensure that a key doesn’t exist when you insert it. Update if Current In this pattern, you will:
Admin UIs MongoDB does not include a GUI-style administrative interface. Instead most administration is done from command line tools such as the mongo shell. However some UI’s are available as separate community projects and are listed below. Third-Party Open-Source Tools Edda Edda is a log visualizer. Fang of Mongo Fang of Mongo is a web-based user interface for MongoDB build with django and jquery. It will allow you to explore content of MongoDB with simple but (hopefully) pleasant user interface. Features: field name autocompletion in query builderdata loading indicatorhuman friendly collection statsdisabling collection windows when there is no collection selectedtwitter stream pluginmany more minor usability fixesworks well on recent chrome and firefox UMongo (formerly JMongoBrowser) UMongo is a GUI app that can browse and administer a MongoDB cluster. MongoHub MongoHub is a native OSX GUI. MongoVision MongoVision is a MongoDB management tool written for Prudence. MongoVUE NoSQL Manager mViewer PHPMoAdmin
A Full Javascript Architecture, Part Three - MongoDB Introduction to MongoDB Presentation MongoDB presents itself as a scalable, high-performance, open source and document-oriented database written in C++. Each of the concepts behind the first three characteristics are well known so let's focus on the fourth one : document-oriented. To clearly understand this concept we need some basic MongoDB terminology. A document-oriented database is a database where each document in a same collection may have a totally different structure. Because all the information of the same entity can be dynamically stored within a single document, joins operations are no longer needed in this type of database. Joins operations are really expensive, they require a strong consistency and a fixed schema. Data Types MongoDB uses BSON as the data storage and network transfer format. Its key advantage over XML and JSON is efficiency in term of space and compute time. Advanced Features Why MongoDB ? JavaScript JSON Document-Oriented Schemaless Real-Time NodeJS driver Installation
J U M P E R Z . N E T - MonjaDB (MongoDB GUI client tool) Overview MonjaDB is a MongoDB GUI client tool for rapid application development. It aims to provide a thoroughly straightforward way of updating MongoDB documents. MonjaDB has been developed as a plugin for Eclipse, so you will need to have Eclipse installed. Features - Easy to use - WYSIWYG editing on JSON/Table/Tree of MongoDB documents. - Very flexible window management (thanks to the Eclipse rich client platform). - "Actions" is a powerful Macro-like function. Available Eclipse Views/Dialogs >> Connection Dialog You can use two types of connections: Normal TCP connection and connection via SSH local port forwarding to MongoDB. >> DB Tree The "DB Tree" view shows databases and collections in tree-view. >> DB List The "DB List" view shows the list of databases. >> Collection List The "Collection List" view shows the list of the collections in the selected database. >> Document List The "Document List" view shows the documents found by an arbitrary "find" query. >> Document Editor >> Actions License
Notes on MongoDB, GridFS, sharding and deploying in the cloud | Viktor Petersson.com We‘ve been using MongoDB in production for about six months with YippieMove. It’s been an interesting experience and we’ve learned a lot. Contrary to many MongoDB deployments, we primarily use it for storing files in GridFS. We switched over to MongoDB after searching for a good distributed file system for years. Prior to MongoDB we used a regular NFS share, sitting on top of a HAST-device. Enter MongoDB. In the post, I will go over some of the things we’ve learned when using MongoDB. Running MongoDB in the Cloud One major thing to keep in mind when deploying MongoDB is that it matters a lot if you are deploying in a public cloud or on dedicated server. The biggest constrain with running in the cloud is limited I/O performance. When we started out, we started with a replica set with three members (Primary + 2x Secondary). To cope with this, we changed our strategy a bit and turned one of the secondaries into an arbiter. The setup we ended up then with was as follows: Replica Set rs.status()
Main Page - Smooks