Query as a subscription. The substrate is the stream.
One HTTP GET, an SSE stream of every write that matches your prefix, the moment it lands. WAL-native - not Kafka-on-the-side.
Every write puts an event on the stream by construction. No separate CDC pipeline, no Debezium, no replication lag.
Subscribe to `customers/` and see every customer write. Server-side filtering - your client doesn't see other shapes.
Client disconnect releases the slot the same tick. No leaked subscriptions, no zombies, no operator pages at 3am.
Five boxes become one HTTP request.
Traditionally you would assemble Postgres + Debezium + Kafka + a stream processor + a sink to react to data changes. Here you make one request. The database is the stream.
curl -N \
-H 'Authorization: Bearer ...' \
'https://<tenant>.db.originchain.ai/v1/tenants/:t/watch?prefix=customers/' data: {"op":"put","schema":"customers","row":{...}}
data: {"op":"put","schema":"customers","row":{...}}
data: {"op":"delete","schema":"customers","key":"c_42"}
data: {"op":"put","schema":"customers","row":{...}}
…
Per-tenant concurrent-subscriptions cap, sized by tier (Tier 1 / Tier 2 / Tier 3 / Enterprise).
Breach returns a structured 429 with in_flight,
cap, and tier_name
in the body - your client can back off, not retry-bomb.
- this sprintPredicate-filtered watches. Highest pull from early users.
watch where balance > 1000. - under designAggregate watches. Subscribe to a rolling-window
COUNT(*). - under designMulti-prefix subscriptions.