Tuesday, July 31, 2012

Last Chance for Early Bird Atlanta MongoDB Training

As announced earlier, I'm offering some MongoDB training classes in the first week of August in Atlanta. So why am I cluttering up your inbox today? Mainly because the early bird price of $400 per day ends at 11:59 pm (EDT) tonight, after which the price goes up to $500.

Monday, July 30, 2012

Gevent and Greenlets

Continuing on in my series on gevent and Python, this article gets down into practical details, showing you how to install gevent and get started with basic greenlet operations. If you're just getting started with Gevent, you might want to read the previous articles in this series first:

And now that you're all caught up, let's get started with gevent...

Tuesday, July 24, 2012

Two MongoDB books (one now, one early 2013)

Today I'm happy to make two book-related announcements.

MongoDB with Python and Ming Book

First off, I've collected, edited, and expanded upon the the MongoDB and Python series I've been working on at Just a Little Python and released it as an eBook. MongoDB with Python and Ming is now available on Lulu as an epub and on Amazon (at MongoDB with Python and Ming). In the book, I cover the following topics:

  • Using PyMongo, from installing & basic queries to the new aggregation framework
  • Overview of tuning your application for the best performance under MongoDB including discussions of replication and sharding
  • Using the Ming toolkit to enforce your schema in MongoDB
  • Using Ming's object-document mapper (ODM) to raise the abstraction level of your MongoDB programming
  • Various tips, tricks, and goodies with Ming including Mongo-in-Memory, extending the ODM, and schema migrations

MongoDB Applied Design Patterns

The second announcement is that I've agreed to write another book for O'Reilly, tentatively titled MongoDB Design Patterns. That one's not done yet, and it's still early in the authoring / publication process, but it should be available early 2013. Sadly I don't have a nice product page link to share with you yet, but I will leave you with a summary of the topics I plan to cover:

  • Part 1: MongoDB Design Patterns
    • Embedding versus referencing documents
    • Using polymorphic schemas
    • Using complex atomic updates
    • Optimistic updates with compensation (in lieu of multi-document transactions)
  • Part 2: Use Cases
    • Operational intelligence / real-time analytics
    • E-Commerce
    • Content management systems
    • Online advertising networks
    • Social Networking
    • Online Gaming

I hope that's enough to whet your appetite. Of course, the book's not finished, so if you have any other topics you'd love to see covered in such a book, I'd love to hear about it in the comments!

Monday, July 23, 2012

Gevent, Threads, and Benchmarks

In a previous post, I gave an introduction to gevent to show some of the benefits your application might get from using gevent greenlets instead of threads. Some people, however, took issue with my benchmark code, saying that the threaded example was contrived. In this post, I'll try to answer some of the objections.

(It actually turns out that there was a bug in the version of ab I was using to test, as well, so I re-ran the tests from the previous post, too.)

Introduction to Gevent

In a previous post, I described how to build a web chat server with socket.io and gevent. If you're trying to actually learn gevent, socket.io, however, it's probably not the best place to start. So I figured I'd write this post and provide an overview of gevent.

[Update 2012-07-24] In response to some criticisms of the micro-benchmarks in this post, I reworked the benchmarks and wrote an updated gevent and threads post. Make sure you read that one for more perspective on greenlets vs. threads.

Tuesday, July 17, 2012

MongoDB Training Classes in Atlanta

As promised earlier, we have now officially launched MongoDB and Python training classes. The first batch of classes will be offered between August 7-10, 2012, with early bird registration closing on July 31. We'd love to have you attend one or more classes, so read on for more info!

Monday, July 16, 2012

Realtime Web Chat with Socket.io and Gevent

In a previous post, I described how to build a realtime analytics graph with socket.io. That was nearly a year ago, however, and both socket.io and the Python library gevent-socketio have both undergone significant changes. In this post, then, I'll use the latest versions of each to build a web chat server.

Tuesday, July 10, 2012

Rick's Resources Blog

Since starting my own consulting business (and actually, quite a while before that), I've run across various resources, from hosting, to web apps, to actual, tangible products I've bought, that others might find interesting. In order let those who want to hear about such things hear about them, while keeping this blog more technically focused, I've created a new blog, Rick's Resources, that will cover the various things I've found interesting over the years.

Hopefully this blog will be useful to those of you who are interested, and as I mentioned, for those of you who aren't, just stick around here and we'll get back to Python momentarily. For those who are interested, my inaugural post on the resources blog is The Five Minute DreamHost Blog, where I walk you through setting up a blog on DreamHost. (It's not technically five minutes since you have to wait for some emails, but it's a reasonable facsimile thereof, I hope.)

And now, back to your regularly scheduled Pythonning....



Monday, July 09, 2012

Multi-Master Replication in MongoDB

Since starting my own consulting business, I've had the opportunity to work with lots of interesting technologies. Today I wanted to tell you about some interesting technology I got to develop for MongoDB: multi-master replication.

Wednesday, July 04, 2012

Relational Mapping with MongoDB, Ming, and Python

Continuing on in my series on MongoDB and Python, this article delves into the object-document mapper (ODM) included with the Python MongoDB toolkit Ming. If you're just getting started with MongoDB, or with Ming, you might want to read the previous articles in the series first:

And now that you're all caught up, let's take a look at what makes up an object document mapper, anyway...