Introducing flip-flop: MongoDB Replica Set demonstration and experimentation service

Greetings adventurers!

A lot of our users upgrade from single-node databases to replica set clusters without fully understanding how their driver, and therefore their application, will react to failover. In fact, we get so many questions about best practices with MongoDB replica sets that we thought it could be cool to host a replica set that anyone can connect to using their MongoDB driver of choice.

Today we invite you to check out flip-flop, a MongoDB Replica Set demonstration and experimentation service.  The flip-flop service consists of:

  • A live replica set that fails-over (i.e. “flips” and “flops”) every 60 seconds.  This cluster is always running and available to all at the following address:
    mongodb://testdbuser:testdbpass@flip.mongolab.com:53117,flop.mongolab.com:54117/testdb
  • A set of example client scripts (currently just in Python) that simulate client interactions with the cluster that you can use as a starting point for your own experimentation

The flip-flop service is also great for those of you working on third-party drivers. Gustavo Niemeyer, author of mgo, a MongoDB driver for the Go language, told us flip-flop helped him find and quickly fix a small bug in the driver: “This is brilliant. I actually managed to find an edge case coding a trivial example against it due to the timing of the server re-election.” Pretty cool!

Continue Reading →

{ "comments": 2 }

Backup your MongoDB databases with MongoLab

Last year, a lot of folks asked us if they could use MongoLab’s admin tools on databases not hosted with MongoLab. We thought this was a cool idea, and released Remote Connections, a feature that allows you to point MongoLab’s web interface at any cloud MongoDB instance. Since then, this feature has received great response.

Today… Remote Connections got even better! You can now use exactly the same backup tools on remote databases that our users that host with MongoLab know, love, and trust.

MongoLab’s backup system makes it extremely easy to schedule and manage backups. You can use the system to perform one-time backups or create recurring Backup Plans with custom schedules and retention policies. Backups can be stored in MongoLab’s own secure cloud containers or in a container at the cloud storage provider of your choice (e.g. Amazon S3).

Continue Reading →

[“Thinking”, “About”, “Arrays”, “In”, “MongoDB”]

Greetings adventurers!

The growing popularity of MongoDB means more and more people are thinking about data in ways divergent from traditional relational models. For this reason alone, it’s exciting to experiment with new ways of modelling data. However, with additional flexibility comes the need to properly analyze the performance impact of data model decisions.

Embedding arrays in documents is a great example of this. MongoDB’s versatile array operators ($push/$pull, $addToSet, $elemMatch, etc.) offer the ability to manage data sets within documents. However, one must be careful. Data models that call for very large arrays, or arrays with high rates of modification, can often lead to performance problems.

Continue Reading →

{ "comments": 23 }

How to use MongoDB on RedHat OpenShift with MongoLab

Hey RedHat fans – we’ve got your MongoDB hosting needs covered!

In today’s post we’ll be presenting a quick-start guide on how to connect OpenShift, the free RedHat auto-scaling Platform-as-a-Service (PaaS), with our popular MongoDB Database-as-a-Service (DBaaS), MongoLab.

For demonstration purposes, we’ll be using a Node.js application that we’ve written (available for download here). All it takes to connect your OpenShift application is five easy steps!

Continue Reading →

{ "comments": 6 }

Weekend Project: Send sensor data from Arduino to MongoDB

mongolab-motion-layout

Arduino is an open-source electronics platform that can acknowledge and interact with its environment through a variety of sensor types.  It’s great for hardware prototyping and one-off projects.

I just got an Arduino Board from our friends at SendGrid, who also gave me a little tutorial in the art of Arduino hacking. Inspired by the tutorial and armed with this new  board, I bought a passive infared (PIR) motion sensor from my local Radio Shack. Now I was ready to play; in particular, I wanted to be able to collect that continuous stream of hardware sensor data into a MongoDB database for logging, trend analysis, system event correlation, etc.

Continue Reading →

{ "comments": 2 }

MongoLab at Overdriver.com

Overdriver_Logo

We’re excited to partner with Overdriver, a unique Platform-as-a-Service for gaming that is showcasing their beta service for the first time at this year’s Game Developers Conference (GDC)!

This exciting partnership means that MongoLab will serve as the core data storage provider for Overdriver’s online game developer community. You can find out more right here.

By marrying dynamic cloud scaling with gaming-specific tooling for features like virtual goods and social functionality, Overdriver addresses the biggest demand issue that game studios face: bringing titles to market quickly but with little operational risk.

MongoDB naturally supports the object-oriented information model in games, capturing concepts such as user characters, possessions, game pieces, and state of play. MongoLab’s robust and performant MongoDB-as-a-Service lets Overdriver game developers give their full attention to designing compelling games.

We are fascinated by Overdriver and honored to be an inaugural partner in their ground-breaking specialized PaaS approach.

If you’re in San Francisco this week stop by their booth, #1838, at GDC and meet the Overdriver team. Also, be sure to sign up for an account at Overdriver.com. FYI, creating a new environment at Overdriver automatically creates a new MongoLab account and database.

We can’t wait to play with what you build!

Replication Lag & The Facts of Life

So you’re checking in on your latest awesome application one day — it’s really getting traction! You’re proud of its uptime record, thanks in part to the MongoDB replica set underneath it. But now … something’s wrong. Users are complaining that some of their data has gone missing. Others are noticing stuff they deleted has suddenly reappeared. What’s going on?!?

Don’t worry… we’ll get to the bottom of this! In doing so, we’ll examine a source of risk that’s easy to overlook in a MongoDB application: replication lag — what it means, why it happens, and what you can do about it.

Continue Reading →

{ "comments": 4 }

Object Modeling in Node.js with Mongoose

Check it out! We’ve just updated our Heroku Dev Center tutorial on object modeling in Node.js using Mongoose, a MongoDB ODM library. Mongoose gives your collections structure and simplifies Node’s callback patterns to make using MongoDB with Node.js even easier.

Learn more and download the sample Node.js app right here at the Heroku Dev Center.