Message from discussion
Return distinct keys from MongoDB using asyncmongo
Received: by 10.180.84.74 with SMTP id w10mr2209029wiy.4.1348589410186;
Tue, 25 Sep 2012 09:10:10 -0700 (PDT)
X-BeenThere: python-tornado@googlegroups.com
Received: by 10.216.144.74 with SMTP id m52ls658876wej.6.gmail; Tue, 25 Sep
2012 09:10:00 -0700 (PDT)
Received: by 10.180.91.231 with SMTP id ch7mr3447280wib.1.1348589400872;
Tue, 25 Sep 2012 09:10:00 -0700 (PDT)
Received: by 10.180.91.231 with SMTP id ch7mr3447279wib.1.1348589400861;
Tue, 25 Sep 2012 09:10:00 -0700 (PDT)
Return-Path: <ajesseda...@gmail.com>
Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177])
by gmr-mx.google.com with ESMTPS id k11si1629620wiv.0.2012.09.25.09.10.00
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 25 Sep 2012 09:10:00 -0700 (PDT)
Received-SPF: pass (google.com: domain of ajesseda...@gmail.com designates 74.125.82.177 as permitted sender) client-ip=74.125.82.177;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ajesseda...@gmail.com designates 74.125.82.177 as permitted sender) smtp.mail=ajesseda...@gmail.com; dkim=pass header...@gmail.com
Received: by weyu50 with SMTP id u50so915852wey.22
for <python-tornado@googlegroups.com>; Tue, 25 Sep 2012 09:10:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:sender:in-reply-to:references:from:date
:x-google-sender-auth:message-id:subject:to:content-type;
bh=hkl97vrGz2RRiXbpUamgodCTlCE3ZGLSX7uSrkLWAo0=;
b=EX1oiSLrhXkCecjkG4hndSwCmoa/W8xz7GqVWINSUmlRdAToEdfwp35vUSq1l5m78k
hTWHrRbNg+pypfrCFnEs2UpCyFJJ0oaqQK/H7BrnfCQXay5cdMAy6tAxJ7QL+bXeVK7n
UQMrd5NWY1QKGOZNhEthpIi54C+f4IKQ5wRNhGhmATPi6GKczJ17ag27nQq2Yetwjrkm
rNwajijCTWs8chMvStDrBWPTgPLROxAckxxixhLa8G0kuGVuHibX6WxjXRa/d3PJTOjH
HkZ/iVNVJ62NsOx4RggPNwRusYms3DmhILY+NhihkNs8WnPET7W1G+ghSrXF6ZaBSB6e
WIqA==
Received: by 10.180.101.166 with SMTP id fh6mr19278497wib.12.1348589400375;
Tue, 25 Sep 2012 09:10:00 -0700 (PDT)
MIME-Version: 1.0
Sender: ajesseda...@gmail.com
Received: by 10.180.3.131 with HTTP; Tue, 25 Sep 2012 09:09:20 -0700 (PDT)
In-Reply-To: <CAJZrG8jYXaXs53rwEpVLF5x+P2vanYPUFOYserr1zyC-H2a...@mail.gmail.com>
References: <b612634f-f5ce-41a5-ab8a-fd34e29af583@googlegroups.com>
<df8b1a92-758d-4be0-9991-9fb2f14ee...@k6g2000vbr.googlegroups.com>
<fc7f906c-c335-46ce-85d8-7c8f6642a462@googlegroups.com> <cd794fcd-30fd-4556-99c8-4adf650fa...@b8g2000yqh.googlegroups.com>
<CAKX=FT9UCJ3HhsGn8m8dGJQ4qr-6EnC4==eGmferMFbPw5b...@mail.gmail.com>
<29fd7d3e-7f75-4d55-a8ee-0c1ac6923...@c9g2000vbv.googlegroups.com>
<13e9ab35-6444-4161-9a96-c4a3b3b74507@googlegroups.com> <d3995b60-5aff-49d8-b92a-5296b7c131c2@googlegroups.com>
<CAJZrG8jYXaXs53rwEpVLF5x+P2vanYPUFOYserr1zyC-H2a...@mail.gmail.com>
From: A Jesse Jiryu Davis <ajda...@cs.oberlin.edu>
Date: Tue, 25 Sep 2012 12:09:20 -0400
Message-ID: <CAGhKNcT3vAd1mNRbfBLiuV8HUr6oVdJXm=RWCAUjq-xB_ub...@mail.gmail.com>
Subject: Re: [tornado] Re: Return distinct keys from MongoDB using asyncmongo
To: python-tornado@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
Gevent is great, I can't dispute that, and PyMongo already works well
with Gevent. The point of Motor is if you have some prior reason to
use Tornado instead of Gevent, e.g. you've built a Tornado application
already and you want to add MongoDB to your stack, or you depend on a
library that works with Tornado but not Gevent, or you have reason to
believe Tornado will perform better than Gevent for your application.
1. I'm unclear exactly the status of PyPy's JIT and greenlets. I know
PyPy's greenlets work -- I've tested Motor with PyPy. This bug
suggests some disabling of the JIT, but does it mean the JIT is
useless or only somewhat hampered?: https://bugs.pypy.org/issue895
2. What about CPython's greenlets is "scary"? Have you seen any issues
with them?
On Tue, Sep 25, 2012 at 11:43 AM, Serge S. Koval <serge.ko...@gmail.com> wrote:
> Biggest problem I see with Motor - it uses greenlets.
>
> If you can use greenlets, why not use gevent instead of Tornado and write
> all code without thinking about callbacks?
>
> Why it matters:
> 1. Compatibility. Greenlets won't work in PyPy. Well, they will, but PyPy
> will disable JIT for code which uses them.
> 2. Greenlet implementation in CPython is scary. They're great when they work
> though.
>
> Too bad that "pure" AsyncMongo is falling behind in terms of features..
>
> Serge.
>