Skip to content

Add util for bulk server->uids push? #421

@ptaoussanis

Description

@ptaoussanis

Currently the recommended way of broadcasting an event to multiple uids is something like this:

(doseq [uid all-uids] (chsk-send! uid [:my-app/ev {:payload some-data}]))

An inefficiency in this case is that the event message will be repeatedly serialized - once for each uid.

Instead, we could easily add a simple util that:

  • Takes a coll of uids
  • Uses the active packer only once
  • Sends the packed string to all uids

This would be a substitute for [#276].

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions