Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch messages sent to subscribers #301

Open
AntonOfTheWoods opened this issue Oct 5, 2022 · 1 comment
Open

Batch messages sent to subscribers #301

AntonOfTheWoods opened this issue Oct 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@AntonOfTheWoods
Copy link

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.

@AntonOfTheWoods AntonOfTheWoods added the enhancement New feature or request label Oct 5, 2022
@chasers chasers changed the title Bulk inserts/updates sent to subscribers Batch messages sent to subscribers Dec 14, 2022
@chasers
Copy link
Contributor

chasers commented Dec 14, 2022

@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
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants