Neo4j browser and some databse queries - neo4j

what is the difference between remote and a local graph in neo4j browser. I have searched an answer for this question but didn't get any so please help me .
thanks is advance.

I'm guessing this is asking about the options in the Neo4j Desktop.
A local graph is one you create on the same machine that is running the Neo4j Desktop application.
A remote instance is a Neo4j instance that resides on a different machine, so you need to supply the connection information so a bolt connection can be made so you access the instance.

Related

Neo4j Desktop - Where are Remote Graphs stored?

I'm new to Neo4j and am learning the Desktop application. I see that I can Add a Database (I can either Create a Local Graph or Connect to a Remote Graph). Creating a local graph obviously means creating a database on my computer, one with it's own bolt://... URL ID of some sort. If instead I Add a Remote Graph, does this imply that I can connect to another local graph stored on my laptop for example if I know its bolt id? I presume I can't but I want to make sure.
Next, if Remote implies stored in the cloud or served somehow, short of setting up a Neo4j instance on AWS or via another 3rd party does Neo4j come with its own easy way to setup a "remote" instance and where would this live? Does Neo have it's own cloud?
Remote Graph implies that there's a running Neo4j instance out there "somewhere" that we can connect to via the bolt URL, similar to how we would connect from a client application using a Neo4j driver (after all, Neo4j Desktop and Neo4j Browser are both client applications and connect via Neo4j drivers).
That might be a server instance somewhere set up by your company, or an instance running from your own laptop (not launched from Desktop), or maybe a Neo4j Aura instance you've set up yourself, or something on AWS or another cloud.
You can't administer remote instances, as bolt connections do not allow for starting/stopping Neo4j or other operations that require command-line access (though 4.0 security administration via the system db is supported).
For the most part though Desktop is agnostic of where or how the remote instance is set up, it just requires a bolt URL that can be used to connect to the instance or cluster.

Connecting Local Neo4j Graph to Databricks Cluster

I've created a Neo4j Local Graph DB containing some data that I need to use on a Databricks Notebook to do some graph analysis. I've seen that there's the Neo4j Spark Connector available and I was wondering if it were possible to access my local db using it, I don't have any hosting service available for my database and haven't managed to find one that offers a free trial and it's fairly easy to setup with Neo4j.
Any help would be greatly appreciated, I'm fairly with both Neo4j and Databricks so I hope my question is fairly explained.
If you're running Neo4j on localhost with the default ports, you onl have to configure your password in spark.neo4j.bolt.password=<password>.
Otherwise set the spark.neo4j.bolt.url in your SparkConf pointing e.g. to bolt://host:port.
You can provide user and password as part of the URL bolt://neo4j:<password>#localhost or individually in spark.neo4j.bolt.user and spark.neo4j.bolt.password.
For more details, refer "Neo4j Connector to Apache Spark".
Hope this helps.

queries regarding neo4j HA setup

Hi I am new to HA concepts and Neo4j HA. I have gone through the Neo4j Docs but i still have a couple of questions that come to my mind.
When using a php script to connect to Neo4j database via REST what ip should i use for the cluster. Is there a common ip for the cluster?
I ask this because if the master fails a new neo4j instance becomes the master. how should my script connect to the new master. Should i use third party software for pointing to the new master. can that happen automatically with neo4j through a common cluster ip. pardon me if my concepts are weak, just need some guidance.
How can i direct all reads and writes to the master only and use the slaves only for replication. Or is this the default setting. I see multiple read & multiple write scenarios so i am getting confused.
Is there any doc/material that explains further on setting up an Arbiter Instance or should i just configure 3 node Neo4j HA as explained in http://neo4j.com/docs/stable/ha-setup-tutorial.html and run the below command for one of the instance -
neo4j_home$ ./bin/neo4j-arbiter start
Any help is appreciated. Thanks!
Welcome to the community of Neo4j Users ;)
First I recommend you to look on neo4j-php-client, because it support Neo4j HA cluster and it could solve your question and problems. Instead of finding your own solutions.
Best practice is to use some kind of load balancing front of the Neo4j HA Cluster. Here is the great article about it: http://blog.armbruster-it.de/2015/08/neo4j-and-haproxy-some-best-practices-and-tricks/
You can do that on load balancer level based on HTTP methods (GET redirect to slaves; POST, PUT, DELETE redirect to master). But there is a problem with Cypher endpoint, because it uses only POST method. You can use additional HTTP header to distinguish between read and write request, but that logic must be in your application.
For start it's good enough to start with official documentation.
Resources
Neo4j HA cluster configuration (example)
Neo4j cluster and firewalls
As my friend MicTech mentioned, generally we use HAProxy as load balancer on top of Neo4j.
With the php client mentioned, you have a great configuration mechanism that allows to :
When using HA Proxy, define your read/write queries so it will automatically add a header to the http request. The header is configurable too.
When not using HAProxy, you can in the client setup, define all your neo4j instances and activate the High-Availibility extension (works only with cache enabled). So when the master is down, the client will automatically try to detect the new elected master and rewrite the connections configuration in the cache for further requests.
I tried to make the README as good as possible, please read it and open issues on the repository if there are things that are missing.
https://github.com/graphaware/neo4j-php-client

Connect QlikView to Neo4J

I am new to Neo4J and qlikview. I need to connect these two to create reports. Can anyone give me step by step process. I am asked to connect using JDBC, but some body please tell me how to do that too
A simple search would have led you to http://tiqview.tumblr.com/post/24953750981/working-with-graph-data-from-neo4j-in-qlikview
There's more information about Neo4j at http://neo4j.org, the JDBC driver at http://www.neo4j.org/develop/tools/jdbc

AzureWorkerHost get the uri after startup for Neo4jClient

I am trying to create a ASP.Net with neo4jclient project to be hosted on the Azure and am kind of unable to grasp how to do the following:
get hold of an neo4j rest endpoint address once the worker role has started. I think I am seeing a different address each time the emulator spins up a instance of worker role. I believe that i'll need this to create an client somewhat like this
neo4jClient = new GraphClient(new Uri("http ://localhost:7474/db/data"));
so any thoughts on how to get hold of the uri after the neo4j is deployed by AzureWorkerHost.
Also how is the graph database persisted on the blob store, in the example its always deploying a new instance of pristine db in the zip and updating, which is probably not correct. I am unable to understand where to configure this.
BTW I am using the Neo4j 2.0 M06 and when it runs in emulator, I get an endpoint somewhat like this http://127.255.0.1:20000 in the emulator log but i am unable to access it from my base machine.
any clue what might be going on here?
Thanks,
Kiran
AzureWorkerHost was a proof of concept that hasn't been touched in a year.
The GitHub readme says:
Just past alpha. Some known deficiencies still. Not quite beta.
You likely don't want to use it.
The preferred way of hosting on Azure these days seems to be IaaS approach inside a VM. (There's a preconfigured one in VM Depot, but that's a little old now too.)
Or, you could use a hosted endpoint from somebody like GrapheneDB.
To answer you question generally though, Azure manages all the endpoints. The worker roles says "hey, I need an endpoint to bind to!" and Azure works that out for it.
Then, you query this from the Web role by interrogating Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.Roles.
You'll likely not want to use the AzureWorkerHost for a production scenario, as the instances in the deployed configuration will destroy your data when they are re-imaged.
Please review these slides that illustrate step-by-step deployment of a Windows Azure Virtual Machine image of Neo4j community edition.
http://de.slideshare.net/neo4j/neo4j-on-azure-step-by-step-22598695
A Neo4j 2.0 Community Virtual Machine image will be released with the official release build of Neo4j 2.0. If you plan to use more than 30GB of data storage, please be aware that the currently supported VM image in Windows Azure's image depot must be configured from console through remote SSH to Linux.
Continue with your development using http://localhost:7474/ and then setup the VM when you are ready for a staging or production build to be deployed.
Also you can use Heroku's free Neo4j database deployment but you must configure the basic authentication for your GraphClient connection in Neo4jClient.

Resources