A video link fails
It is thrown away and rebuilt with jittered backoff. Only that tile reconnects.
Guard Cam puts security guards at different sites on each other's screens, live. Each screen shows your own camera and three other guards, swapped every hour. When a link, a webcam or the server fails, it heals itself.
Your own camera and three other guards. On the hour everyone is rematched, and the old picture stays up until the new video is flowing.
Illustration, sped up. The timings in the captions are the real ones.
Video goes straight from browser to browser over WebRTC. The server only introduces the guards.
Every video link is disposable. When one breaks, only that tile rebuilds. The others keep playing.
Heartbeats, a frame watchdog and jittered backoff fix what breaks, with nobody on shift touching a thing.
The four-tile idea
Each guard opens one page. The server picks three other guards from the same company and their browsers link up directly. On the hour everyone is rematched at random, so through the night every site keeps an eye on many others.
Company, access code, your name and site. The PC remembers it.
The server picks three others from your company's private pool. Companies never see each other.
Browser to browser at 360p and 15 fps, about 1.5 Mbps each way. The server only passes on the short setup messages.
Everyone is rematched at random. The old picture stays until the new one is flowing.
Your tile stays put. The other three change on the hour, and a tile is never blank while they swap. Fewer than three others online? The spare tiles say Waiting for another guard
until someone joins.
Resilient · self-healing
Cables get kicked, PCs lose power, webcams drop off USB, servers restart. Nobody on shift should have to fix any of it, so every part is built to fail and recover on its own.
The server pings every guard every 5 seconds.
A PC that stops answering is dropped, and its peers get someone new.
A link that delivers no new frames for 15 seconds is torn down and rebuilt.
Video returns after a server restart, as measured in the end-to-end test.
It is thrown away and rebuilt with jittered backoff. Only that tile reconnects.
The watchdog sees no new frames for 15 seconds and rebuilds it anyway.
Missed heartbeats drop it within about 15 seconds, and its peers are matched with someone else.
The camera is reopened and the new picture is swapped into every link. Nobody reconnects.
Everyone is rematched, but each old picture stays up until its replacement is flowing. No blank tiles.
A red banner says so, and every PC reconnects by itself, spread out with jitter so they don't all arrive at once.
Built for unattended PCs
The screen in a guard house runs for days with nobody at the keyboard. Guard Cam is written for exactly that.
The login is remembered, so a PC that restarts comes straight back onto the wall.
It holds a screen wake lock, so the display doesn't go to sleep mid-shift.
It reloads once a night at a random minute between 03:00 and 03:30, so sites don't all reconnect together.
A red banner shows when the server can't be reached, and your own tile turns red when nobody is linked to you.
Tested, not promised
This is the actual app: three guards online and one tile waiting for another guard. Chrome's test camera stands in for the webcams.
Every change runs an end-to-end test with five headless Chrome guards. It checks three things:
Straight answers
Guard Cam is a working prototype. Here is exactly where it stands.
Open it on any PC with a webcam. You'll need your company's access code.
Open Guard Cam