Neo4j as DataBase

Hi,

I found some old discussions about using Neo4j with graphhopper. Has anybody tested a current version of Neo4j. Would it be even reasonable to consider Neo4j?

Best,
Robin

Didn’t play with it for a long time but I’m very interested to being able to somehow marry both projects :slight_smile: ! Also I know that certain people at Neo4J are interested and some even promote GraphHopper.

See the very old repo where I used Neo4J as storage backend for GraphHopper

Hi Peter,

the Repo+a Blog entry from you, was exactly what I found.

I will probably do some testing with Neo4J in the future (next months), so I thought it would be worthwhile to ask first. I will let you know if there are any news on this.

Best,
Robin

Ok, feel free to ask about anything here … also you’ll then probably need some low level information

The question also is how you want to architecture this: do you want to write an neo4j exporter or a neo4j backend? The latter is better but probably harder to implement.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.

BTW: @boldtrn what is your use case to combine both?

@karussell My idea was to setup a Routeplaner on a comparably small server instance and use Neo4j as Datastore for the Graph. Long story short: I tried it for about a week to optimizie Neo4j but it performed rather bad. I was able to read a Graph (I think Baden WĂĽrtemberg or even Germany). But doing Shortest Path Searches on the graph were incredibly slow and mostly timed out. I tried to use their internal Shortespath Algorithms, they can run a Dijkstra and A*.

I also had an issue, when creating a so called spatial-index on the data. Neo4j completely hung up several times when I tried to create it. They have project that is meant to care about that stuff.

I don’t know about the current state of that project. But it seems that the overall the goal of that project is not to be used for a routeplaner but more to be used for GIS queries.

1 Like

@boldtrn Hi Robin,
Did you have any success with this. I am trying to do something similar and I just landed on your post.

I am gonna use neo4j spatial to check out how it works for me.

It didn’t really work for me. I also tried with or without spatial. I remember that shortest path searches ran into timeouts even for short distances (a couple of kms). That was over two years ago, maybe something changed or I did something wrong :). I stopped trying after about a week or so, I was able to read osm files into neo4j (which took pretty long). See also this issue that I created back then.

Thanks a lot for the response and the link.
My use case is not Routing so I can do without using OSM files.

I am building a backend with neo4j spatial and GTFS data to predict what routes a customer took using his location. So I guess my task might be simpler than routing over every node available via OSM.

@boldtrn cant you take certain layers of OSM for your case. OSM has many layers and you can choose.

Not sure which layers you mean. I created a custom importing mechanism without the neo4j spatial library, based on GraphHopper, but it was still too slow. I would recommend creating a quick prototype and see if neo4j is a good fit for your use case. It turned out it wasn’t the right fit for me.

BTW: Your project sounds like map matching, it might be easier to add the GTFS function to our map matching project (if that’s not yet possible?). If that’s not yet possible, a PR would be very welcome :).