Archive | MongoDB RSS feed for this section

DZone MongoDB Reference Card

As developers we’re always appreciative of documentation that lets us absorb a lot of detailed information as quickly as possible. While nothing can replace a detailed reading of the core MongoDB documentation from 10gen, a few pages of pithy reminders can make operational life a lot easier.

MongoLab sponsored the recent DZone reference card for MongoDB. Here’s a little snippet below. Download the rest of it here http://refcardz.dzone.com/refcardz/mongodb(registration with DZone required)

Dzone Refcard screenshot-02

Thanks to Kristina Chodorow and the 10gen crew for a nice reference card and to the folks at DZone for producing it!

UPDATE 2013-02-06: added note saying that DZone requires registration

Automated Slow Query Analysis: Dex recorded presentation from MongoSV 2012

Automated Slow Query Analysis: Dex the Index Robot

On December 4th, MongoLab engineer Eric Sedor presented about “Automated Slow Query Analysis: Dex the Index Robot” at MongoSV 2012, an annual one-day conference in Silicon Valley, CA, dedicated to the open source, non-relational database MongoDB.

A well-indexed query improves performance by several orders of magnitude. The trick is to identify an ideal set of indexes for a particular use case. Even for experts, hand-crawling MongoDB log for slow queries is a laborious process. Introducing Dex: an open-source automated tool for analyzing the slow query log or system.profile collection. Dex’s primary author Eric Sedor demonstrates Dex’s usage and elaborates on indexing topics from the basic to the advanced. Includes how to pick indexes in an elegant, practical way. You learn how Dex categorizes slow queries and recommends indexes to help keep your application running smoothly. Eric is an engineer at MongoLab, cloud-hoster of MongoDB, where Dex is used daily to optimize customer indexes.

Check out the recording below and please be sure to check out 10gen’s page for the presentation which has links to Speaker Deck slides and an alternate video link.

Here’s Dex’s github page, and the latest version (0.5) announcement

MongoLab Discount for JS.everywhere() 2012

MongoLab is happy to be sponsoring the JS.everywhere() conference in Silicon Valley at the end of October. If you’re interested in joining us, please use this discount code on the registration page: “mongolabJS”.  You’ll get 50% discount on attendance. We are looking forward to seeing you there.

MongoDB’s native support for JSON of course makes it a natural fit to work with Javascript.  Javascript’s growing popularity beyond browser clients is driving the need for a scalable JSON persistence layer.  Having that cloud persistence layer at MongoLab, we get to see many interesting new projects in enterprises large and small.  So we’re excited to be reaching out to meet new users.

Details on our events page:

URL: http://www.jseverywhere.org/
Registration URL: http://jse2012.eventbrite.com/
Discount Code: mongolabJS
Dates: October 26-27, 2012
Location: San Jose, CA

Nodestack


We’re excited be part of the Oct 17 Nodestack.org online conference with Joyent, Clock Ltd, 10gen, and Nodejitsu.

What is Nodestack?

If you’re a Web developer you may have felt the same thing in the last year or so: Javascript is winning. More precisely, Joyent’s Node.js, supported by 10gen’s JSON-centric MongoDB database for persistence is winning. And by using SmartOS as the host for Node.js, Joyent offers the inspectability, performance, and debuggability capabilities of DTrace and ZFS to Nodestack.

Parochially, I’ve included a Google Trends widget above comparing “node”, “ruby”, and “java” when searched with “mongodb”. As of this writing, “node” had just crossed “ruby”s trend line and was headed up to challenge “java”.

Why Nodestack?

There are many reasons why Nodestack is emerging as a leading developer choice, including:

  • developer familiarity with Javascript from front-end browser domains
  • the battle-tested underlying Google V8 Javascript engine for high performance
  • a harmonious non-blocking asynchronous IO environment resulting in efficient CPU utilization
  • good fitness for demanding near real-time dynamic web and mobile applications
  • effortless JSON-awareness across the stack means fewer developer cycles wasted on data translation
  • a well-supported package management system with growing library of components for basic and advanced needs
  • a deep-bench ecosystem of infrastructure, platform and consulting services from vendors like Joyent Cloud, Nodejitsu and Clock Ltd. for even easier design, development, and production.
  • mdb_v8, DTrace and flame graphs (visual temporal call graphs) on SmartOS for fast root-cause analysis / debugging.

Nodestack Conference

At the Oct 17 online conference, you’ll talk with:

  • Nodejitsu’s Nuno Job on “Crazy, Cool Things You can do with Node.js”
  • 10gen’s Aaron Heckmann on “Node.js + MongoDB = Love” and why these technologies fit so well together.
  • Joyent’s Bryan Cantrill on “Stack Foundation = SmartOS” on SmartOS’ hypervisor benefits for Nodestack including flexibility for KVM virtualization
  • A panel including 10gen’s Jared Rosoff, Joyent’s Jason Hoffman, Clock Ltd’s Paul Serby and yours truly on the economic benefits of Nodestack.

So please sign up here to join us. The webcast is scheduled to start at 9am PT on Oct 17, 2012.

*If you are local in San Francisco, CA, we’re also inviting a few folks to join us as part of the studio audience. Email ben at mongolab dot com if you’re interested. See our Events page for other events.

Updated: 2012-09-28 with exact start time. Grammar fix ^less^fewer. Added link to Aaron’s preview post; mdb_v8, David Pacheo deck.

2012-10-01 fixed broken SmartOS link.

MongoSeattle 2012 with talk on Dex

(update: slide deck here https://speakerdeck.com/u/ericsedor/p/dex-the-index-bot)

We’re attending and sponsoring MongoSeattle 2012 on September 14!  Eric Sedor will be presenting his recent work on Automated Slow Query Analysis: Dex the Index Robot our open source tool at 11:30am in the “Sound” hall.  Source code and instructions available here on github.

We’ll have our booth to talk to folks about our MongoDB offering in the cloud and with PaaS providers.

Location: Bell Harbor International Conference Centerq 2211 Alaskan Way, Pier 66, Seattle, WA 98121 206.441.6666

Registration: here.

We have a few community discount passes left.  Email ben at mongolab.com if you’re interested.

MongoLab Events Page Is Live

We’ve been attending and sponsoring more events, so it’s time to collect our upcoming calendar on one page, persistently.  We’ll also include references to past events with recordings where we have them.

Hope to see you at one of these!  We’ll still announce and elaborate on certain events here on the main blog.

If you have an event where you’d like us to participate, drop us a line at support at mongolab.com.  We’ll do our best to accommodate.  We love meeting new people who are interested in MongoDB in the cloud.

Click here for our new events page.

Why is MongoDB wildly popular? It’s a data structure thing.

“Show me your code and conceal your data structures, and I shall continue to be mystified. Show me your data structures, and I won’t usually need your code; it’ll be obvious.” - Eric Raymond, in The Cathedral and the Bazaar, 1997

Linguistic innovation

The fundamental task of programming is telling a computer how to do something.  Because of this, much of the innovation in the field of software development has been linguistic innovation; that is, innovation in the ease and effectiveness with which a programmer is able to instruct a computer system.

While machines operate in binary, we don’t talk to them that way. Every decade has introduced higher-level programming languages, and with each, an advancement in the ability of programmers to express themselves. These advancements include improvements in how we express data structures as well as how we express algorithms.

The Object-Relational impedance mismatch

Almost all modern programming languages support OO, and when we model entities in our code, we usually model them using a composition of primitive types (ints, strings, etc…), arrays, and objects.

While each language might handle the details differently, the idea of nested object structures has become our universal language for describing ‘things’.

The data structures we use to persist data have not evolved at the same rate. For the past 30 years the primary data structure for persistent data has been the Table – a set of Rows comprised of Columns containing scalar values (ints, strings, etc…). This is the world of the relational database, popularized in the 1980′s by its transactionality, speedy queries, space efficiency over other contemporary database systems, and a meat-eating ORCL salesforce.

The difference between the way we model things in code, via objects, and the way they are represented in persistent storage, via tables, has been the source of much difficulty for programmers. Millennia of man-effort have been put  against solving the problem of changing the shape of data from the object form to the relational form and back.

Tools called Object-Relational Mapping systems (ORMs) exist for every object-oriented language in existence, and even with these tools, almost any programmer will complain that doing O/R mapping in any meaningful way is a time-consuming chore.

Ted Neward hit it spot on when he said:

“Object-Relational mapping is the Vietnam of our industry”

There were attempts made at object databases in the 90s, but there was no technology that ever became a real alternative to the relational database. The document database, and in particular MongoDB, is the first successful Web-era object store, and because of that, represents the first big linguistic innovation in persistent data structures in a very long time. Instead of flat, two-dimensional tables of records, we have collections of rich, recursive, N-dimensional objects (a.k.a. documents) for records.

An Example: the Blog Post

Consider the blog post. Most likely you would have a class / object structure for modeling blog posts in your code, but if you are using a relational database to store your blog data, each entry would be spread across a handful of tables.

As a developer you, need to get know how to convert the each ‘BlogPost’ object to and from the set of tables that house them in the relational model.

A different approach

Using MongoDB, your blog posts can be stored in a single collection, with each entry looking like this:

{
    _id: 1234,
    author: { name: "Bob Davis", email : "bob@bob.com" },
    post: "In these troubled times I like to …",
    date: { $date: "2010-07-12 13:23UTC" },
    location: [ -121.2322, 42.1223222 ],
    rating: 2.2,
    comments: [
       { user: "jgs32@hotmail.com",
         upVotes: 22,
         downVotes: 14,
         text: "Great point! I agree" },
       { user: "holly.davidson@gmail.com",
         upVotes: 421,
         downVotes: 22,
         text: "You are a moron" }
    ],
    tags: [ "Politics", "Virginia" ]
 }

With a document database your data is stored almost exactly as it is represented in your program. There is no complex mapping exercise (although one often chooses to bind objects to instances of particular classes in code).

What’s MongoDB good for?

MongoDB is great for modeling many of the entities that back most modern web-apps, either consumer or enterprise:

  • Account and user profiles: can store arrays of addresses with ease
  • CMS: the flexible schema of MongoDB is great for heterogeneous collections of content types
  • Form data: MongoDB makes it easy to evolve structure of form data over time
  • Blogs / user-generated content: can keep data with complex relationships together in one object
  • Messaging: vary message meta-data easily per message or message type without needing to maintain separate collections or schemas
  • System configuration: just a nice object graph of configuration values, which is very natural in MongoDB
  • Log data of any kind: structured log data is the future
  • Graphs: just objects and pointers – a perfect fit
  • Location based data: MongoDB understands geo-spatial coordinates and natively supports geo-spatial indexing

Looking forward: the data is the interface

There is a famous quote by Eric Raymond, in The Cathedral and the Bazaar (rephrasing an earlier quote by Fred Brooks from the famous The Mythical Man-Month):

“Show me your code and conceal your data structures, and I shall continue to be mystified. Show me your data structures, and I won’t  usually need your code; it’ll be obvious.”

Data structures embody the essence of our programs and our ideas. Therefore, as programmers, we are constantly inviting innovation in the ease with which we can define expressive data structures to model our application domain.

People often ask me why MongoDB is so wildly popular. I tell them it’s a data structure thing.

While MongoDB may have ridden onto the scene under the banner of scalability with the rest of the NoSQL database technologies,  the disproportionate success of MongoDB is largely based on its innovation as a data structure store that lets us more easily and expressively model the ‘things’ at the heart of our applications. For this reason MongoDB, or something very like it, will become the dominant database paradigm for operational data storage, with relational databases filling the role of a specialized tool.

Having the same basic data model in our code and in the database is the superior method for most use-cases, as it dramatically simplifies the task of application development, and eliminates the layers of complex mapping code that are otherwise required. While a JSON-based document database may in retrospect seem obvious (if it doesn’t yet, it will), doing it right, as the folks at 10gen have, represents a major innovation.

will@mongolab

{ "comments": 35 }

MongoDB Users Group Events July 2012

Silicon Valley July 17, 2012: Dex and Fluentd

http://www.meetup.com/MongoDB-SV-User-Group/events/72760092/

10gen Palo Alto
555 University Avenue
Palo Alto, CA 94301

Query performance is critical for most applications.  Proper MongoDB index creation can mean over two orders of magnitude in latency improvement.   At the Silicon Valley MongoDB Users Group (SVMUG), MongoLab Engineer Eric Sedor will be presenting Dex, the Index Robot and the query optimizing rules that went into making Dex.  Dex is available under a liberal MIT open source license.

San Francisco July 25, 2012: MongoDB 2.2 and MongoCtl

http://www.meetup.com/San-Francisco-MongoDB-User-Group/events/60532682/

Mozilla HQ
2 Harrison Street
San Francisco, CA 94105

At the San Francisco MongoDB Users Group (SFMUG), MongoLab CEO Will Shulman will be presenting mongoctl, our open source (MIT License) MongoDB replica set cluster configuration tool.  Mongoctl uses declarative statements (optionally in JSON) to simplify creation, maintenance, and deprovisioning of MongoDB servers.

Thank you to 10gen, Mozilla HQ and the rest of the sponsors for hosting us! Hope to see you there!

(Updated: 2012-07-12 Giving thanks)

{ "comments": 1 }