Skip to content

Proposed Feature: Batch join and leave #2466

Closed
@nathanpeck

Description

@nathanpeck

Depending on the underlying adapter being used it may be much more efficient to join multiple rooms in one batch operation, rather than joining rooms one a time.

For example if you imagine a Slack like app where each user is in many channels, and each channel has its own socket.io room then on initial connection to the socket.io server you may need to do socket.join() for each channel the user is in. If the user is in many channels it would be much more efficient if it was possible to do a batch join operation like socket.join(['roomOne', 'roomTwo', 'roomThree']).

This would be well suited for the redis adapter for example, as the redis SUBSCRIBE operation supports multiple channels in one op.

Thoughts? Does anyone else like/need this feature?

I could easily create my own private fork with this simple feature for my own personal usage, but wanted to see if there was more general interest in adding such a feature to the mainline.

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