Skip to content

Commit ac36b34

Browse files
committed
docs: simplify and realign repository documentation
1 parent 9fb621e commit ac36b34

20 files changed

Lines changed: 426 additions & 4799 deletions

GETTING_STARTED.md

Lines changed: 69 additions & 337 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 67 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,102 @@
11
# Janus
22

3-
Janus is a hybrid engine for unified Live and Historical RDF Stream Processing, implemented in Rust.
3+
Janus is a Rust engine for hybrid RDF stream processing. It combines:
44

5-
The name "Janus" is inspired by the Roman deity Janus who is the guardian of doorways and transitions, and looks towards both the past and the future simultaneously. This dual perspective reflects Janus's capability to process both Historical and Live RDF streams in a unified manner utilizing a single query language and engine.
5+
- historical query execution over locally stored RDF events
6+
- live query execution over streaming RDF data
7+
- a JanusQL parser that lowers hybrid queries to SPARQL and RSP-QL
8+
- an HTTP/WebSocket API for query management and result streaming
69

7-
## Performance
10+
## Repository Status
811

9-
Janus achieves high-throughput RDF stream processing with dictionary encoding and streaming segmented storage:
12+
The backend repository is active and locally healthy:
1013

11-
- Write Throughput: 2.6-3.14 Million quads/sec
12-
- Read Throughput: 2.7-2.77 Million quads/sec
13-
- Point Query Latency: Sub-millisecond (0.235 ms at 1M quads)
14-
- Space Efficiency: 40% reduction through dictionary encoding (24 bytes vs 40 bytes per event)
14+
- `cargo test --all-features` passes
15+
- `cargo clippy --all-targets --all-features -- -D warnings` passes
16+
- the HTTP API, Janus API, parser, storage layer, and stream bus all have integration coverage
1517

16-
For detailed benchmark results, see [BENCHMARK_RESULTS.md](./BENCHMARK_RESULTS.md).
18+
This repository is the backend and engine implementation.
1719

18-
## Development
20+
The maintained dashboard lives in a separate repository:
21+
- `https://github.com/SolidLabResearch/janus-dashboard`
1922

20-
### Prerequisites
23+
The `janus-dashboard/` folder in this repository is a lightweight local demo client, not the primary frontend.
2124

22-
- Rust (stable toolchain)
23-
- Cargo
25+
## What You Can Run
2426

25-
### Building
27+
### HTTP API server
2628

2729
```bash
28-
# Debug build
29-
make build
30+
cargo run --bin http_server
31+
```
3032

31-
# Release build (optimized)
32-
make release
33+
This starts the backend on `http://127.0.0.1:8080` by default.
34+
35+
### Stream replay / ingestion CLI
36+
37+
```bash
38+
cargo run --bin stream_bus_cli -- --help
3339
```
3440

35-
### Testing
41+
Use this to replay RDF input files into storage and optionally publish them to MQTT.
42+
43+
### Tests
3644

3745
```bash
38-
# Run all tests
3946
make test
47+
```
48+
49+
### Linting
4050

41-
# Run tests with verbose output
42-
make test-verbose
51+
```bash
52+
make lint
4353
```
4454

45-
### Code Quality
55+
## Development
4656

47-
Before pushing to the repository, run the CI/CD checks locally:
57+
### Prerequisites
4858

49-
```bash
50-
# Run all CI/CD checks (formatting, linting, tests, build)
51-
make ci-check
59+
- Rust stable
60+
- Cargo
61+
- Docker, if you want to run the local MQTT broker from `docker-compose.yml`
5262

53-
# Or use the script directly
54-
./scripts/ci-check.sh```
63+
### Build
5564

56-
This will run:
57-
- **rustfmt** - Code formatting check
58-
- **clippy** - Lint checks with warnings as errors
59-
- **tests** - Full test suite
60-
- **build** - Compilation check
65+
```bash
66+
make build
67+
make release
68+
```
6169

62-
Individual checks can also be run:
70+
### Full local CI checks
6371

6472
```bash
65-
make fmt # Format code
66-
make fmt-check # Check formatting
67-
make lint # Run Clippy
68-
make check # Run formatting and linting checks
73+
make ci-check
6974
```
7075

71-
## Licence
76+
This runs formatting, clippy, tests, and build checks.
7277

73-
This code is copyrighted by Ghent University - imec and released under the MIT Licence
78+
## Documentation
7479

75-
## Contact
80+
Start here:
7681

77-
For any questions, please contact [Kush](mailto:mailkushbisen@gmail.com) or create an issue in the repository.
82+
- [GETTING_STARTED.md](./GETTING_STARTED.md)
83+
- [START_HERE.md](./START_HERE.md)
84+
- [docs/README.md](./docs/README.md)
85+
- [docs/README_HTTP_API.md](./docs/README_HTTP_API.md)
86+
87+
Performance notes:
88+
89+
- [docs/BENCHMARK_RESULTS.md](./docs/BENCHMARK_RESULTS.md)
90+
91+
## Notes
92+
93+
- `src/main.rs` is currently a benchmark-style executable, not the main user-facing interface.
94+
- The primary user-facing entry point is `http_server`.
95+
96+
## Licence
97+
98+
This code is copyrighted by Ghent University - imec and released under the MIT Licence.
99+
100+
## Contact
78101

79-
---
102+
For questions, contact [Kush](mailto:mailkushbisen@gmail.com) or open an issue in the repository.

START_HERE.md

Lines changed: 32 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,54 @@
1-
# Janus HTTP API - START HERE
1+
# Janus Backend - Start Here
22

3-
## Quick Start (30 seconds)
3+
Use this file if you want the fastest path to a working local backend.
44

5-
```bash
6-
# 1. Setup (one time)
7-
./scripts/test_setup.sh
8-
# 2. Start MQTT
9-
docker-compose up -d mosquitto
5+
## Quick Start
106

11-
# 3. Start Server
12-
cargo run --bin http_server
7+
### 1. Start the MQTT broker
138

14-
# 4. Open Dashboard
15-
open examples/demo_dashboard.html
9+
```bash
10+
docker-compose up -d mosquitto
1611
```
1712

18-
Then click: **Start Replay****Start Query**
19-
20-
## What This Does
13+
### 2. Start the HTTP server
2114

22-
1. **Start Replay**: Loads RDF data from `data/sensors.nq`, publishes to MQTT, stores locally
23-
2. **Start Query**: Executes a JanusQL query, streams results via WebSocket to dashboard
15+
```bash
16+
cargo run --bin http_server
17+
```
2418

25-
## Documentation
19+
### 3. Check health
2620

27-
- **QUICK_REFERENCE.md** - One-page cheat sheet
28-
- **RUNTIME_FIX_SUMMARY.md** - How the runtime issue was fixed
29-
- **COMPLETE_SOLUTION.md** - Full implementation details
30-
- **SETUP_GUIDE.md** - Detailed setup instructions
31-
- **README_HTTP_API.md** - Complete API documentation
32-
- **FINAL_TEST.md** - Verification steps
21+
```bash
22+
curl http://localhost:8080/health
23+
```
3324

34-
## Key Points
25+
Expected response:
3526

36-
**No more runtime panics** - Fixed by spawning StreamBus in separate thread
37-
**Correct JanusQL syntax** - All examples updated to match parser
38-
**MQTT integration** - Full broker setup with Docker Compose
39-
**Two-button demo** - Interactive dashboard for easy testing
40-
**Production-ready** - Stable, tested, documented
27+
```json
28+
{"message":"Janus HTTP API is running"}
29+
```
4130

42-
⚠️ **Known limitation**: Replay metrics show status but not event counts (acceptable trade-off)
31+
## Optional: Open the local demo dashboard
4332

44-
## Troubleshooting
33+
This repository contains a small demo dashboard:
4534

4635
```bash
47-
# Server won't start (port in use)
48-
lsof -ti:8080 | xargs kill -9
49-
50-
# MQTT not running
51-
docker-compose up -d mosquitto
52-
53-
# Check if working
54-
curl http://localhost:8080/health
36+
open examples/demo_dashboard.html
5537
```
5638

57-
## Success Indicators
39+
For the maintained frontend, use the separate repository:
5840

59-
When everything works correctly:
60-
1. Server starts with clean output (no panics)
61-
2. Dashboard shows "Connected to Janus HTTP API server"
62-
3. Replay button → Status changes to "Running"
63-
4. Query button → WebSocket connects, results appear
64-
5. Results tagged as "historical" or "live"
41+
- `https://github.com/SolidLabResearch/janus-dashboard`
6542

66-
## Need Help?
43+
## Most Useful Docs
6744

68-
1. Read **QUICK_REFERENCE.md** for common commands
69-
2. Check **FINAL_TEST.md** for verification steps
70-
3. See **RUNTIME_FIX_SUMMARY.md** if you see panics
71-
4. Review **SETUP_GUIDE.md** for detailed instructions
45+
- [GETTING_STARTED.md](./GETTING_STARTED.md)
46+
- [docs/README_HTTP_API.md](./docs/README_HTTP_API.md)
47+
- [docs/QUICKSTART_HTTP_API.md](./docs/QUICKSTART_HTTP_API.md)
48+
- [docs/README.md](./docs/README.md)
7249

73-
---
50+
## Notes
7451

75-
**Everything is ready. Just run the Quick Start commands above!** 🚀
52+
- The backend is the primary concern of this repository.
53+
- `http_server` is the main user-facing executable.
54+
- `stream_bus_cli` is the replay/ingestion CLI.

docs/COMPLETE_SOLUTION.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/DOCUMENTATION_INDEX.md

Lines changed: 22 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,31 @@
1-
# Janus HTTP API - Documentation Index
1+
# Janus Documentation Index
22

3-
## Getting Started
3+
## Canonical Entry Points
44

