3 ms·
Show HN: Building a JavaScript Recommendation Engine with Graph Theory
- tayo42 11y agoAny reason you why you wouldn't store edges in a database? Seems like they don't ever change and your constantly recalculating them?
- keithwhor 11y agoIn our case, they're already in a database. You can generate them from a simple query. (But there are a ton of rows in some tables. You don't want to query from a SQL database for every graph transaction.) You can save your graph to hard drive, which will save all nodes and edges, but it just represents a cached version of your live data. Process goes SQL -> Graph (RAM) <-> Cache (Storage). Cache is for if / when the server reboots, so you can load the Graph quickly without hitting your DB again, SQL -> Graph happens on timed intervals.