-
Notifications
You must be signed in to change notification settings - Fork 34
Add Redis plugin #1
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
Conversation
index.js
Outdated
password: config.password, | ||
tls: config.tls, | ||
//Do not try to reconnect, throw an error | ||
retry_strategy: () => undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to reconnect? If this is set to undefined and the connection is lost to the db, then no attempts to reconnect will happen until the plugin is re-initialized which is at node-red container startup. I would suggest removing this line of code unless there is a reason to not reconnect.
Here is more context regarding this issue,
I also would like to start using this. Has anyone done anything with the reconnect issue mentioned above? |
Is this usable? Is it “ratified” by the NR core team? |
No it is no "ratified". It is an unmerged pr that has been waiting to be reviewed for a long time. Anyone using it does so at their own risk without any support from the core team. We still really want to move forwards with this, but it has fallen down the to-do list and not had the attention it needs. |
Updated Redis plugin. The following has been changed.
|
@knolleary |
@KazuhiroItoh I'm happy to merge this as-is without doing an in depth review at this time. I think there will be some follow-up actions to take we can handle via individual issues and PRs. Thanks for your work (and thanks to @HirokiUchikawa for doing the original work so long ago!) |
The README.md still says "This is a work in progress." . Is it still so? |
Thank you for your advice. |
This makes it possible to store context data to Redis.
The design note is https://github.com/node-red/node-red/wiki/Design%3A-Persistable-Context#redis-plugin.
Install prototype
I would appreciate if you could give me feedback on design, codes, following concerns, etc.
Concerns
How to clean unnecessary context ?
clean
function detects and removes unnecessary contexts based onactiveNodes
argument and data in the store.But when there are some data stored by others in the store, the plugin cannot determine if the data is not used.
Options:
Clean the data without caring others.
The plugin cleans the data according to its
activeNodes
only. But others data are also deleted.memory
andlocalfilesystem
do this because their store are not shared with others.clean
function receivesdeactiveNodes
list instead ofactiveNodes
.The plugin can know what is not used according to it, but we have to change codes. e.g. other plugin
clean
.Don't clean.
User has to clean manually if needed.
This prototype does not clean the data.