当前位置:网站首页>The sea of stars hidden behind the nebula graph
The sea of stars hidden behind the nebula graph
2022-07-02 15:48:00 【Figure database nebulagraph】
This article was first published in Nebula Graph Community official account

The authors introduce
Hello everyone , I am a Anyzm,graph-ocean(GitHub:https://github.com/nebula-contrib/graph-ocean) Project sponsor , Currently working in 360 Number division , Position is senior JAVA Development Engineer .
After introducing myself , Let's introduce graph-ocean What is it? ?
graph-ocean brief introduction
graph-ocean It's based on nebula-java Client's ORM(Object Relational Mapping) frame , be familiar with ORM We should all know ORM Is to create something that can be used in a programming language “ Virtual object database ”, Let developers develop business more efficiently .
And I will Java ORM named graph-ocean Derived from Ocean And Nebula Graph Of Nebula( Stars ) Echo each other , It means the sea of stars .
Why design a Java ORM
If community users are right 360 If you are familiar with mathematics , Read what our technical team wrote 《JanusGraph To NebulaGraph transfer 》( link :https://discuss.nebula-graph.com.cn/t/topic/1172) Then we know that we are Nebula Graph It was used very early , In the official release v1.0.0 I have been running in the test environment before .
stay 360 It is used by the Department of mathematics Nebula Graph v1.0.0 In the process , We Java The client uses enumerations to present Tag and Edge data , And will be API It can be interpreted as nGQL Also strongly depends on enumeration , Highly intrusive to business code .
therefore , I was determined to change this situation in the process of contacting the project later .
Solve the problem of code intrusion
We all know that no matter what framework is connected to the database , The framework will eventually be parsed into a language recognized by the database . about Nebula Graph for , Users can use openCypher, You can also use Nebula Graph Native query language nGQL.
We are used to using... In our projects nGQL, So parse the business code into nGQL This step uses v1.0.0 A large part of the process has been completed . The intrusive nature of business code is due to the enumeration of vertices and edges , Enumeration is used to locate Tag perhaps Edge, You want to get this information from the entity class without intrusion , I thought of imitating JPA(Java Persistence API) How to annotate .
therefore ,graph-ocean In my mind, I have a preliminary image , Once the entity class is determined , Corresponding Tag perhaps Edge It should also be certain , So you can use caching to improve performance .

( Overall design drawings )
After simple design ,graph-ocean It was born . After development , My colleagues and I feel very comfortable with it , So I decided to open source the framework and feed it back to the community .
graph-ocean characteristic
graph-ocean It can make developers more elegant 、 Be more flexible about Nebula Graph Reading and writing , And it can help us quickly realize the mutual transformation of entity and database data ( This is also ORM Features of the framework ), At the same time, there is a cache , So there is no need to worry about performance .
graph-ocean Simple use
graph-ocean By Java annotation 、 Reflection 、 cache 、 String splicing 、nebula-java Connection pool 、session Management, etc . Users can get started quickly if they have skilled experience in reflection and connection pool development , It doesn't matter if it doesn't , Mainly grasp NebulaSessionPoolManager(session management )、GraphMapper( Basic database operation class )、@GraphEdge( Edge annotation )、@GraphVertex( Vertex annotation )、@GraphProperty( Attribute annotation )、GraphQuery( Inquire about API)、QueryResult( Query results ) Just these classes or interfaces .
graph-ocean The future plan of
graph-ocean Not yet supported Nebula Graph All the built-in functions ( However, it has also met most business scenarios ), because graph-ocean rely on nebula-java, So with nebula-java Version change of ,graph-ocean You also need to maintain the version for a long time .
because graph-ocean At present, it is basically maintained by me , The documentation is not complete , There are still many points that need to be improved .
therefore , The next stage is to gradually improve the use of documents , And perfection API, At the same time, I hope more like-minded people will join in , maintain graph-ocean This sea of stars .
Communication graph database technology ? Join in Nebula Communication group please first Fill in your Nebula Business card ,Nebula The little assistant will pull you into the group ~~
边栏推荐
猜你喜欢

【Experience Cloud】如何在VsCode中取得Experience Cloud的MetaData

动态规划入门二(5.647.62)

Comparison between rstan Bayesian regression model and standard linear regression model of R language MCMC

PHP static members

蚂蚁集团大规模图计算系统TuGraph通过国家级评测

Xpt2046 four wire resistive touch screen

Review materials for the special topic of analog electronics with all essence: basic amplification circuit knowledge points

Deux séquences ergodiques connues pour construire des arbres binaires

已知两种遍历序列构造二叉树
![[network security] network asset collection](/img/3e/6665b5af0dedfcbc7bd548cc486878.png)
[network security] network asset collection
随机推荐
【LeetCode】695-岛屿的最大面积
【LeetCode】283-移动零
《大学“电路分析基础”课程实验合集.实验七》丨正弦稳态电路的研究
Moveit 避障路径规划 demo
/Bin/ld: cannot find -lcrypto
蚂蚁集团大规模图计算系统TuGraph通过国家级评测
Experiment collection of University "Fundamentals of circuit analysis". Experiment 4 - Research on linear circuit characteristics
Ant group's large-scale map computing system tugraph passed the national evaluation
Lseek error
[leetcode] 1162 map analysis
《大学“电路分析基础”课程实验合集.实验五》丨线性有源二端网络等效电路的研究
【LeetCode】19-删除链表的倒数第N个结点
[idea] recommend an idea translation plug-in: translation "suggestions collection"
【LeetCode】200-岛屿数量
[leetcode] 283 move zero
使用 percona 工具给 MySQL 表加字段中断后该如何操作
SQL modification statement
Aike AI frontier promotion (7.2)
[experience cloud] how to get the metadata of experience cloud in vscode
Analysis of the difference between array and linked list