Subscription Connections
Most database Connections use polling to regularly fetch data on a user specified timer. Alternatively you can create a subscription. This means the data source will push updates rather than polling. It can be more efficient for frequently updating data.
Currently to create a subscription you should:
- Create a "Kdb Streaming" connection type.
- Specify that connection as a source and set the query. e.g.
.u.sub[`tblname;::]
Behind the scenes, for every unique subscription including query the server will:
- Open a connection to the streaming data source.
- Send the subscription query.
- Await incoming data and forward results to the dashboard. For kdb the result format is expected to be (`.u.upd;`tableName;tableData).
- Keep the connection open until the dashboard is closed.
Basic example kdb code to create a subscription:
Kdb+ Subscription Tutorial
b