Giter Club home page Giter Club logo

Comments (4)

popravich avatar popravich commented on May 10, 2024

Oh, well)

  • First of all I tried to make it simplier -- asyncio_redis implements asyncio.Protocol (lots of code) vs aioredis uses asyncio.StreamReader/StreamWriter (no protocol code; just read & send);
  • At the moment when I started aioredis asyncio-redis had no hiredis parser.
  • asyncio_redis API forces end-user to work with one type of data, ie only bytes or only unicode or etc. So you would receive an error trying to mix data types, say set('unicode_key', b'encoded_bytes_data').
  • asyncio-redis has no way to execute raw command; aioredis provides execute method so you'll be able to use new redis commands before their shortcuts/API implemented by client lib.
  • "automatic reconnections", well, in asyncio-redis if the server has gone away would reconnect, reconnect and reconnect. I mean reconnection is done as soon as connection is lost which is bad. For instance we had functional tests infrastructure where we were starting & shutting down standalone redis server instance so after all tests we had several hundreds of spamy errored 'reconnect' messages.
  • aioredis doesn't have pub/sub yet, but it is in progress and will be implemented soon.

from aioredis-py.

lc-thomas avatar lc-thomas commented on May 10, 2024

How does aioredis handle disconnections ?

I'm having trouble with asyncio-redis not closing connections.
Redis says it has reached the max number of clients. But most of them are ghosts.

Do you think aioredis is better at handling those ?

Also, does aioredis support async with ?

from aioredis-py.

autumnjolitz avatar autumnjolitz commented on May 10, 2024

@lux-lth I suggest you open a new issue - connection pool leaks sound like a bug. And on the off chance it's a misuse of the connection pool, improved documentation from the issue resolution would help others.

from aioredis-py.

popravich avatar popravich commented on May 10, 2024

Hi, @lux-lth ,

aioredis handles connections well — drops closed, opens new when needed, reuse already opened. All that is handled by aioredis.ConnetionsPool.
You should check aioredis.create_redis_pool.

Also, does aioredis support async with ?

It is supported in terms of acquiring connection from pool and releasing it back,
so that no other coroutine will use same connection (this is mostly needed if you want to send some blocking command). Is this what you asked?

from aioredis-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.