Skip to content

Native sync

The native examples show the current sync shape.

example/barq_multitenant_e2e opens synced databases for tenants and devices.

The example proves:

  • writes sync within the same tenant
  • data does not leak between tenants
  • tenant data is namespaced on disk
  • server files can be encrypted per tenant

example/barq_flexible_sync_e2e uses a shared server file per tenant and query subscriptions.

The example uses:

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

That means users can read and write only their own orders, while everyone can read the catalog.