> we’ve currently fallen back to interval based polling to refetch queries.

This fancy "subscribe to events when the results of this query change" system boils down to just polling the database...

    Future work:
    Reduce load on Postgres by:
    - Mapping events to active live queries
    - Incremental computation of result set
Fake it till you make it.

Meanwhile: https://opensource.janestreet.com/incremental/

I’m not entirely sure how the library you posted is related. Because it does incremental computation? It doesn’t seem to have anything to do with Postgres. As far as I can tell it looks more like mobx.

They built other libraries on top of this [1] [2], and when compared to mobx [3] it indeed looks very similar, however I think the target ideal of having a small core on top of which one would build more complex computation is essential.

Since Clojure is pervasively built on laziness, there has been some discussions in the community about doing the same but for incremental computation. And doing it pervasively most importantly guarantees it will work at any granularity without any manual fiddling with observables and reactions.

A recent contribution to the solution field in Clojure is micro_adapton [4][5] which looks like it is to incremental computing what miniKanren is to logic programming, i.e. a tiny core for a a challenging problem.

Also, considering the literature around it it seems to be pretty tricky to do properly, especially when it comes to databases [6].

[1] https://github.com/janestreet/incr_map [2] https://github.com/janestreet/incr_select [3] https://github.com/mobxjs/mobx [4] https://github.com/aibrahim/micro_adapton [5] https://arxiv.org/abs/1609.05337 [6] https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q=incre...