Skip to content

Flexible Sync

Flexible Sync lets clients subscribe to queries instead of opening one partition file.

In Barq’s current server, rules are passed as CLI flags.

Terminal window
barq-server-dbg \
--root-dir ./barq-sync-data \
--jwt-public-key ./public.pem \
--enable-flx
Terminal window
--flx-owner-rule Order:owner_id

This allows a user to read and write rows where owner_id equals the token identity.

Terminal window
--flx-public-readonly-rule Catalog

This allows all users to read Catalog. Only admin can write it.

The flexible sync end-to-end example runs with:

--enable-flx --flx-owner-rule Order:owner_id --flx-public-readonly-rule Catalog