Archive | general RSS feed for this section

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 →

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 sponsors Node Knockout hackathon 2012


We’re fans of Node.js and so we’re happy to be sponsoring the Node Knockout 48-hour hackathon and to be providing two prizes!

We host MongoDB at JoyentCloud with 500MB free plans.  JoyentCloud is where Nodejitsu hosts Node Knockout apps.  If you select JoyentCloud’s us-east-1 (Virgina) datacenter, you’ll have a low latency connection between your Node Knockout app and your database.

Instructions on how to provision a MongoLab server on the JoyentCloud (UPDATED):

  1. “npm update -g jitsu” OR “npm install -g jitsu”
  2. “jitsu databases create mongo”

We’ll have a person on-site at Joyent’s San Francisco headquarters for the kickoff on Nov 9.  As always, we have engineers at support@mongolab.com at the ready to answer questions.

We are offering the winners of the Team category and the Innovation category each a dedicated replica-set cluster with 2 GB RAM for 6 months.  May the best apps win!

updates: 2012-11-09 clarification on prizes, official Node Knockout URL added.  Old draft URL here: https://gist.github.com/4042395.  Updated instructions.

Dex 0.5: Weighted Index Recommendations for MongoDB

Greetings, adventurers!

I am happy to announce the latest version of Dex, MongoLab’s Index Bot. With version 0.5, we’re declaring Dex halfway-there in terms of major features. The most important and convenient improvements in this version are Weighted Index Recommendations and support for MongoDB 2.2 log files.

If you haven’t given Dex a try yet, check out the README and sudo pip install dex to get started. Even if you are already a Dex user, I highly recommend you revisit the readme, as Dex’s output has changed.

Now when you run Dex, Dex compiles statistics for its recommendations, and provides those in its output. In contrast to prior versions, this gives a weight to each suggested index, clearly identifying the worst offenders.

Here’s a rundown of major changes:

  • Weighted Recommendations – For each recommendation, Dex tallies the number of affected queries, the total time consumed by those queries, and the average time for a single query. Note that Dex keeps subtotal statistics for each unique query pattern that prompted a given recommendation. Subtotals are available in –verbose/-v mode only.
  • Output changes – We’ve modified Dex’s output for the purposes of readability and convenience, in the following ways:
    • By default (i.e., not in –watch/-w mode), Dex no longer provides runtime output. Dex reads the entire profile collection or log file and then outputs one set of full results.
    • In –watch/-w mode, Dex still provides runtime output, periodically printing all recommendations with up-to-date statistics.
    • The shell command suggestion is removed from default output in favor of concise, weighted index recommendations. The shell command is still available in –verbose/-v output, but is no longer included by default.
  • Support for MongoDB 2.2 log files – While Dex has supported MongoDB 2.2 in –profile/-p mode, updates to Dex’s log file regexes now support recent updates to the MongoDB log file line format.

For more information about Dex, check out Introducing Dex. As always, good luck out there!

Sincerely,
Eric@MongoLab

{ "comments": 2 }

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.