FakeRedis as a base for an SQL-db backed Redis Replacement? #126
gabriels1234
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
I think you are looking for the pq package. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Looking for something similar: I would like to expose certain data to redis clients using a custom backend. fakeredis-py/fakeredis/_helpers.py Line 129 in d9db2d4 fakeredis._commands.Item objects, so it can't easily used as the abstraction layer for implementing a custom backend.
I will look into this more, but asking anyways: is there a point in the code where the in-memory dict database could be easily swapped out by something, which offers CRUD-like operations (coupled with expiration handling)? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to gather thoughts on this Idea: use fakeredis as a base to make a DB powered version compatible with redis.
(cc/ @cunla )
Motivation: Databases are quite fast. Many projects don't actually need Redis (For cache).
Also, Redis is the preferred (only!) backend for RQ (where R stands for Redis!). But Database Speed is more than enough for most rq use-cases. Also, there are unaddressed concerns about robustness/reliability of RQ (a.k.a lost jobs) that made developers move away from RQ. This should be solved but the Atomic-style of Transactional Databases.
Last but not least: You can get practically the same results with webserver+DB( Postgres!) ($x2) than webserver+DB+Redis ($x3). I believe we should allow the small guy to play in the same league at a fraction of the price, whenever possible.
Is it something worth pursuing? is FakeRedis the perfect match for this project? How to achieve it, by forking the repo or by augmenting FakeRedis to support a DB Backend? I'm sure this will become the new default for RQ setups.
Beta Was this translation helpful? Give feedback.
All reactions