Thanks, the "Top Comments" is sourced from the "kids" field of the "items" endpoint. As the API docs (https://github.com/HackerNews/API?tab=readme-ov-file#items) says, it is "in ranked display order" so I just used it to sort the top comments.
Yah that makes sense and after looking I could not find the API call that pre sorted each thread (it must not have been native algolia or firebase) - and without that the way you are doing it sure beats recursively reconstructing the thread. All the best and I look forward watching any features you add in the future!
yes, the keywords search is using full-text searching and it is not efficient so I hardcoded them. Will consider switch to use embedding, that will be more efficient and accurate, also can support custom keywords search. Thanks for your advice.
Yeah, this was the approach I was imagining before someone mentioned Materialized View (proper).
Once I heard those words mentioned, I began to imagine what sort of interaction with a foreign data source's operations log FDW might have.
Of course, and depending on the foreign data source, you could probably even expose an operations log to Postgres via a FDW by defining it as a foreign table... Effectively opening up the possibility of eventually consistent replication. Lots of data stores' operations logs are accessible data collections/tables anyways.
| At the end of the day, are these just FDWs that run on top of any Postgres instance?
Yes, the FDWs developed by Wrappers can be used on any Postgres db.
| Do I have to run Supabase to take advantage of the FDWs created through this framework?
No, you don't need to. Those are just normal FDWs can be used on any Postgres db.
| Is there a generic JDBC/SQL/etc FDW for any SQL based database like Snowflake, Oracle, etc?
The Snowflake FDW isn't developed yet, the example is just for concept demo. It has ClickHouse and BigQuery FDWs although they are not JDBC based. Generic JDBC FDW will need JVM embedded so it is not in plan at this moment.
I looked into using a postgres FDW years ago when I was trying to come up with an easy way to ELT data out of Mongo into a DB. Effectively using Postgres as the ETL tool. Understanding where to find FDWs, who maintains them, etc... was overwhelming. I can see the merits of this framework that you're building, and def going to keep an eye on it.
Also always excited to hear about Rust being used.