Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] understanding Single Source Shortest Path and Traversal API within HugeGraph #2523

Closed
1 task done
0x2f2f2f2f opened this issue Apr 15, 2024 · 2 comments
Closed
1 task done
Labels
inactive question Further information is requested rocksdb RocksDB backend

Comments

@0x2f2f2f2f
Copy link

Problem Type (问题类型)

None

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend: RocksDB x nodes, HDD or SSD
  • OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
  • Data Size: xx vertices, xx edges

Your Question (问题描述)

Trying to understand how the Single Source Shortest Path API logic works within the repository in terms of memory, design pattern and its relation to the traverser API.

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

Copy link

dosubot bot commented Apr 15, 2024

The Single Source Shortest Path (SSSP) API in HugeGraph, specifically through the SingleSourceShortestPathTraverser class, is designed for efficient shortest path computation from a single source vertex to all others. It leverages efficient data structures like LinkedHashMap for WeightedPaths and Set<Edge> for storing edges, optimizing memory usage while maintaining quick access and insertion order. The implementation also includes a mechanism to skip super nodes based on a specified skipDegree, reducing memory footprint by avoiding traversal of high-degree nodes.

The SSSP algorithm is part of the broader traverser API, extending the HugeTraverser class to utilize common graph traversal functionalities. This ensures seamless integration and leverages the framework's capabilities for vertex and edge loading. The design patterns observed include the Traverser pattern for systematic exploration and the Decorator pattern for extending node functionalities.

Performance-wise, while the implementation does not directly address backend specifics like RocksDB or storage media (HDD vs. SSD), the efficiency of RocksDB, especially on SSDs, would contribute positively to the traversal speed by reducing data access latency. The algorithm's memory management strategy involves algorithmic controls (parameters like max_degree, capacity, and limit) alongside Java's memory management through iterators and object scoping.

For more detailed insights, the source code of the SingleSourceShortestPathTraverser and SingleSourceShortestPathAPI classes on GitHub provides a comprehensive look at the implementation and its integration with the HugeGraph framework.

This overview should give you a clearer understanding of the SSSP API's workings within HugeGraph, including its memory management, design patterns, and integration with the traverser API. If you have further questions or need more details, feel free to ask.

Sources

About Dosu

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.

@dosubot dosubot bot added question Further information is requested rocksdb RocksDB backend labels Apr 15, 2024
Copy link

github-actions bot commented May 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive question Further information is requested rocksdb RocksDB backend
Projects
None yet
Development

No branches or pull requests

1 participant