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

Adding Redis Strategy #1

Merged
merged 4 commits into from
Feb 18, 2017
Merged

Adding Redis Strategy #1

merged 4 commits into from
Feb 18, 2017

Conversation

nhocki
Copy link
Owner

@nhocki nhocki commented Feb 18, 2017

This strategy uses Redis PUB/SUB to communicate messages to subscribers in different servers. The idea is to connect multiple Basic strategies with Redis pub/sub.

When a new message is published, the server that receives the request will forward it to all other servers with Redis. When each server gets the message, they will Publish it to the clients they have connected (the ones in their own basic strategy).

This package lets you create a new connection (or pubsub connection)
from a `redis.Config`.

The `ConfigFromEnv` will create a config from ENV variables:

    * REDIS_URL: The server address. With port and Auth.
This strategy uses Redis PUB/SUB to communicate messages to subscribers
in different servers. The idea is to connect multiple `Basic` strategies
with Redis pub/sub.

When a new message is published, the server that receives the request
will forward it to all other servers with Redis. When each server gets
the message, they will `Publish` it to the clients they have connected
(the ones in their own basic strategy).
@nhocki nhocki merged commit 134f507 into master Feb 18, 2017
@nhocki nhocki deleted the redis-strategy branch February 18, 2017 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant