Loom Technology and Infrastructure
Part of Loom. This is a proposed stack, not a deployment or provider purchase.
Stack proposal
| Component | Proposal | Purpose |
|---|---|---|
| Web UI | React + TypeScript + Vite | Job forms, history, status, and explorer |
| Graph | Cytoscape.js | Interactive nodes/edges, styles, layouts, and selection |
| API and crawler | Go, standard HTTP server/client, HTML parser | Job control, bounded parallel network I/O, graph queries |
| Queue | Redis + Asynq | Delayed tasks, retries, and background workers |
| Durable store | Neo4j | Jobs, frontier, outbox, page snapshots, typed edges |
| Authentication | OIDC provider; exact service undecided | Account identity and access sessions |
| Live status | Polling initially, server-sent events later | Keep the UI current with durable job revisions |
| Exports | Private S3-compatible storage when needed | Large downloadable artifacts |
| Local runtime | Docker Compose | Reproducible UI/API/worker/Redis/Neo4j development |
| Initial hosting | Container-capable host or small VM with private services | Persistent worker processes and predictable networking |
The Go HTTP package exposes transport, client, redirect, and timeout controls; implement application pacing separately. Asynq is a Redis-backed Go task queue; make consumers idempotent. Cytoscape.js provides graph visualization and layout APIs; benchmark representative graph sizes rather than assuming unlimited rendering capacity.
Deployment map
flowchart LR Browser[Browser] --> Proxy[TLS reverse proxy] Proxy --> UI[Static web UI] Proxy --> API[Go API] API --> DB[(Neo4j)] Dispatcher[Dispatcher and reconciler] --> DB Dispatcher --> Redis[(Redis queue and limiter)] Redis --> Worker[Go worker pool] Worker --> DB Worker --> Guard[Outbound destination controls] Guard --> Site[Public target website] API --> Files[Private export storage]
API and workers can share a Go codebase with separate commands. Keep workers outside short-lived web request runtimes. Serve frontend and API under one origin where practical. Keep Redis and Neo4j private; expose only HTTPS and deliberately configured operator access.
Environments and delivery
Use local fixtures and an isolated development database. Production uses separate credentials, persistent volumes, secrets injection, resource limits, and health checks. A single VM is a reasonable pilot topology but has a single point of failure; disclose expected downtime and verify backups before relying on it.
CI runs Go tests and race-sensitive concurrency checks, frontend type checks/build, and integration tests against disposable databases. Use schema migrations or versioned constraint setup. Deploy API and workers compatibly with queued task versions and database shape; drain workers gracefully before replacing them.
Operations
Track queue delay, oldest pending frontier item, active leases, pages per minute, per-host request rate, retry counts, 429/503 frequency, bandwidth, database latency, graph response size, and browser layout time. Correlate logs with job/work IDs; avoid logging complete URLs with sensitive query strings.
Back up Neo4j using procedures supported by the selected deployment and edition; test restore with job recovery. Configure Redis persistence and memory limits appropriate to queue durability, avoiding silent queue-key eviction. The durable frontier/outbox supports reconciliation if queue deliveries are lost. Rebuild limiter state conservatively before resuming outbound traffic after recovery.
Cost and scale
Cost drivers are worker CPU/memory, network traffic, graph database storage/memory, queue service, export storage, and retention. Measure cost per bounded crawl and graph query performance before choosing paid plans.
Scale workers only after distributed pacing, idempotency, lease recovery, and database contention tests pass. More replicas must improve throughput across independent sites without increasing the allowed load on one target. Kubernetes, Kafka, browser fleets, and a second durable database are unnecessary for the initial scope.
Source references
- Go HTTP client and transport
- Asynq source and task model
- Neo4j Go driver
- Cytoscape.js documentation
- Robots Exclusion Protocol, RFC 9309
Sources checked on 2026-11-18. Check current maintenance, compatibility, licenses, hosting limits, and pricing before locking dependencies and services.