Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database backends for Graft.jl #25

Open
pranavtbhat opened this issue Aug 22, 2016 · 4 comments
Open

Database backends for Graft.jl #25

pranavtbhat opened this issue Aug 22, 2016 · 4 comments

Comments

@pranavtbhat
Copy link
Owner

This is to scope the work required to integrate Graft.jl with relational databases/ graph databases.

@pranavtbhat
Copy link
Owner Author

RDMBS

The use of JDBC or ODBC should make this fairly straightforward.

The current graph definition is:

type Graph
   nv::Int
   ne::Int
   indxs::SparseMatrixCSC{Int,Int}
   vdata::AbstractDataFrame
   edata::AbstractDataFrame
   lmap::LabelMap
end

After adding a layer of abstraction for type of DB in use, this should look like:

abstract GraphDataStore

# Current implementation
immutable TableStore <: GraphDataStore
   vdata::AbstractDataFrame
   edata::AbstractDataFrame
end   

# RDMBS implementation (two tables: Vertex and Edge)
immutable RelationalStore <: GraphDataStore
   dbconn:: JConnection
end

# Metadata access should look something like this:
function getvprop(x::RelationalStore, vs::VertexList, prop::Symbol)
   # set @VLIST
   DataFrames.readtable(executeQuery(createStatement(x.dbconn), "SELECT $prop FROM Vertex WHERE ROWNUM in @VLIST")
end

type Graph
   nv::Int
   ne::Int
   indxs::SparseMatrixCSC{Int,Int}
   propgraph::GraphDataStore
   lmap::LabelMap
end

@pranavtbhat
Copy link
Owner Author

pranavtbhat commented Aug 22, 2016

GraphDB

There seems to be a wrapper for Neo4j already : https://github.com/glesica/Neo4j.jl. Neo4j.jl uses HTTP requests to interface with the Neo4j server. This is quite slow, and returns text data that needs to be parsed.

There is an officially supported python driver that uses a faster BOLT protocol. We can either call this from within Julia or try replicating it. Neo4j supports a bunch of other languages too, maybe we can add Julia?

Update : writing a bolt driver for Julia should be straightforward. This tutorial is pretty informative. I will start experimenting with the socket API soon.

@rotten
Copy link

rotten commented Oct 25, 2016

fwiw, it looks like the bolt driver info moved to here: https://github.com/neo4j-contrib/boltkit

@Azzaare
Copy link

Azzaare commented Sep 11, 2017

Just checking if one of you have made progress on the matter of bolt driver for julia withn last year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants