Some experiences in the use of neo4j

Source: Internet
Author: User
Tags neo4j

There are two ways to use NEO4J: The embedding mode embedded and the server mode standalone, the bridge between the two is the neo4j-community-1.8.m03-windows\neo4j-community-1.8.m03\ The graph.db in data, which is replaced by the generated database folder in embedded mode, can be accessed from a generated database by 127.0.0.1:7474/webadmin in server mode.

NEO4J can be embedded in your application, run as a standalone server or deploy to Ha cluster mode to provide good performance services.

Table 20.1. NEO4J deployment options

single
Instance multiple Instances

Embedded

Embeddedgraphdatabase

Highlyavailablegraphdatabase

Standalone

Neo4j Server

NEO4J Server High Availability mode


20.1.1. Server Mode

neo4j is accessed half as a standalone server, either directly through a rest interface or a driver based on the specified language. For information about the neo4j server, refer to: Chapter 17th NEO4J Server. To run the server in Ha mode, refer to: Chapter 22nd high Availability mode. 20.1.2. Embedding mode

By introducing a proper Java library, you can introduce neo4j into your application. When coding, you can participate in GRAPHDATABASESERVICEAPI. To switch from Singleton mode to multi-performance multi-mode, simply embeddedgraphdatabase to Highlyavailablegraphdatabase is required.

Use the following query method to search and browse data in the database


===========================================================================

NEO4J provides local services by default, which can only be accessed with localhost:7474 or 127.0.0.1:7474, but is modified

The line in Conf/neo4j-server.properties: After org.neo4j.server.webserver.address=0.0.0.0, the graphical interface and the rest interface can be accessed through ip:7474.

In cmd, you can see through the Netstat-an command:

Protocol local address external address state

TCP 10.xx.xx.170:7474 10.xx.xx.170:33034 established

TCP 10.xx.xx.170:7474 10.xx.xx.170:33036 established

TCP 10.xx.xx.170:7474 10.xx.xx.170:33037 established

Then, by Url:http://10.xx.xx.170:7474/db/data/node/1171/relationships/all/contains

You can see the retrieved JSON results


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.