Do reactive searches recalculate across all active user sessions?

I have a question about how reactive searches work in Bubble.

Suppose I have an application with 50 users connected simultaneously. Each user has a Repeating Group whose data source is a Search for with constraints that limit the results to the records that user can see.

For example:

Search for Orders

  • Constraint: Derivante = Current User
  • Constraint: Status = Pending

Now suppose an administrator creates or modifies an Order.

Does Bubble re-evaluate the reactive searches in all active sessions, even if the change does not belong to the user of those sessions?

For example:

  • User A modifies an Order.
  • There are 49 other users connected.
  • Each user has a reactive Search for Orders on their page.
  • Each search has constraints limiting the results to that user’s own orders.

Does Bubble still re-evaluate all 49 reactive searches?

And, if so:

  1. Does each of these re-evaluations generate WU consumption?
  2. Are Search for constraints applied server-side before the search is performed?
  3. Can Privacy Rules prevent Bubble from re-evaluating a search when the modified record does not belong to that user?
  4. Is there a way to make a reactive search update only when a change can actually affect that user’s results?
  5. Can the number of simultaneously connected users significantly multiply WU consumption when they have reactive searches on the same data type?

I am trying to understand an increase in WU consumption in an application where multiple users have the same page open simultaneously, and changes made by one user seem to trigger activity in the other users’ sessions.

Can someone confirm exactly how Bubble handles this internally?

Search operators set as Data sources will listen for changes to their results. So all clients will react to updates to the Search.

All data sources set to a scalar datatype are also reactive.

Only if the results would be different

If you have a search for Invoices where User = current user then an update to the Invoices table that adds a new user won’t refresh that user’s search, but a record that does match that constraint will.

I believe it’s managed by a reversed search (see ‘percolator’ if you want to read more about how it works)

So the client subscribes to the query, and Bubble’s websocket notifier will notify when the result set changes