Skip to content

WebSocketService could be more cluster awareย #461

@lbwexler

Description

@lbwexler

Right now, when you call the public methods on WebSocketService, it will only consider Connections managed by the current instance. But it would be potentially more useful in some cases to have WebSocketService delegate to the other servers to broadcast messages more widely.

This has come up in one client, where we want a particular instance to invalidate some client-side state and notify all connected clients in the cluster. In that case we have to do an extra bit of work to push a message to each instance, and have that instance notify

Not clear if we need a set of parallel cluster aware method (e.g pushToClusterChannels()) or just make the existing methods smart enough to pass on requests for unknown channels to the appropriate instance. In any case, it might ease the implementation to incorporate the instance id in to the channel key.

Also would be useful to be able to broadcast easily to all channels -- e.g. pushToAllChannels()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions