Live data from Hacker News

Apache AGE, a PostgreSQL extension with graph database functionality

github.com

41–50 of 77 posts

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#41

Earlier quoted context omitted.

Did you try dgraph? For our use cases it won over neo4j. Didn’t try redisgraph.

We benchmarked all 3; redisgraph was fastest by far.

Ok, but on what metrics? I don't mean I disbelieve, I would just like to know that it was fastest on the things I might care about.

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#42
post #40

This is a great project, but last time I checked it was lacking a lot of CYPHER features and wasn’t moving very fast forward. But I’m hoping it will catch up to the point it will become useful.

Cypher as in the Neo4J query language?

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#43
post #19

Interesting. What are some good extensions for pg? I have only used UUID and postgis.

> I have only used UUID and postgis.

If you used "uuid-ossp" to get uuid_generate_v4(), then this is no longer necessary since Postgres 13 as there is now a built-in gen_random_uuid()

https://www.postgresql.org/docs/current/functions-uuid.html

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#44

Earlier quoted context omitted.

We benchmarked all 3; redisgraph was fastest by far.

Ok, but on what metrics? I don't mean I disbelieve, I would just like to know that it was fastest on the things I might care about.

it's an in-memory graph, I'd kind of expect it to be faster than the others

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#45

Earlier quoted context omitted.

Did you try dgraph? For our use cases it won over neo4j. Didn’t try redisgraph.

We benchmarked all 3; redisgraph was fastest by far.

Thanks, will try it soon.

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#46

Earlier quoted context omitted.

Did you try dgraph? For our use cases it won over neo4j. Didn’t try redisgraph.

We benchmarked all 3; redisgraph was fastest by far.

Downside is it's harder to keep all data in memory and Redis has less sophisticated query facilities. Not sure how AGE stacks up in that regard, especially interesting would be joining graph data and non-graph data.

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#47
post #39
post #30

This is written in C. I wonder how common it is to write PG extensions in safer langugaes and what would be the most suitable. I'm somewhat wary of using nontrivial C extensions, having seen so many of them sometimes seg fault the backend (eg PostGIS). There seem to be PG backend crashes described in this projects issues as well.

PG has a special memory manage rule, named MemoryContext. All memory allocated in a context will disappear when it leaves that context. this means that you can safely not free memory, or your memory will be freed in unexpected places. this is a big conflict with the way rust manages memory. write extension in rust won't improve it much. And in PG, there is a special method to create a process, creating threads is not…

> creating threads is not possible because the logging system makes heavy use of setjmp().

Naive question from a non-c user, setjmp/longjmp just manipulate the stack and since each thread has its own execution stack, that should be completely safe ISTM - so why is it unsafe/impossible? I'm missing something.

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#49

"Apache AGE is currently being developed for the PostgreSQL 12 release" Well sorry, we have PostgreSQL 15 already.

and I believe the more recent the version is, the less stable it is. Sure there will be additional nice features, but older versions are still in progress. And yeah, if you kept reading, AGE sounds like it will support more versions in the future.

Re: Apache AGE, a PostgreSQL extension with graph database functionality

#50
post #48

I create a DAG using recursive sql. I assume that saving data in a graph and querying the graph with a native graph language would be faster. Has anyone benchmarked performance differences between the two?

Depends on the use case. Recursive SQL can be good enough, maybe even faster, for certain use cases. The problem isn't so much the query language but the indexing. Graph engines index the nodes and edges in a particular way so that traversal is fast.

Most examples of Recursive SQL I've seen will only involve nodes on exactly one Table an with exactly one kind of a relationship/edge (for example a tree with "parent" edges). Graph DBs allow you to relate multiple different types of nodes using multiple kinds of edges. The edges can have queryable attributes like an intermediary table in a many-to-many relationship. And all of that is still indexed efficiently.

Post reply on HN