[pypy-dev] Redis «clone» using pypy stm-thread-2 (Was: Redis clone)

Amirouche Boubekki amirouche.boubekki at gmail.com
Fri Apr 12 13:42:04 CEST 2013


Hi ARmin

2013/4/12 Armin Rigo <arigo at tunes.org>

> Hi Amirouche,
>
> On Wed, Apr 10, 2013 at 5:03 PM, Amirouche Boubekki
> <amirouche.boubekki at gmail.com> wrote:
> >> I'm working on porting a redis clone to pypy-stm [1].
>
> Great, thanks for the effort!
>
> Looking at the source code, what you're doing is adding thread support
> to the Python version of a Redis-like clone.  You do this based on
> "with atomic" instead of acquiring and releasing some locks.  Am I
> correct?
>

Yes. Plus the fact that with pypy-stm threads are taking advantage of
several cores/CPU.

That said, old version of Memo is monothread because I was thinking that
there is no use of being multithread if the processing can't happen in
parallel because of the GIL. Redis is monothread and use an eventloop
which, I think, only improves the number of connection it can accept and
also probably help implement publish/subscribe. There is no
publish/subscribe in Memo yet.


>
> A bientôt,
>
> Armin.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130412/2a4f06f1/attachment.html>


More information about the pypy-dev mailing list