Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't "subscribe to all state-changes like the result of a query" something you'd implement efficiently using a forward chaining inference engine, like something based on Rete?


I don't know too much about database systems, but if we were in an inference (e.g., production) system, then that would make a lot of sense! I build logical inference systems and have implemented this kind of functionality in forward, backward, and bi-directional logical inference.


It is implemented with something called QueryChangeDetection here. https://rxdb.info/query-change-detection.html

This is based on meteors oplog-observe-driver https://github.com/meteor/docs/blob/version-NEXT/long-form/o...

So basically when a change-event comes, RxDB does not run the query against the database again, but instead uses the old results together with the event to calculate the new results.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: