xyxel / RedisGraph.jl

RedisGraph Julia client
MIT License
12 stars 2 forks source link

Compatibility with Neo4j? #1

Open thibaut-d opened 4 years ago

thibaut-d commented 4 years ago

Hi,

Do you think that it could be possible to make it compatible with both Neo4j and RedisGraph?

I see that all ends into:

function query(g::Graph, q::String)
    response = Redis.execute_command(g.redis_conn, Redis.flatten(["GRAPH.QUERY", g.id, q, "--compact"]))
    return QueryResult(g, response)
end

The Neo4j driver has:

using Neo4jBolt       
driver = Neo4jBoltDriver("bolt://localhost:7687", auth=("neo4j", "password"))

session(driver) do sess
    response= run(sess, q)
end

Is it just a matter of switching connections to direct the queries on wether RedisGraph and Neo4j or is there some compatibility issues between the 2?

Regards

xyxel commented 4 years ago

Hello,

Unfortunately, there are several Neo4j drivers for Julia. For example: https://github.com/glesica/Neo4j.jl And it's not clear which one should be chosen for compatibility. Also pay attention that there are official RedisGraph bindings for other programming languages (https://github.com/RedisGraph) and RedisGraph.jl was designed to be compatible with them.

Best Regards, Ihar

xyxel commented 4 years ago

As well as that currently RedisGraph doesn't support all cypher features so you can't always reuse neo4j-related codebase with RedisGraph.

Best Regards, Ihar

thibaut-d commented 4 years ago

Thanks.

The Neo4j drivers for Julia are:

BOLT protocol has been developed to be more reliable and faster than the HTTP protocol and seems to be currently pushed by Neo4j. So my bet would probably be on the second one.

I see the problem with the fact that the full set of CYPHER feature is not yet supported by RedisGraph. I think that they are currently working on it. This is an important point when you want to make it possible to change of database for your users. The system has to be designed with these limitations in mind.