# graph **Repository Path**: studiox/graph ## Basic Information - **Project Name**: graph - **Description**: 定义通用的图操作API接口,将底层不同类型的图数据库操作进行封装。支持图数据检索查询、血缘影响查询、以及图数据的高级分析等功能。适配多类型主流图数据库,比如Neo4j、JanusGraph、NebulaGraph等。提供基础框架代码及前端图形查询页面,基于该源码工程可快速搭建代码工程脚手架。 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: trunk - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 5 - **Created**: 2021-07-14 - **Last Updated**: 2025-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Graph 1.0 #### Introduction By abstracting the vertices and edges in the graph through Java object design patterns, the operations of the graph database can be encapsulated as a layer of universal API interface, which can shield the differences between different graph database products at the bottom layer. This allows upstream business and development students to focus more on business function development. #### Architecture ![img](./static/image/graph_arch.png) Provide commonly used graph database operation API interfaces, supporting insertion, update, deletion of vertices and edges on the graph, as well as querying blood relationship relationships. The underlying layer supports multiple graph databases: Neo4j (embedded/remote instance connection) JanusGraph (in memory/remote instance connection) NebulaGraph (remote instance connection) This project includes several modules: 1). graph-common: Object definitions, constant definitions, and basic tool classes for vertices and edges in a graph 2). graph-neo4j、graph-janusgraph、graph-nebulagraph: Implementation of graph query statements adapted to different graph databases 3). graph-persistence(model、mybatis、mybatis-plus、mybatis-tk、spring-jdbc) Support database persistence implementation 4). graph-runtime: Support different graph databases as underlying image library query engines, RDB as persistent storage for graph vertices and edges。GremlinService as a JanusGraph query service, Store the front-end graph query page under resources, initiate graph interactive queries and visualize, by connecting to GremlinService through HTTP and WebSocket. 5). scripts: The build directory contains various scripts used in the project, as well as the database DDL definitions containing graph vertices and edges in the database directory #### Installation tutorial 1. The project code is organized through Maven and supports compiling and testing the source code after configuring a public Maven repository 2. There are installation and deployment steps and commands for Neo4j and NebulaGraph based on Docker in the project document project_home/docker 3. If remote connection to graph database instances is required, it is necessary to deploy the relevant graph database instances in advance and complete initialization operations such as graph database usernames and passwords 4. If you need to run the module under graph consistency, the default test case uses the h2 memory library, or you can switch to an external database such as MySQL #### Instructions 1. Download code locally through the git clone project 2. Under the root directory to execute the cmd: sh scripts/build/build.sh 3. Each submodule can run as needed, the runtime module is achieved by running GraphRuntime Server #### Participate and contribute Welcome young people with aspirations to join us. Let's gather firewood together and the flames will be high ^_^. 1). Fork the repo 2). Create Feat_xxx 分支 3). Commit Code (Edit commit message according to specifications) 4). Create Pull Request If there is any technical discussion or exchange, please feel free to contact us by email: yuqizhu@yeah.net #### Open source coffee ☕️ Open source is not easy, and during project development and maintenance, a lot of spare time is invested. If it is helpful for your technical learning and work, donate a cup of coffee ☕️ ^_^. ![img](./static/image/graph_donate.png)