Archive | MongoDB RSS feed for this section

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.

Node.js and MongoLab on Windows Azure

(This tutorial was originally published on the Windows Azure documentation portal in January 2013)

Greetings, adventurers! Welcome to MongoDB-as-a-Service. Are you looking to create a Node.js Application on Windows Azure with MongoDB using the MongoLab Azure Store add-on?

In this tutorial you will:

  1. Provision the database – The Windows Azure Store MongoLab add-on will provide you with a MongoDB database hosted in the Windows Azure cloud and managed by MongoLab‘s cloud database platform.
  2. Create the app – It’ll be a simple Node.js app for maintaining a list of tasks.
  3. Deploy the app – By tying a few configuration hooks together, we’ll make pushing our code a breeze.
  4. Manage the database – Finally, we’ll show you MongoLab’s web-based database management portal where you can search, visualize, and modify data with ease.

At any time throughout this tutorial, feel free to kick off an email to support@mongolab.com if you have any questions. To complete this tutorial, you need a Windows Azure account that has the Windows Azure Web Sites feature enabled. You can create a free trial account and enable preview features in just a couple of minutes. For details, see the Create a Windows Azure account and enable preview features tutorial.

In addition, ensure that you have the following installed:
Continue Reading →

{ "comments": 2 }

Experiment with MongoDB 2.4 on MongoLab!

Hello to all our friends and users!

We’re happy to announce that free, experimental databases running MongoDB 2.4 are now available at MongoLab! To get started quickly, follow our step-by-step guide.

Please note: This release is not ready for production yet and should not be used for any production applications.

Release Highlights

Here are the exciting new features and improvements in MongoDB 2.4 that we’d like to highlight:

Full-text search

For your exploration, we are boldly ignoring the warning label on this feature, which is described as an “experimental feature” in 2.4, and are running these servers with textSearchEnabled=true.

You get one text index per collection and create it, similarly to spatial indexes, by providing a special value in your index creation call.

The following simple example text-indexes the “skills” field of the “players” collection.

> db.players.ensureIndex({"skills": "text"})

You can include more than one text-indexed field in a single text index as well as other fields, such as:

> db.players.ensureIndex({"skills": "text", "interests": "text", "age": 1})

To run a query that returns documents that contain the word “telepathy” (case-insensitive) in either the skills or interests fields:

> db.players.runCommand("text", {"search": "telepathy"})

There are several considerations when making a text index and even useful options such as weighting of fields. So… before you make use of this feature, be sure to read the text indexes documentation.

The above example uses the mongo shell. If you want to run through this example in MongoLab’s admin UI, scroll on down…

JavaScript engine now uses v8 as the default

The default JavaScript interpreter used throughout MongoDB, for the mongo shell, mapreduce, $where and eval is now v8 instead of SpiderMonkey. For all users making use of the JavaScript engine, we encourage you to run the same code against this new engine and see how it performs!

Better GeoSpatial indexing

Spherical Geospatial queries are now supported by their own index type. You can create this new type of index just like you currently create a geospatial index, except that you need to specify “2dsphere” in the index definition instead of “2d”. Much like the 2d index requirement of storing [long, lat] data in a certain format, 2dsphere indexes have specific data considerations; for example, you must store a point, line, or polygon in GeoJSON format.

This new index type becomes even more useful with the $geoIntersects operator. Now, MongoDB can tell you if two of your shapes overlap. This is a powerful but specialized tool, so familiarize yourself with the details by reading the release notes and make sure it’s right for you.

An interrupted index build can now be resumed

Ah – this feature improvement is music to our ops-centric ears!  Previously if your mongod process died (either through intentional shutdown or unexpected termination) while you were building an index, you had to start the index build from scratch again.  As of this release, mongod will continue where it left off on an index build after the process starts again.

Example: A simple full-text search using MongoLab

Below is a step-by-step guide to creating a free database running MongoDB 2.4 and running your first full-text search.

[1] Sign up for a MongoLab account if you don’t already have one

[2] Click the “Create new” button after you are logged in to create the database, checking the highlighted checkbox below.  Note that database names need to be unique within an account and mongod process.
Screen Shot 2013-02-07 at 12.44.48 PM

[3] On the “Collections” tab click “Add” and create a collection called “players”

[4] We need some data to run a search against, so click into the row representing this collection so that we can add some.

[5] Click “Add” and copy the following document into the JSON editor:

     { "skills": "telepathy archery",
       "interests": "eating drinking",
       "age": 34 }

[6] On the “Indexes” tab click “Add” to text-index the “skills” and “interests” fields

Screen Shot 2013-02-08 at 12.42.25 PM

[7] Let’s run our first full-text search! On the “Tools” tab and the “commands” sub-tab, select the “text” command:

Screen Shot 2013-02-08 at 12.37.08 PM

Questions or Thoughts?

As you play around with our experimental databases running this new release, please email us anytime! We are eager to help you as you explore this exciting release or if you have any other questions or thoughts about MongoDB.

{ "comments": 3 }

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