当前位置:网站首页>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 ~~
边栏推荐
- 6091. 划分数组使最大差为 K
- 【LeetCode】577-反转字符串中的单词 III
- 【Experience Cloud】如何在VsCode中取得Experience Cloud的MetaData
- [idea] recommend an idea translation plug-in: translation "suggestions collection"
- 6092. 替换数组中的元素
- matlab中wavedec2,说说wavedec2函数[通俗易懂]
- [leetcode] 200 number of islands
- [leetcode] 1905 statistics sub Island
- (4) Flink's table API and SQL table schema
- College entrance examination admission score line climbing
猜你喜欢
![[salesforce] how to confirm your salesforce version?](/img/ce/4c844b1b686397faa1b6aa3d57e034.png)
[salesforce] how to confirm your salesforce version?

PostgresSQL 流复制 主备切换 主库无读写宕机场景

动态规划入门一,队列的bfs(70.121.279.200)

动态规划入门二(5.647.62)

Xpt2046 four wire resistive touch screen

二叉树前,中,后序遍历

智联招聘的基于 Nebula Graph 的推荐实践分享

Soul torture, what is AQS???

全是精华的模电专题复习资料:基本放大电路知识点

Experiment collection of University "Fundamentals of circuit analysis". Experiment 6 - observation and measurement of typical signals
随机推荐
2278. Percentage of letters in string
Cultural scores of summer college entrance examination
【LeetCode】1140-石子游戏II
How to intercept the value of a key from the JSON string returned by wechat?
6091. 划分数组使最大差为 K
PostgresSQL 流复制 主备切换 主库无读写宕机场景
《大学“电路分析基础”课程实验合集.实验四》丨线性电路特性的研究
愛可可AI前沿推介(7.2)
(4) Flink's table API and SQL table schema
Moveit obstacle avoidance path planning demo
SQL FOREIGN KEY
Add an empty column to spark dataframe - add an empty column to spark dataframe
[leetcode] 200 number of islands
[leetcode] 1020 number of enclaves
[leetcode] 19 delete the penultimate node of the linked list
【LeetCode】344-反转字符串
Lseek error
全是精华的模电专题复习资料:基本放大电路知识点
将点云坐标转换成世界坐标的demo
SQL修改语句