6

What is the difference between these two graph databases: Neo4j and AllegroGraph? Which is better for Java Web programming?

james.garriss
  • 12,959
  • 7
  • 83
  • 96
Erwin
  • 111
  • 1
  • 6

5 Answers5

8

If you have no reason to choose RDF + SPARQL (which both products support), Neo4j provides a clean Java API for manipulating a property graph (nodes + relationships + properties on both). For web applications, I wrote up an example using Spring Framework, which also exists in a simplified version as a workshop.

Disclaimer: Obviously I'm on the Neo4j team, and I don't have any in-depth knowledge regarding AllegroGraph.

nawroth
  • 4,321
  • 1
  • 24
  • 21
6

I chose AllegroGraph over Neo4j because of its support for SPARQL queries. It seemed to me that the Neo4j approach of traversing a graph is less tidy, especially for more complex retrieval operations.

...and no, I have no affiliation with either organisation.

David
  • 5,184
  • 3
  • 41
  • 67
  • 3
    Neo4j supports RDF+SPARQL as well. And BTW [Gremlin](http://github.com/tinkerpop/gremlin) too. – nawroth Oct 27 '10 at 11:37
  • 4
    It might, but not as a core function. The blankness of the home page for that component speaks volumes about the level of support. http://components.neo4j.org/neo4j-rdf-sparql/ – David Oct 27 '10 at 21:12
6

One other consideration is the licenses. AllegroGraph's free edition can be used as long as you have fewer than 50 million triples. See http://www.franz.com/agraph/allegrograph/ag_commercial_edition.lhtml

Neo4j is free as long as your project uses the community edition; only if you modify the Neo4j source you must open-source the modifications. The basic license terms can be found on their home page: http://neo4j.org/

Matt Browne
  • 12,169
  • 4
  • 59
  • 75
  • 1
    Just discovered for a project that Neo4j can be used also in closed source projects as long as you don't close source modifications to neo4j source itself (like MySQL and so on...) – Vincenzo Maggio Apr 13 '13 at 11:49
5

AllegroGraph has a java client library which supports 2 standard java semantic API's: Jena and Sesame. The client source is EPL on github. AG supports sparql, transactions, reasoning, geospatial, temporal, and graph analysis. There are no extra features specifically for web apps, but it would fit into any framework as a library.

(I work for Franz.)

Mike H
  • 100
  • 1
  • 3
1

In addition to SPARQL, AllegoGraph allows you to write Prolog rules and queries. For complex query logic, it's much more expressive than SPARQL.

There are some examples in the Java client tutorial: http://www.franz.com/agraph/support/documentation/v4/java-tutorial/java-tutorial-40.html

curtosis
  • 69
  • 4