[
https://issues.apache.org/jira/browse/GEODE-7778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17035754#comment-17035754
]
ASF subversion and git services commented on GEODE-7778:
--------------------------------------------------------
Commit d3ecaaafd7b08c667c1a7a4eb36060ea560b0347 in geode's branch
refs/heads/develop from Sarah Abbey
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=d3ecaaa ]
GEODE-7778: Add PUBLISH, SUBSCRIBE and UNSUBSCRIBE Redis commands (#4682)
Redis PUBLISH/SUBSCRIBE is described here: https://redis.io/topics/pubsub
This implementation introduces 3 new command classes to support this:
`SubscribeExecutor`, `PublishExecutor` and `UnsubscribeExecutor`. At a high
level, the flow is as follows:
- A Redis client issues a SUBSCRIBE command. The server maintains a list of
subscribed clients and associate channel(s) in the `Subscribers` class. A
subscribed `Client` uses Netty's notion of a `uniqueID` to identify itself
uniquely.
- When a client PUBLISHes a message on a channel, the publish 'event' uses an
`onMembers` function call to distribute the channel/message to all members.
Each member then publishes the message to any `Client`s registered on the
channel.
Points to note:
Redis pub/sub is not HA. i.e. A subscriber only receives those messages
published after it has successfully subscribed. If the client is disconnected
and reconnects, it will not receive messages published during the disconnect
window.
When clients subscribe, an open connection is established to the server and the
client blocks waiting for messages.
This implementation does not require messages to be published on the same
server to which the clients, executing subscribe, are connected since the
published message is distributed to all servers.
Co-authored-by: Jens Deppe <[email protected]>
Co-authored-by: Prasath Durairaj <[email protected]>
Co-authored-by: Murtuza Boxwala <[email protected]>
Co-authored-by: Sarah Abbey <[email protected]>
Co-authored-by: John Hutchison <[email protected]>
Co-authored-by: Ray Ingles <[email protected]>
> Add PUBLISH, SUBSCRIBE and UNSUBSCRIBE Redis commands
> -----------------------------------------------------
>
> Key: GEODE-7778
> URL: https://issues.apache.org/jira/browse/GEODE-7778
> Project: Geode
> Issue Type: Improvement
> Components: redis
> Reporter: Jens Deppe
> Assignee: Jens Deppe
> Priority: Major
> Time Spent: 10h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)