News for hackers. Stuff that matters.
Re:Convex vs. Firebase by james_cowling on Wednesday June 22, 2022 @01:03AM (#31832238)
I'm not sure what your definition of smart polling is but there is no polling going on here - the query only reruns when the data dependencies change server-side due to a subsequent mutation.

Another key distinction is that "query" here doesn't refer to a database read, it could be a complex function containing multiple reads, relatively-arbitrary compute, etc.

Re:Convex vs. Firebase by jitl on Wednesday June 22, 2022 @09:14AM (#31835620)
how does your query invalidation work internally?
Re:Convex vs. Firebase by james_cowling on Wednesday June 22, 2022 @10:36AM (#31836545)
We track the readset for any active subscription. When a new write transaction commits we compare the writeset for the transaction against any active subscriptions. If there's an intersection then it's likely that query will have been invalidated, so we rerun it.

I talk more about how we perform this comparison in this (now rather outdated) talk: https://youtu.be/iizcidmSwJ4?t=1218

Note that there are false-positives here, i.e., it's possible for the inputs to a query function to change without the outputs actually changing, but this is not a significant issue in practice.

Re:Convex vs. Firebase by pyinstallwoes on Wednesday June 22, 2022 @04:13AM (#31833287)
In the end everything is a kernel poll. Haha
Re:Convex vs. Firebase by jamwt on Wednesday June 22, 2022 @11:04AM (#31836953)
Yep and every lock is a spinlock. ;-)