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

Already on GitHub? Sign in to your account

Add support to use an existing Redis client connection #14

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants

NachoMan commented Mar 6, 2011

I'm connecting to a remote Redis server on another machine (e.g. not using the default localhost IP/port) and using the connect-redis plugin as-is causes things to fail since it can't connect. This change adds the ability to supply an existing client connection.

maritz commented Mar 7, 2011

Just out of curiosity: What exactly is the problem why connect-redis can't connect to the server but another client can?

NachoMan commented Mar 7, 2011

If I already have a client connection object created for my object store, why should I have to supply hostname and password credentials in multiple places? Other Node libraries appear to accept an existing client to a property setter, which means I can just create my one client object and can pass that around.

maritz commented Mar 7, 2011

Okay, so it's not so much a "cannot use it" but more a "would like to use it more comfortable". Seems good to me. :)

(The reason I'm using up to 3 seperate clients (connect sessions, model storage and other) is that I select different databases with each to keep my stuff seperated.)

NachoMan commented Mar 7, 2011

That makes sense. Largely I'd like to consolidate the creation of my database connections so that I don't have hostnames strewn throughout my code. My project hasn't gotten to the point where I need to segregate my databases (I'm sure I'll get there shortly) but having options is always nice.

Thanks.

Contributor

thomasfr commented Oct 25, 2011

oh, i just saw your pull request. Maybe this one solves your problem: visionmedia#14

Why hasn't this been merged yet? Any reason not to use a singleton connection object?

Collaborator

chirag04 commented Oct 28, 2013

as badunk said, you can pass connection object.

@chirag04 chirag04 closed this Oct 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment