[Twisted-Python] txmongo vs. pymongo + callInThread
Jonathan Vanasco
twisted-python at 2xlp.com
Thu Oct 8 11:23:41 MDT 2015
On Oct 8, 2015, at 6:19 AM, bret curtis wrote:
> We're not sure about what OP has done, but if there is ever anything lacking in TxMongo... please open an issue/ticket with us over at:
> https://github.com/twisted/txmongo
Thanks for the reply! I actually did open a few lowball tickets on TxMongo yesterday -- the package doesn't specify the minimum required versions for mongo or twisted.
I did some tests yesterday on PyMongo, and it seems like using it in deferToThread is safe. I also ran some simulations on staging under a heavy load; no exceptions, everything passes, data is stored correctly. The current pymongo "client" appears to be a threadsafe connection pool, and I can just grab a connection from it when needed in a thread. Woo Hoo!
If the next version of this tool stays in Python, we'll definitely need to use TxMongo. In the current design, we're already deferred to a thread and would have to restructure too much to use TxMongo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20151008/70ae2ee0/attachment-0002.html>
More information about the Twisted-Python
mailing list