Skip to content

Commit f701e2e

Browse files
committed
repo: harden runtime and simplify repository layout
1 parent 922b7db commit f701e2e

48 files changed

Lines changed: 234 additions & 7480 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/fast-pr.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
- name: Run Clippy
4949
run: cargo clippy --all-targets --all-features -- -D warnings
5050

51-
test:
52-
name: Test Suite
51+
smoke:
52+
name: Integration Smoke
5353
runs-on: ubuntu-latest
5454
steps:
5555
- name: Checkout code
@@ -61,8 +61,14 @@ jobs:
6161
- name: Cache Rust build artifacts
6262
uses: Swatinem/rust-cache@v2
6363

64-
- name: Run tests
65-
run: cargo test --all-features --verbose
64+
- name: Run Janus API integration smoke test
65+
run: cargo test --test janus_api_integration_test --all-features
6666

67-
- name: Run doc tests
68-
run: cargo test --doc --all-features --verbose
67+
- name: Run HTTP server integration smoke test
68+
run: cargo test --test http_server_integration_test --all-features
69+
70+
- name: Run stream bus CLI smoke test
71+
run: cargo test --test stream_bus_cli_test --all-features
72+
73+
- name: Build HTTP client example
74+
run: cargo build --example http_client_example --all-features

GETTING_STARTED.md

Lines changed: 44 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -1,265 +1,89 @@
11
# Getting Started with Janus
22

3-
Welcome to Janus! This guide will help you get up and running with the Janus RDF Stream Processing Engine.
4-
5-
## What is Janus?
6-
7-
Janus is a hybrid engine for unified Live and Historical RDF Stream Processing, written in Rust. It allows you to seamlessly process both historical RDF data stored in databases and live RDF streams in real-time using a single query language.
3+
Janus is a Rust engine for querying historical and live RDF data through one
4+
Janus-QL model and one HTTP/WebSocket API.
85

96
## Prerequisites
107

11-
Before you begin, ensure you have the following installed:
12-
13-
- **Rust** (1.70.0 or later) - [Install from rustup.rs](https://rustup.rs/)
14-
- **Cargo** (comes with Rust)
15-
- **Git** (for cloning the repository)
16-
- **Docker** (optional, for running RDF stores)
17-
18-
### Installing Rust
8+
- Rust stable with Cargo
9+
- Docker and Docker Compose if you want the MQTT-backed replay flow
1910

20-
If you don't have Rust installed, run:
21-
22-
```bash
23-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
24-
```
11+
## Fastest Working Path
2512

26-
After installation, restart your terminal and verify:
13+
### 1. Build and test
2714

2815
```bash
29-
rustc --version
30-
cargo --version
16+
make build
17+
make test
3118
```
3219

33-
## Quick Start
34-
35-
### 1. Clone the Repository
20+
### 2. Start the HTTP server
3621

3722
```bash
38-
git clone https://github.com/yourusername/janus.git
39-
cd janus
23+
cargo run --bin http_server -- --host 127.0.0.1 --port 8080 --storage-dir ./data/storage
4024
```
4125

42-
### 2. Build the Project
26+
Verify it is up:
4327

4428
```bash
45-
# Debug build (faster compilation, slower execution)
46-
cargo build
47-
48-
# Release build (slower compilation, faster execution)
49-
cargo build --release
29+
curl http://127.0.0.1:8080/health
5030
```
5131

52-
### 3. Run Tests
32+
### 3. Exercise the API
5333

54-
Verify everything is working correctly:
34+
The quickest end-to-end client is the example binary:
5535

5636
```bash
57-
cargo test
37+
cargo run --example http_client_example
5838
```
5939

60-
### 4. Run the Example
40+
That example covers query registration, start, stop, replay control, and
41+
WebSocket result consumption.
6142

62-
```bash
63-
cargo run --example basic
64-
```
65-
66-
You should see output explaining the steps Janus takes to process RDF streams.
43+
## Optional Local Demo UI
6744

68-
### 5. Run the CLI Tool
45+
This repository keeps a small static demo at
46+
`examples/demo_dashboard.html` for manual browser testing.
6947

70-
```bash
71-
cargo run
72-
```
48+
The maintained Svelte dashboard lives in the separate
49+
`SolidLabResearch/janus-dashboard` repository.
7350

74-
This will display the version and basic information about Janus.
51+
## Main Binaries
7552

76-
## Project Structure
53+
- `http_server`: REST and WebSocket API for query lifecycle and replay control
54+
- `stream_bus_cli`: replay and ingestion CLI for RDF event files
7755

78-
Understanding the project structure will help you navigate the codebase:
79-
80-
```
81-
janus/
82-
├── src/ # Source code
83-
│ ├── lib.rs # Library entry point
84-
│ ├── main.rs # Binary entry point
85-
│ ├── core/ # Core engine logic (to be implemented)
86-
│ ├── store/ # RDF store adapters (to be implemented)
87-
│ ├── stream/ # Stream processing (to be implemented)
88-
│ ├── query/ # Query engine (to be implemented)
89-
│ └── config/ # Configuration (to be implemented)
90-
├── examples/ # Usage examples
91-
│ └── basic.rs # Basic example
92-
├── tests/ # Integration tests
93-
│ └── integration_test.rs
94-
├── benches/ # Performance benchmarks
95-
├── fuseki-config/ # Apache Jena Fuseki configuration
96-
├── Cargo.toml # Project metadata and dependencies
97-
├── Makefile # Common development tasks
98-
└── README.md # Project overview
99-
```
100-
101-
## Using the Makefile
102-
103-
The project includes a `Makefile` with common development tasks:
56+
## Common Commands
10457

10558
```bash
106-
# See all available commands
107-
make help
108-
109-
# Build the project
11059
make build
111-
112-
# Run tests
60+
make release
11361
make test
114-
115-
# Format code
11662
make fmt
117-
118-
# Run linter
63+
make fmt-check
11964
make lint
120-
121-
# Run all checks
12265
make check
123-
124-
# Generate documentation
125-
make doc
126-
127-
# Run benchmarks
128-
make bench
129-
130-
# Start Docker services (Oxigraph + Jena)
131-
make docker-start
132-
133-
# Stop Docker services
134-
make docker-stop
135-
```
136-
137-
## Development Workflow
138-
139-
### 1. Set Up Your Development Environment
140-
141-
```bash
142-
# Install development tools
143-
make setup
144-
145-
# Verify everything is installed
146-
make setup-check
147-
```
148-
149-
### 2. Make Changes
150-
151-
Edit files in the `src/` directory. The main areas to implement are:
152-
153-
- `src/core/` - Core engine logic
154-
- `src/store/` - RDF store adapters
155-
- `src/stream/` - Stream processing
156-
- `src/query/` - Query parsing and execution
157-
158-
### 3. Test Your Changes
159-
160-
```bash
161-
# Run tests
162-
cargo test
163-
164-
# Run tests with output
165-
cargo test -- --nocapture
166-
167-
# Run specific test
168-
cargo test test_name
169-
```
170-
171-
### 4. Format and Lint
172-
173-
```bash
174-
# Format code
175-
cargo fmt
176-
177-
# Check formatting
178-
cargo fmt --check
179-
180-
# Run linter
181-
cargo clippy
66+
make ci-check
18267
```
18368

184-
### 5. Build and Run
185-
186-
```bash
187-
# Build
188-
cargo build
189-
190-
# Run
191-
cargo run
69+
## Repository Layout
19270

193-
# Run example
194-
cargo run --example basic
195-
```
196-
197-
## Working with RDF Stores
198-
199-
Janus is designed to work with multiple RDF stores. Here's how to set them up for development:
200-
201-
### Oxigraph
202-
203-
Start Oxigraph using Docker:
204-
205-
```bash
206-
docker run -d -p 7878:7878 --name oxigraph-server oxigraph/oxigraph
207-
```
208-
209-
Or use the Makefile:
210-
211-
```bash
212-
make docker-oxigraph
213-
```
71+
- `src/api`: query lifecycle orchestration
72+
- `src/http`: REST and WebSocket server
73+
- `src/parsing`: Janus-QL parsing
74+
- `src/execution`: historical execution
75+
- `src/stream`: live stream processing
76+
- `src/storage`: segmented RDF storage
77+
- `src/bin`: executable binaries
78+
- `examples`: runnable examples and a minimal static demo
79+
- `tests`: integration coverage
80+
- `docs`: current docs plus older design notes
21481

215-
Oxigraph will be available at `http://localhost:7878`
82+
## Where to Read Next
21683

217-
### Apache Jena Fuseki
218-
219-
Start Jena Fuseki using Docker:
220-
221-
```bash
222-
docker run -d -p 3030:3030 --platform linux/amd64 \
223-
-v $(pwd)/fuseki-config:/fuseki/configuration \
224-
-v $(pwd)/fuseki-config/shiro.ini:/fuseki/shiro.ini \
225-
--name jena-server stain/jena-fuseki
226-
```
227-
228-
Or use the Makefile:
229-
230-
```bash
231-
make docker-jena
232-
```
233-
234-
Fuseki will be available at `http://localhost:3030`
235-
236-
### Starting Both Services
237-
238-
```bash
239-
make docker-start
240-
```
241-
242-
### Stopping Services
243-
244-
```bash
245-
make docker-stop
246-
```
247-
248-
## Adding Dependencies
249-
250-
To add a new dependency, edit `Cargo.toml`:
251-
252-
```toml
253-
[dependencies]
254-
# Add your dependency here
255-
tokio = { version = "1.35", features = ["full"] }
256-
```
257-
258-
Then run:
259-
260-
```bash
261-
cargo build
262-
```
84+
- `README.md`
85+
- `START_HERE.md`
86+
- `docs/DOCUMENTATION_INDEX.md`
26387

26488
## Common Rust Commands
26589

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@ This example demonstrates:
107107
- replay control
108108
- WebSocket result consumption
109109

110+
### Frontend Boundary
111+
112+
The maintained web dashboard lives in the separate
113+
`SolidLabResearch/janus-dashboard` repository.
114+
115+
This repository keeps a small static demo at
116+
[`examples/demo_dashboard.html`](./examples/demo_dashboard.html) for manual API
117+
testing, but frontend development should happen in the dedicated dashboard repo.
118+
110119
## Development
111120

112121
### Common Commands
@@ -129,7 +138,7 @@ The repository includes runnable examples under [`examples/`](./examples), inclu
129138

130139
- [`examples/http_client_example.rs`](./examples/http_client_example.rs)
131140
- [`examples/comparator_demo.rs`](./examples/comparator_demo.rs)
132-
- [`examples/demo_dashboard.html`](./examples/demo_dashboard.html)
141+
- [`examples/demo_dashboard.html`](./examples/demo_dashboard.html) for a minimal local demo
133142

134143
## Project Layout
135144

0 commit comments

Comments
 (0)