Add Neo4j to Gremlin Server - how to? - neo4j

I have downloaded Gremlin Server with an intention of being able to use Gremlin to traverse a Neo4j DB.
Now, speaking of the latter, it has to be somehow added to the Gremlin Server installation, but I have difficulty finding any up-to-date guidance on how to do that. There are a few posts here on SO describing various kinds of problems people run into, but no definitive solution, much less one for the current versions of both Tinkerpop and Neo4j.
Would appreciate specific links, tips etc.
Thanks!

There is a "TIP" describing Gremlin Server configuration in the TinkerPop reference documentation found here. Basically, you -install Neo4j dependencies:
bin/gremlin-server.sh install org.apache.tinkerpop neo4j-gremlin 3.3.4
then you edit your Gremlin Server YAML configuration file to connect to your database. Gremlin Server contains a sample file to get you started and is found the /conf directory of the installation. Of critical note is this entry:
graphs: {
graph: conf/neo4j-empty.properties}
It specifies the Neo4j configuration to use and the sample one that ships with Gremlin Server looks like this:
gremlin.graph=org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph
gremlin.neo4j.directory=/tmp/neo4j
gremlin.neo4j.conf.dbms.auto_index.nodes.enabled=true
gremlin.neo4j.conf.dbms.auto_index.relationships.enabled=true
As you can see, the configuration basically just passes through Neo4j specific configuration to Neo4j itself. Only the first two lines are TinkerPop options. In this case, it sets up Neo4j for embedded mode, meaning Neo4j runs within the Gremlin Server JVM. You can make Gremlin Server part of a Neo4j HA cluster with instructions found in the reference documentation here.
Note that you asked for "current" versions of both TinkerPop and Neo4j. While these instructions are current for TinkerPop, I'm afraid that the Neo4j version TinkerPop supports is well behind their latest release. It would be nice if someone had time to issue a pull request for that.

Related

How can I get a plugin for neo4j 3.4.5 with gremlin console or server?

I intend to use the Neo4j-community database in version 3.4.5 with Gremlin commands.
But I tried getting plugins but none are working for the later versions of neo4j.
Can someone outline how I can resolve my requirements?
As of right now, TinkerPop's neo4j-gremlin is built to work with Neo4j 3.2.3. That dependency is set via:
https://github.com/neo4j-contrib/neo4j-tinkerpop-api-impl/blob/0.7-3.2.3/pom.xml#L23
To see an upgrade, that library would need to be bumped to the version of Neo4j that you want and then neo4j-gremlin would need to be updated in TinkerPop:
https://github.com/apache/tinkerpop/blob/3.3.3/neo4j-gremlin/pom.xml#L120
Obviously I don't know if there would be required code changes in either repository for this to work.

Unable to connect to Neo4j db using gremlin - Error instantiating Neo4j Database

I am new to the neo4j-gremlin. I have downloaded the latest version of tinkerpop-3.3.1 and neo4j-community-3.3.3 on Windows machine.
I followed the installation instructions given on the tinkerpop site for Neo4j-Gremlin and was able to install neo4j-gremlin plugin but when i try to connect to the neo4j graph.db using gremlin console(graph = Neo4jGraph.open('C:/neo4j/data/databases/graph.db'))
I get the following error. Also the display stack trace option is also not available. It jumps directly to gremlin prompt. Any thoughts?
Error instantiating Neo4j Database for C:/neo4j/data/databases/graph.db
I was able to bring this setup with gremlin-server running Neo4j plugin. You can look at my GitHub project https://github.com/achandak123/gremlin-orm-neo4j. Don't worry about the README version talking about 2.3 n all. This works with tinker pop 3.3.1 and neo4j plugin

Neo4j - Kafka, How to connect these two?

How to connect or load data from Kafka to neo4j. I saw Mazerunner, DocManager in Neo4j documentation to connect Neo4j with Spark and MongoDB. Is there any such kind of projects related to Kafka and neo4j.
Thanks.
Please check this GitHub project. This is with Neo4j 2.2.3 KernelExtention.
Link: https://github.com/ducky427/neo-kafka
You may need to change the settings code for any 3.0.x version.
Another way, if you are using Neo4j Embedded version, you can simply integrate these through your custom API.
Do share, if you have found other ways to integrate.

Neo4j 2.1.1 concern - consistency check of community edition db

Following on from the information found in the blog post titled 'Neo4j 2.1.2 – Maintenance Release', I thought I should check the consistency of a database that has been upgraded to Neo4j 2.1.1.
My set up: Neo4j community edition running on Windows Server 2012 R2 - the binary distribution running as a Windows service (NOT the windows desktop launcher executable).
In the blog post it talks about using the backup tool included with the enterprise version of Neo4j so I have downloaded an evaluation copy (2.1.4) so have access to Neo4jBackup.bat. I cannot however, get a backup to run. No matter what I try I get
Couldn't connect to '127.0.0.1:6362'
or a variation thereof.
I am running
.\bin\Neo4jBackup.bat -from localhost -to D:\DataBackups\Neo4j\check
I have tried specifying a port, specifying IP address, using single://localhost. After consulting the manual more closely I have also amended my config to add
# Enable online backups to be taken from this database.
online_backup_enabled=true
# Port to listen to for incoming backup requests.
online_backup_server=127.0.0.1:6362
Still I receive the same error. I am clearly being a moron. What am I doing wrong? Help!
The question boils down to 'how do I back up a community edition database as alluded to in this Neo4j blog post?
OK so yes. I am a moron. It just came to me. You need to open the database with the enterprise edition!
For anyone who is overcome with a moment of stupidity, like me
Copy the database you wish to check (graph.db by default) to the data directory of your evaluation copy of Neo4j
Start up Neo4j (you may or may not need a store upgrade)
Run .\bin\Neo4jBackup.bat -from localhost -to [your desired backup location]
Sit back and await the results
Feel free to mock/throw rotten vegetables etc at me....! :)
Starting with the 2.1 line (somewhere around 2.1.5 I think) the consistency checker was moved from the enterprise edition to the community edition. It is therefore now possible to check a DB with the community edition too. In the root of the neo4j server directory run:
java -cp 'lib/*' org.neo4j.consistency.ConsistencyCheckTool data/graph.db
Note that this is not an offical API (it's undocumented).

Does Google Cloud support neo4j?

I'm a beginner of databases and I want to deploy neo4j on Google Cloud Platform.
I can find something about deploying MongoDB on Google, but nothing about neo4j.
So I wonder does Google Cloud support neo4j?
Thanks!
Neo4j is an open source project that could run your own Linux machine.
You could just create a Google Compute Engine instance, and follow the tutorials on the web to setup your Neo4j.
like this one: Neo4j setup instruction
just follow the Linux part, and I suggest you to use Debian image to create your instance for Neo4j, because the command-line tool on Debian is most like to Ubuntu's one.
Updated answer from 2018.
Yes -- neo4j supports Google Cloud. Instructions can be found on their website. You can use a pre-built image and launch a single node instance, or multi-node clusters on GCP.

Resources