Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ioredis(redis-client lib) #120

Closed
admirkadriu opened this issue Feb 2, 2018 · 8 comments
Closed

Support for ioredis(redis-client lib) #120

admirkadriu opened this issue Feb 2, 2018 · 8 comments

Comments

@admirkadriu
Copy link

Does nohm support ioredis?

@maritz
Copy link
Owner

maritz commented Feb 4, 2018

I haven't tested it myself. From a quick glance at the README of ioredis, it looks compatible.

If you want, you could clone the repo, change the tests to use ioredis instead of node_redis and then run the tests. That should give you a good idea, on whether it works or not.

@admirkadriu
Copy link
Author

Hi @maritz, thank you for the response.

I tested with ioredis. It works in a way, meaning that the keys are set in db, but there are some errors e.g. it considers that the client is not connected because different APIs for connection status checking.

@sam2x
Copy link
Collaborator

sam2x commented Mar 21, 2018

It may be great if we can in proper way figureout the list of incompatible/missing API of ioredis. 1 year ago I made it somehow works for some tests. Afaik it was missing some specific API that I was using (stream, multi, etc.). I didnt continue with it...

@maritz
Copy link
Owner

maritz commented Mar 21, 2018

A compatibility layer could be implemented, to abstract away the differences.

Is there any specific reason you'd prefer nohm using ioredis?
You can still use ioredis for every other part of your app and just include node-redis for the nohm initialization.

@sam2x
Copy link
Collaborator

sam2x commented Mar 22, 2018

They claim to be performance-focused and full-featured. It would be interesting to see benchmark of thunk-redis vs node_redis vs ioredis with the differents redis commands/features.

  • noderedis - a node.js redis client
  • ioredis : A robust, performance-focused and full-featured Redis client for Node.js.
  • Thunk redis : The fastest thunk/promise-based redis client, support all redis features.

This benchmark is interesting but a bit old (not using last version of these 3 projects) : thunks/thunk-redis#12
Also a more recent benchmark of node_redis vs ioredis : https://github.com/poppinlp/node_redis-vs-ioredis.

I feel like node_redis was developped as a first project with the goal to focus on "compatibility". And now we have ioredis and thunk-redis who has been focusing of providing same set of feature but in an optimized way. These two projects has reached some interesting maturity.

Imho It would be regrettable to not integrate them.

@maritz
Copy link
Owner

maritz commented Mar 22, 2018

Certainly worth investigating.

I'd also really be interested if anyone has any real-world metrics of a case where nohm was slowing down an application. I haven't gotten to that scale with any of my personal projects yet, so I don't have any clue how important performance improvements could be.

@maritz
Copy link
Owner

maritz commented Jun 9, 2018

Alright, cluster/sentinel support is a pretty big reason to make nohm ioredis compatible.

@maritz
Copy link
Owner

maritz commented Sep 7, 2018

Published in v2.2.0.

Cluster/Sentinel has not been tested yet, so if anyone wants to test it and runs into problems, please create another issue.

Also note that performance appears to be worse with ioredis.

@maritz maritz closed this as completed Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants