News for hackers. Stuff that matters.
Re:Postgres as a Graph Database: (Ab)Using PgRouting by BlooIt on Friday February 28, 2025 @04:43AM (#43203685)
Checkout https://github.com/Pometry/Raphtory, it's written in Rust, embedded (the binaries are about 20mb) and you can use the Python APIs as a drop-in replacement for NetworkX. Disclaimer, I am one of the people behind it.
Re:Postgres as a Graph Database: (Ab)Using PgRouting by pjd7 on Friday February 28, 2025 @07:08AM (#43204733)
This looks super interesting.

Just starting to review it but my front of mind questions: 1) How do I handle persistence? Looks like some code is missing. 2) Do you support multi-tenancy (b2b saas graph backend for handling relations scoped to a tenant)

Thanks

Re:Postgres as a Graph Database: (Ab)Using PgRouting by BlooIt on Friday February 28, 2025 @07:45AM (#43205015)
Good questions.

1) You can persist a graph to disk. By default, this uses protobuf (`save_to_file`), however we’re migrating to Parquet in next release for better performance because we noticed loading a 100m edge graph from scratch (CSV, Pandas, or raw Parquet) is actually faster (~1M rows/sec) than from persisted proto, which isn’t ideal. There’s also a private version that uses custom memory buffers for on-disk storage, handling updates and compaction automatically.

2) You can run a Raphtory instance either as a GraphQL server or an embedded library. For the server, multiple users can query the persisted graphs, which are stored in a simple folder structure with namespaces (for different graphs). For now, access control needs to be managed externally, however it's on our roadmap!