5-
1. **START_HERE.md** - 🚀 BEGIN HERE - Quick start guide
6-
2. **scripts/test_setup.sh** - Automated setup script
7-
3. **docker-compose.yml** - MQTT broker configuration
5+
- [../README.md](../README.md)
6+
- [../GETTING_STARTED.md](../GETTING_STARTED.md)
7+
- [../START_HERE.md](../START_HERE.md)
8+
- [README_HTTP_API.md](README_HTTP_API.md)
9+
- [QUICKSTART_HTTP_API.md](QUICKSTART_HTTP_API.md)
810

9-
## Quick Reference
11+
## Backend Guides
1012

11-
4. **QUICK_REFERENCE.md** - One-page cheat sheet
12-
5. **FINAL_TEST.md** - Test verification steps
13-
6. **RUNTIME_FIX_SUMMARY.md** - Runtime panic fix explanation
13+
- [STREAM_BUS_CLI.md](STREAM_BUS_CLI.md)
14+
- [HTTP_API.md](HTTP_API.md)
15+
- [ARCHITECTURE.md](ARCHITECTURE.md)
16+
- [EXECUTION_ARCHITECTURE.md](EXECUTION_ARCHITECTURE.md)
17+
- [BENCHMARK_RESULTS.md](BENCHMARK_RESULTS.md)
1418

15-
## Complete Guides
19+
## Historical Context
1620

17-
7. **SETUP_GUIDE.md** - Comprehensive setup with MQTT
18-
8. **README_HTTP_API.md** - Complete API documentation
19-
9. **COMPLETE_SOLUTION.md** - Full implementation details
20-
10. **HTTP_API_IMPLEMENTATION.md** - Technical architecture
21+
The files below are retained for implementation history and design context. Some of them describe earlier states of the project and should not be treated as the current source of truth:
2122

22-
## Code
23+
- [MVP_TODO.md](MVP_TODO.md)
24+
- [MVP_ARCHITECTURE.md](MVP_ARCHITECTURE.md)
25+
- [RSP_INTEGRATION_COMPLETE.md](RSP_INTEGRATION_COMPLETE.md)
26+
- [SPARQL_BINDINGS_UPGRADE.md](SPARQL_BINDINGS_UPGRADE.md)
2327

24-
11. **src/http/server.rs** - HTTP server implementation (537 lines)
25-
12. **src/http/mod.rs** - Module exports
26-
13. **src/bin/http_server.rs** - Server binary (111 lines)
27-
14. **examples/http_client_example.rs** - Client example (370 lines)
28-
15. **examples/demo_dashboard.html** - Interactive dashboard (670 lines)
28+
## Dashboard Boundary
2929

30-
## Configuration
31-
32-
16. **docker/mosquitto/config/mosquitto.conf** - MQTT broker config
33-
17. **Cargo.toml** - Dependencies (axum, tower-http, tokio-tungstenite, etc.)
34-
35-
## How to Use This Documentation
36-
37-
### If you're brand new:
38-
→ Read **START_HERE.md**
39-
40-
### If you want quick commands:
41-
→ Read **QUICK_REFERENCE.md**
42-
43-
### If you see runtime panics:
44-
→ Read **RUNTIME_FIX_SUMMARY.md**
45-
46-
### If you need detailed setup:
47-
→ Read **SETUP_GUIDE.md**
48-
49-
### If you want to understand the API:
50-
→ Read **README_HTTP_API.md**
51-
52-
### If you need implementation details:
53-
→ Read **COMPLETE_SOLUTION.md** or **HTTP_API_IMPLEMENTATION.md**
54-
55-
### If you want to verify everything works:
56-
→ Follow **FINAL_TEST.md**
57-
58-
## File Sizes
59-
60-
```
61-
START_HERE.md ~1 KB (Quick start)
62-
QUICK_REFERENCE.md ~2 KB (Cheat sheet)
63-
RUNTIME_FIX_SUMMARY.md ~3 KB (Fix explanation)
64-
FINAL_TEST.md ~3 KB (Testing guide)
65-
SETUP_GUIDE.md ~18 KB (Detailed setup)
66-
README_HTTP_API.md ~15 KB (API guide)
67-
COMPLETE_SOLUTION.md ~9 KB (Solution summary)
68-
HTTP_API_IMPLEMENTATION.md ~19 KB (Technical details)
69-
70-
src/http/server.rs ~15 KB (Server code)
71-
examples/demo_dashboard.html ~20 KB (Dashboard)
72-
examples/http_client_example.rs ~11 KB (Client example)
73-
```
74-
75-
## Priority Reading Order
76-
77-
1. START_HERE.md
78-
2. QUICK_REFERENCE.md
79-
3. SETUP_GUIDE.md (if needed)
80-
4. README_HTTP_API.md (for API details)
81-
82-
The rest are reference materials for specific needs.
83-
84-
---
85-
86-
**Total: ~115 KB of documentation + ~50 KB of code**
87-
**Everything you need to use Janus HTTP API successfully!**
30+
- Local demo dashboard in this repository: `examples/demo_dashboard.html`
31+
- Maintained dashboard repository: `https://github.com/SolidLabResearch/janus-dashboard`

0 commit comments

Comments
 (0)