You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "SkrDrag (via GitHub)" <gi...@apache.org> on 2023/12/11 17:11:20 UTC
[I] 对于Hugegraph的系统框架 的疑问 [incubator-hugegraph]
SkrDrag opened a new issue, #2385:
URL: https://github.com/apache/incubator-hugegraph/issues/2385
### Feature Description (功能描述)
想要了解一下Hugegraph-server 进行一次完整的API读(比如Kneighbor)的过程和其中的细节。
我目前理解的一次查询的过程是:
(1) 将需要查询的初始顶点集合发送给数据库查询引擎
(2) 数据库查询引擎将数据加载到缓冲区中:取决于缓冲区的大小和数据量,可能需要分几次加载,用结束标识表明数据加载结束
(3) 查询计算引擎进行计算:每个线程根据其id计算访问位置,一次取k条数据进行计算,直到缓冲区中的数据取完,得到本地计算结果
(4) 将各个线程的计算结果进行融合,得到本轮的计算结果,发送给数据库查询引擎
(5) 数据库查询引擎一方面加载下一轮数据到缓冲区中,另一方面从数据库中查询详细的结果信息,发送给可视化引擎
(6) 这个过程不断重复,直到终止条件满足
在这个理解的过程是否有错误呢?
还有一个疑问是目前的Hugegraph-server是否支持多用户同时查询,多业务同时查询?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question] Details about HugeGraph Traverser [incubator-hugegraph]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2385:
URL: https://github.com/apache/incubator-hugegraph/issues/2385#issuecomment-1902264653
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] [Question] Details about HugeGraph Traverser [incubator-hugegraph]
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on issue #2385:
URL: https://github.com/apache/incubator-hugegraph/issues/2385#issuecomment-1878004101
@dosu-bot 能帮忙查找相关源码及上下文解答一下么?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] [Question] Details about HugeGraph Traverser [incubator-hugegraph]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #2385: [Question] Details about HugeGraph Traverser
URL: https://github.com/apache/incubator-hugegraph/issues/2385
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question] Details about HugeGraph Traverser [incubator-hugegraph]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2385:
URL: https://github.com/apache/incubator-hugegraph/issues/2385#issuecomment-1878011989
_🤖_
<!-- Greeting -->
你好 @imbajin,我是[Dosu](https://dosu.dev),一个可以帮助你解决问题和成为贡献者的机器人。在等待人类维护者的回复期间,我会尽力为你提供帮助。很高兴能够和你相识!
<!-- Answer -->
您的理解基本正确,但是具体的实现细节可能会因为不同的查询类型和配置而有所不同。在HugeGraph中,一次完整的API读取(如Kneighbor)的过程大致如下:
1. 当向"/graphs/{graph}/traversers/kneighbor"端点发出GET请求时,会调用`get`方法。此方法接收源顶点、方向、边标签、深度、最大度和限制等参数。然后,它创建一个`KneighborTraverser`实例,并调用其`kneighbor`方法来获取源顶点的K邻居。如果`countOnly`参数为true,它将返回K邻居的数量;否则,它将返回K邻居的ID。
2. 当向同一端点发出POST请求时,会调用`post`方法。此方法接收一个`Request`对象,该对象包含源顶点、步骤、最大深度、限制以及是否返回顶点、路径和边的标志等参数。然后,它创建一个`KneighborTraverser`实例,并调用其`customizedKneighbor`方法来根据指定的步骤获取源顶点的K邻居。根据`Request`对象中的标志,它还可能返回与K邻居相关的顶点、路径和边。
至于HugeGraph-server是否支持多用户同时查询,多业务同时查询的问题,HugeGraph-server是设计为能够处理多个并发请求的。然而,实际的并发级别取决于服务器的配置和底层系统的资源。提供的代码没有显示任何明确的同步或锁定机制,这表明服务器依赖于底层数据库和系统资源来处理并发请求。
相关源码:
- [hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java)
如果您有更多的问题或需要进一步的解释,请随时提问。
## Sources
- [hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java)
- [hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java)
---
This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org