Add support for real-time/subscriptions
T
Tudor Golubenco
Support BaaS-like real-time subscriptions. This depends on having security rules and the ability to call Xata from the browser, so https://feedback.xata.io/feature-requests/p/row-level-security is related.
Neel Gupta
Realtime Database feedback is a very useful feature !
...would upgrade Xata DB offering to the next level.
Gustavo
I believe there's a way to implement it without worrying about security rules.
When a query happens server-side, Xata would return a temporary endpoint created specifically to keep listening to that query.
So suppose your query is
GET https://acme.us-east1.xata.sh/db/main/tables/users/data/1
. The response would be:{
id: '1',
name: 'John',
...
xata: {
version: 1,
subscriptionURL: 'https://acme.us-east1.xata.sh/db/main/tables/users/subscription/lnjBdIweVmLKU1CTPD2LKnmeg68pTlV8'
...
}
}
So the URL would not be guessable, it would contain a token that ensures that only who made the query knows it. You'd then pass that URL to the client and there you'd make a request to it to keep receiving updates by server-sent events directly from Xata's API.
J
Jason K Frank
Highly desired! (I'm only allowed one upvote so I thought I'd add a comment for a bit more "oomph" 😀)