|
3 | 3 | ## Three-Tier Architecture |
4 | 4 |
|
5 | 5 | ### 1. Client Layer |
6 | | -- Gremlin/Cypher query interfaces |
7 | | -- REST API endpoints |
8 | | -- Multiple client language bindings |
| 6 | +- Gremlin/Cypher queries, REST APIs, Swagger UI |
9 | 7 |
|
10 | | -### 2. Server Layer (hugegraph-server) |
11 | | -- **REST API Layer** (hugegraph-api): GraphAPI, SchemaAPI, GremlinAPI, CypherAPI, AuthAPI |
12 | | -- **Graph Engine Layer** (hugegraph-core): Schema management, traversal optimization, task scheduling |
13 | | -- **Backend Interface**: Abstraction over storage backends |
| 8 | +### 2. Server Layer (hugegraph-server, 13 submodules) |
| 9 | +- **REST API** (hugegraph-api): GraphAPI, SchemaAPI, GremlinAPI, CypherAPI, AuthAPI, GraphSpaceAPI (distributed only), ManagerAPI (distributed only) |
| 10 | +- **Graph Engine** (hugegraph-core): Schema (with TTL update), traversal, task scheduling, GraphSpace multi-tenancy |
| 11 | +- **Backend Interface**: Pluggable via `BackendStore` |
14 | 12 |
|
15 | 13 | ### 3. Storage Layer |
16 | | -- Pluggable backend implementations |
17 | | -- Each backend extends `hugegraph-core` abstractions |
18 | | -- Implements `BackendStore` interface |
| 14 | +- RocksDB (default/embedded), HStore (distributed/production) |
| 15 | +- Legacy (≤1.5.0, deprecated, excluded from context): MySQL, PostgreSQL, Cassandra, ScyllaDB, HBase, Palo |
19 | 16 |
|
20 | | -## Multi-Module Structure |
| 17 | +## Module Structure (7 top-level modules) |
21 | 18 |
|
22 | | -The project consists of 7 main modules: |
| 19 | +### hugegraph-server (13 submodules) |
| 20 | +`hugegraph-core`, `hugegraph-api` (includes `opencypher/`, `space/`), `hugegraph-dist`, `hugegraph-test`, `hugegraph-example`, plus backends: `hugegraph-rocksdb`, `hugegraph-hstore`, `hugegraph-hbase`, `hugegraph-mysql`, `hugegraph-postgresql`, `hugegraph-cassandra`, `hugegraph-scylladb`, `hugegraph-palo` |
23 | 21 |
|
24 | | -### 1. hugegraph-server (13 submodules) |
25 | | -Core graph engine, REST APIs, and backend implementations: |
26 | | -- `hugegraph-core` - Core graph engine and abstractions |
27 | | -- `hugegraph-api` - REST API implementations (includes OpenCypher in `opencypher/`) |
28 | | -- `hugegraph-dist` - Distribution packaging and scripts |
29 | | -- `hugegraph-test` - Test suites (unit, core, API, TinkerPop) |
30 | | -- `hugegraph-example` - Example code |
31 | | -- Backend implementations: |
32 | | - - `hugegraph-rocksdb` (default) |
33 | | - - `hugegraph-hstore` (distributed) |
34 | | - - `hugegraph-hbase` |
35 | | - - `hugegraph-mysql` |
36 | | - - `hugegraph-postgresql` |
37 | | - - `hugegraph-cassandra` |
38 | | - - `hugegraph-scylladb` |
39 | | - - `hugegraph-palo` |
| 22 | +### hugegraph-pd (8 submodules) |
| 23 | +Placement Driver: `hg-pd-core`, `hg-pd-service`, `hg-pd-client`, `hg-pd-common`, `hg-pd-grpc`, `hg-pd-cli`, `hg-pd-dist`, `hg-pd-test` |
40 | 24 |
|
41 | | -### 2. hugegraph-pd (8 submodules) |
42 | | -Placement Driver for distributed deployments (meta server): |
43 | | -- `hg-pd-core` - Core PD logic |
44 | | -- `hg-pd-service` - PD service implementation |
45 | | -- `hg-pd-client` - Client library |
46 | | -- `hg-pd-common` - Shared utilities |
47 | | -- `hg-pd-grpc` - gRPC protocol definitions (auto-generated) |
48 | | -- `hg-pd-cli` - Command line interface |
49 | | -- `hg-pd-dist` - Distribution packaging |
50 | | -- `hg-pd-test` - Test suite |
| 25 | +### hugegraph-store (9 submodules) |
| 26 | +Distributed storage + Raft: `hg-store-core`, `hg-store-node`, `hg-store-client`, `hg-store-common`, `hg-store-grpc`, `hg-store-rocksdb`, `hg-store-cli`, `hg-store-dist`, `hg-store-test` |
51 | 27 |
|
52 | | -### 3. hugegraph-store (9 submodules) |
53 | | -Distributed storage backend with RocksDB and Raft: |
54 | | -- `hg-store-core` - Core storage logic |
55 | | -- `hg-store-node` - Storage node implementation |
56 | | -- `hg-store-client` - Client library |
57 | | -- `hg-store-common` - Shared utilities |
58 | | -- `hg-store-grpc` - gRPC protocol definitions (auto-generated) |
59 | | -- `hg-store-rocksdb` - RocksDB integration |
60 | | -- `hg-store-cli` - Command line interface |
61 | | -- `hg-store-dist` - Distribution packaging |
62 | | -- `hg-store-test` - Test suite |
| 28 | +### Others |
| 29 | +- **hugegraph-commons**: Shared utilities, RPC framework |
| 30 | +- **hugegraph-struct**: Data structures (must build before PD/Store) |
| 31 | +- **install-dist**: Distribution packaging, license files |
| 32 | +- **hugegraph-cluster-test**: Cluster integration tests |
63 | 33 |
|
64 | | -### 4. hugegraph-commons |
65 | | -Shared utilities across modules: |
66 | | -- Locks and concurrency utilities |
67 | | -- Configuration management |
68 | | -- RPC framework components |
69 | | - |
70 | | -### 5. hugegraph-struct |
71 | | -Data structure definitions shared between modules. |
72 | | -**Important**: Must be built before PD and Store modules. |
73 | | - |
74 | | -### 6. install-dist |
75 | | -Distribution packaging and release management: |
76 | | -- License and NOTICE files |
77 | | -- Dependency management scripts |
78 | | -- Release documentation |
79 | | - |
80 | | -### 7. hugegraph-cluster-test |
81 | | -Cluster integration tests for distributed deployments |
82 | | - |
83 | | -## Cross-Module Dependencies |
84 | | - |
85 | | -``` |
86 | | -hugegraph-commons → (shared by all modules) |
87 | | -hugegraph-struct → hugegraph-pd + hugegraph-store |
88 | | -hugegraph-core → (extended by all backend implementations) |
89 | | -``` |
90 | | - |
91 | | -## Distributed Architecture (Optional) |
92 | | - |
93 | | -For production distributed deployments: |
94 | | -- **hugegraph-pd**: Service discovery, partition management, metadata |
95 | | -- **hugegraph-store**: Distributed storage with Raft (3+ nodes) |
96 | | -- **hugegraph-server**: Multiple server instances (3+) |
97 | | -- Communication: All use gRPC with Protocol Buffers |
98 | | - |
99 | | -**Status**: Distributed components (PD + Store) are in BETA |
| 34 | +## Distributed Deployment (BETA) |
| 35 | +PD + Store + Server (3+ nodes each), all gRPC. Docker compose configs in `docker/` directory, using bridge networking (migrated from host mode). |
0 commit comments