@@ -38,41 +38,15 @@ Starting with version 2.2 PyMongo supports Python 3.x where x >= 1. See the
3838
3939Does PyMongo support asynchronous frameworks like Gevent, Tornado, or Twisted?
4040------------------------------------------------------------------------------
41- The only async framework that PyMongo fully supports is `Gevent
42- <http://www.gevent.org/> `_.
4341
44- Currently there is no great way to use PyMongo in conjunction with `Tornado
45- <http://www.tornadoweb.org/> `_ or `Twisted <http://twistedmatrix.com/ >`_.
46- PyMongo provides built-in connection pooling, so some of the benefits of those
47- frameworks can be achieved just by writing multi-threaded code that shares a
48- :class: `~pymongo.mongo_client.MongoClient `.
42+ PyMongo fully supports :doc: `Gevent <examples/gevent >`.
4943
50- There are asynchronous MongoDB drivers in Python: `Motor for Tornado
51- <https://github.com/mongodb/motor> `_ and `TxMongo for Twisted
52- <http://github.com/fiorix/mongo-async-python-driver> `_. Compared to PyMongo,
53- however, these projects are less stable, lack features, and are less actively
54- maintained.
55-
56- It is possible to use PyMongo with Tornado, if some precautions are taken to
57- avoid blocking the event loop:
58-
59- - Make sure all MongoDB operations are very fast. Use the
60- `MongoDB profiler <http://www.mongodb.org/display/DOCS/Database+Profiler >`_
61- to watch for slow queries.
44+ To use MongoDB with `Tornado <http://www.tornadoweb.org/ >`_ see the
45+ `Motor <https://github.com/mongodb/motor >`_ project.
6246
63- - Create a single :class: `~pymongo.mongo_client.MongoClient ` instance for your
64- application in your startup code, before starting the IOLoop.
65-
66- - Configure the :class: `~pymongo.mongo_client.MongoClient ` with a short
67- ``socketTimeoutMS `` so slow operations result in a
68- :class: `~pymongo.errors.TimeoutError `, rather than blocking the loop and
69- preventing your application from responding to other requests.
70-
71- - Start up extra Tornado processes. Tornado is typically deployed with one
72- process per CPU core, proxied behind a load-balancer such as
73- `Nginx <http://wiki.nginx.org/Main >`_ or `HAProxy <http://haproxy.1wt.eu/ >`_;
74- when using Tornado with a blocking driver like PyMongo it's recommended you
75- start two or three processes per core instead of one.
47+ For `Twisted <http://twistedmatrix.com/ >`_, see `TxMongo
48+ <http://github.com/fiorix/mongo-async-python-driver> `_. Compared to PyMongo,
49+ TxMongo is less stable, lack features, and is less actively maintained.
7650
7751What does *OperationFailure * cursor id not valid at server mean?
7852----------------------------------------------------------------
0 commit comments