Browse files

Update Tornado and Twisted recommendations

  • Loading branch information...
1 parent 59f30ba commit bd575142e20596a71e8f3a6cbb2596685485cbb1 @ajdavis ajdavis committed with behackett Mar 23, 2013
Showing with 6 additions and 35 deletions.
  1. +6 −32 doc/faq.rst
  2. +0 −3 doc/tools.rst
@@ -38,41 +38,15 @@ Starting with version 2.2 PyMongo supports Python 3.x where x >= 1. See the
Does PyMongo support asynchronous frameworks like Gevent, Tornado, or Twisted?
-The only async framework that PyMongo fully supports is `Gevent
-Currently there is no great way to use PyMongo in conjunction with `Tornado
-<>`_ or `Twisted <>`_.
-PyMongo provides built-in connection pooling, so some of the benefits of those
-frameworks can be achieved just by writing multi-threaded code that shares a
+PyMongo fully supports :doc:`Gevent <examples/gevent>`.
-There are asynchronous MongoDB drivers in Python: `Motor for Tornado
-<>`_ and `TxMongo for Twisted
-<>`_. Compared to PyMongo,
-however, these projects are less stable, lack features, and are less actively
-It is possible to use PyMongo with Tornado, if some precautions are taken to
-avoid blocking the event loop:
-- Make sure all MongoDB operations are very fast. Use the
- `MongoDB profiler <>`_
- to watch for slow queries.
+To use MongoDB with `Tornado <>`_ see the
+`Motor <>`_ project.
-- Create a single :class:`~pymongo.mongo_client.MongoClient` instance for your
- application in your startup code, before starting the IOLoop.
-- Configure the :class:`~pymongo.mongo_client.MongoClient` with a short
- ``socketTimeoutMS`` so slow operations result in a
- :class:`~pymongo.errors.TimeoutError`, rather than blocking the loop and
- preventing your application from responding to other requests.
-- Start up extra Tornado processes. Tornado is typically deployed with one
- process per CPU core, proxied behind a load-balancer such as
- `Nginx <>`_ or `HAProxy <>`_;
- when using Tornado with a blocking driver like PyMongo it's recommended you
- start two or three processes per core instead of one.
+For `Twisted <>`_, see `TxMongo
+<>`_. Compared to PyMongo,
+TxMongo is less stable, lack features, and is less actively maintained.
What does *OperationFailure* cursor id not valid at server mean?
@@ -113,9 +113,6 @@ These are alternatives to PyMongo.
* `Motor <>`_ is a full-featured, non-blocking
MongoDB driver for Python Tornado applications.
-* `asyncmongo <>`_ is an asynchronous library
- for accessing mongo which is built on the Tornado IOLoop, but doesn't support
- to replica sets.
* `TxMongo <>`_ is an
asynchronous Python driver for MongoDB, although it is not currently
recommended for production use.

0 comments on commit bd57514

Please sign in to comment.