Six ways the stack stays online
Nearest path · like a CDN
LAN-first, then cloud relay
When you’re on the same Wi‑Fi, the phone tries your PC’s local agent address first. Away from home, traffic goes through the Hazelink relay so you don’t open ports on your router.
- Faster when you’re nearby
- Works from mobile data without LAN
Split services · like microservices
Independent pieces, one product
Hazelink is not one giant server. The PC agent, relay hub, Firebase Auth/Firestore, Cloud Functions (pairing, billing, wake), and Flutter clients each do one job. If billing is busy, remote control still runs.
- Login, pairing, control, and payments stay separated
- A hiccup in one area doesn’t take the whole app down
Elastic cloud · like auto scaling
Managed scale where it matters
Firebase Hosting and Cloud Functions scale up when many users pair or check out at once, then scale down when quiet. Your PC agent stays on your machine — we don’t rent a always-on box per user.
- Handles launch spikes without slowing everyone
- Your hardware does the heavy PC work
Close to the device · like caching
Local + presence cache
Games and apps catalogs, stats snapshots, and last-seen presence are cached so the home screen doesn’t wait on every network hop. The UI stays usable while the next refresh lands.
- Library and stats feel snappy
- Fewer round-trips for the same data
Recovery · like chaos readiness
Degraded mode, not a hard stop
We don’t treat one flaky ping as “PC dead.” If live stats or recent last-seen say you’re online, Hazelink still opens control. The agent and relay reconnect when the link drops.
- Soft reachability instead of false “offline”
- Prepared for real network blips
Adaptive path · like adaptive bitrate
Match the path to the link
Short timeouts on LAN, longer on relay. If one base URL answers “offline,” the client tries the next. Same idea as quality that adapts — here the route adapts so actions keep completing.
- Prefer the working base URL
- Smooth control even when the network wobbles