Comments (3)
🤖
你好 @imbajin,我是Dosu,一个可以帮助你解决问题和成为贡献者的机器人。在等待人类维护者的回复期间,我会尽力为你提供帮助。很高兴能够和你相识!
您的理解基本正确,但是具体的实现细节可能会因为不同的查询类型和配置而有所不同。在HugeGraph中,一次完整的API读取(如Kneighbor)的过程大致如下:
-
当向"/graphs/{graph}/traversers/kneighbor"端点发出GET请求时,会调用
get
方法。此方法接收源顶点、方向、边标签、深度、最大度和限制等参数。然后,它创建一个KneighborTraverser
实例,并调用其kneighbor
方法来获取源顶点的K邻居。如果countOnly
参数为true,它将返回K邻居的数量;否则,它将返回K邻居的ID。 -
当向同一端点发出POST请求时,会调用
post
方法。此方法接收一个Request
对象,该对象包含源顶点、步骤、最大深度、限制以及是否返回顶点、路径和边的标志等参数。然后,它创建一个KneighborTraverser
实例,并调用其customizedKneighbor
方法来根据指定的步骤获取源顶点的K邻居。根据Request
对象中的标志,它还可能返回与K邻居相关的顶点、路径和边。
至于HugeGraph-server是否支持多用户同时查询,多业务同时查询的问题,HugeGraph-server是设计为能够处理多个并发请求的。然而,实际的并发级别取决于服务器的配置和底层系统的资源。提供的代码没有显示任何明确的同步或锁定机制,这表明服务器依赖于底层数据库和系统资源来处理并发请求。
相关源码:
如果您有更多的问题或需要进一步的解释,请随时提问。
Sources
- 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
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.
from incubator-hugegraph.
@dosu-bot 能帮忙查找相关源码及上下文解答一下么?
from incubator-hugegraph.
Related Issues (20)
- [Feature] The gaph in-memory projection and and its corresponding algorithm HOT 4
- [Question] 有没有资源预估方案,以及商业版社区版本区别 HOT 1
- [Improve] Docker build image from source code slowly
- [Bug] Adding edges in batch mode throws exception that trace is 'Undefined link of edge label'
- rocksdb wal文件可以删除吗 HOT 1
- [Question] Want OLTP multi-process design doc HOT 3
- [Summary] Server Release v1.2.0 TODOs
- NoClassDefFoundError run the junit core test on eclipse HOT 1
- [Bug] hugegraph任务调度机制 HOT 2
- [Question] 不同的顶点使用不同的边要怎么做 HOT 2
- [Bug] 编译报错java.lang.NullPointerException
- [Question] Memory management feature is GA? HOT 2
- [Question] multi edge source & edge target support HOT 1
- [Improvement] add error messages when starting the hugegraph-server fails in the function wait_for_startup of util.sh
- [Bug] gremlin-sql缓存占用大量内存导致系统卡顿 HOT 2
- [Question] hung up in hugegraph-server 1.0.0 after auth enabled HOT 5
- [Qustion] MysSQL long transaction in hugegraph HOT 2
- [Question] why download file when starting server? HOT 2
- [Question] Data filter with multiprocessor HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-hugegraph.