| # JanusGraph + Cassandra Connection Guide | |
| ## Connection Details | |
| - **JanusGraph Host**: localhost | |
| - **JanusGraph Port**: 17002 (Gremlin Server) | |
| - **ScyllaDB Host**: 127.0.0.1 | |
| - **ScyllaDB Port**: 17542 (CQL Proxy) | |
| - **Keyspace**: janusgraph | |
| ## Authentication | |
| - No authentication required (localhost binding only) | |
| - Cassandra uses default configuration | |
| ## Gremlin Console Example | |
| ```bash | |
| # Connect to Gremlin Server | |
| gremlin> :remote connect tinkerpop.server conf/remote.yaml session | |
| # Basic graph operations | |
| gremlin> g = traversal().withRemote('conf/remote-objects.yaml') | |
| gremlin> g.V().has('name', 'test').values() | |
| ``` | |
| ## Python Client Example | |
| ```python | |
| from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection | |
| from gremlin_python.process.anonymous_traversal import traversal | |
| from gremlin_python.process.graph_traversal import __ | |
| # Connect to JanusGraph | |
| connection = DriverRemoteConnection('ws://localhost:17002/gremlin', 'g') | |
| g = traversal().withRemote(connection) | |
| # Create vertex | |
| v = g.addV('person').property('name', 'john').next() | |
| print(f"Created vertex: {v}") | |
| # Query vertices | |
| people = g.V().hasLabel('person').valueMap().toList() | |
| print(f"People: {people}") | |
| connection.close() | |
| ``` | |
| ## ScyllaDB CQLSH Access | |
| ```bash | |
| # Connect to ScyllaDB via HAProxy | |
| cqlsh localhost 17542 | |
| # Show keyspaces | |
| cqlsh> DESCRIBE KEYSPACES; | |
| # Use janusgraph keyspace | |
| cqlsh> USE janusgraph; | |
| # Show tables | |
| cqlsh> DESCRIBE TABLES; | |
| ``` | |
| ## Configuration Notes | |
| - **Storage Backend**: ScyllaDB (Cassandra-compatible) | |
| - **Compression**: Enabled (LZ4) | |
| - **Consistency**: ONE (for performance) | |
| - **Data Directory**: `/data/adaptai/platform/dbops/data/scylla/` (ScyllaDB data) | |
| - **Backup**: Manual snapshots recommended | |
| ## Security | |
| - ❗ Localhost binding only | |
| - ❗ No authentication on Cassandra | |
| - ❗ Regular compaction monitoring needed | |
| - ❗ Backup graph schema regularly | |
| --- | |
| **Last Updated:** September 4, 2025 |