You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Parquet**: Columnar persistence with Snappy compression, periodic flush
8
+
-**DashMap**: In-memory concurrent map for 11.9μs queries and 469K events/sec throughput
9
+
10
+
**DO NOT** describe Core as "in-memory only", "dumb", "not production-ready", or claim "data is lost on restart." Event data is durable. Only Core's user/tenant metadata (a separate concern) is in-memory — and that responsibility belongs to the Query Service, not Core.
11
+
12
+
**DO NOT** suggest storing events in PostgreSQL. PostgreSQL is for operational metadata only (users, tenants, API keys, billing). The correct way to improve Core's availability is through Core replication (leader-follower, WAL shipping) — not by adding another database.
13
+
14
+
## Repository Structure
15
+
16
+
```
17
+
apps/
18
+
core/ — Rust event store (AllSource Core)
19
+
query-service/ — Elixir/Phoenix API gateway (auth, billing, routing to Core)
20
+
web/ — Next.js frontend dashboard
21
+
mcp-server-elixir/ — Elixir MCP server (separate from Rust MCP Docker binary)
-`GET /api/v1/projections` — list projections (returns `{"projections": [...], "total": N}`)
47
+
-`GET /api/v1/snapshots` — list snapshots
48
+
-`GET /api/v1/schemas` — list schemas
49
+
-`GET /health` — health check (note: root path, not /api/v1/health)
50
+
-`GET /metrics` — Prometheus metrics
51
+
52
+
Core wraps responses in maps (`{"events": [...]}`, `{"projections": [...]}`). The Query Service's RustCoreClient unwraps these before passing to controllers.
53
+
54
+
## Query Service Config
55
+
56
+
-`CORE_URL` — Core connection URL (not RUST_CORE_URL — clean env var names, no implementation details)
57
+
-`CORE_WS_URL` — Core WebSocket URL for real-time streaming
58
+
- Config key in Elixir: `:core_url` (not `:rust_core_url`)
59
+
60
+
## Docker Stack
61
+
62
+
Defined in the wallet project: `/Users/decebaldobrica/Projects/alphaSigmaPro/wallet/docker/docker-compose.allsource.yml`
63
+
64
+
Services on `supabase_network_alpha-sigma-pro`:
65
+
-`allsource-core-leader` (port 3280 → 3900, replication on 3910)
66
+
-`allsource-core-follower-1` (port 3281 → 3900)
67
+
-`allsource-core-follower-2` (port 3282 → 3900)
68
+
-`allsource-query-service` (port 3283 → 3902)
69
+
-`allsource-mcp` (port 3904)
70
+
71
+
Building Docker on Apple Silicon: native arm64 only — QEMU cross-compilation to linux/amd64 fails on Erlang NIF.
72
+
73
+
## Scaling Strategy
74
+
75
+
See `docs/proposals/CORE_REPLICATION_DESIGN.md`:
76
+
- Leader-follower replication via WAL shipping
77
+
- Query Service routes writes to leader, reads round-robin across followers
78
+
- No Raft, no PostgreSQL in the event path, no multi-leader
0 commit comments