Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Building a JavaScript Recommendation Engine with Graph Theory (medium.com/keithwhor)
40 points by keithwhor on Aug 10, 2015 | hide | past | favorite | 2 comments


Any reason you why you wouldn't store edges in a database? Seems like they don't ever change and your constantly recalculating them?


In 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.




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

Search: