Skip to content

Batch messages sent to subscribers #301

Open

Description

@AntonOfTheWoods

Feature request

In order to allow for efficient updates to subscribers when hundreds/thousands of db rows are inserted/updated, it would be preferable to have subscriptions capable of being fed with bulk updates, rather than a separate message for each row inserted/changed.

Is your feature request related to a problem? Please describe.

I have a bulk import feature and the changed entries need to be pushed to all devices in real time. The entries would be stored locally (via rxdb) and need to be kept in sync.

Describe the solution you'd like

The push messages for the subscriptions should be able to contain all the rows affected from a single insert/upsert/update/delete transaction.

Describe alternatives you've considered

Create a "bulk_updated" table that could receive updates with a table name, which would then cause the local store to disconnect for that particular table, download the full diff, then reconnect for realtime (single row) updates again.

Activity

  1. added
    enhancement
    on Oct 5, 2022
  2. changed the title [-]Bulk inserts/updates sent to subscribers[/-] [+]Batch messages sent to subscribers[/+] on Dec 14, 2022
  3. chasers commented on Dec 14, 2022

    @chasers
    Contributor

    @AntonOfTheWoods thanks for this!

    I think the workaround here would actually work very well.

    But it would definitely be nice for Realtime to automatically batch stuff for you when needed. I updated the title to reflect this a bit better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions