Controlling the Engine
The engine runs ~1,400 cameras on
its own, but an operator still needs to steer it: change a camera's capture rate, restart one
that's wedged, redeploy the whole fleet after a config change, put a camera in turbo for an
event. The ImageAcquisitionController is that steering wheel — the single most important
control surface in the Admin API.
The one idea to hold on to
Steering the engine is almost all indirect: the controller writes Cosmos config, and the change feed turns it into a redeploy. Even "kick this camera" is just a timestamp bump:
// kick-device-orchestrations → nudge the doc so the change feed redeploys it
patchOperations.Add(PatchOperation.Set(nameof(AcquisitionDeviceEntity.LastUpdated), DateTimeOffset.UtcNow));
Reads are the exception — they go straight to the stores: get-acquisition-device returns the
intended Cosmos config, and get-orchestration-status returns the monitoring mirror, never
the running orchestration.
Setting how fast each mode captures
The set-standard/set-lease/set-turbo-image-acquisition-config endpoints are where a mode's
capture cadence is configured — the very rates the
four modes run at (typically 10s for
single, ~1s for lease and turbo). Change one, and because it's a Cosmos write, it takes effect
on the camera's next redeploy — not instantly.
Setting a new lease rate or camera type returns success once the Cosmos write lands, but the
running orchestration carries its old config forward via ContinueAsNew until it's redeployed.
For a single camera, the write itself triggers the change-feed redeploy; but if you're scripting
several changes to one camera, they coalesce into one redeploy, and none is "live" until it
happens. Success means intent recorded.
Wrapping up
The ImageAcquisitionController is the engine's steering wheel: it reads status from the
intended config and the monitoring mirror, and it changes the engine by writing Cosmos —
kicking a camera by bumping a timestamp, setting each mode's capture rate, and running fleet-wide
bulk operations — all applied on the next redeploy, all audited. It never calls the orchestrations
directly.
Before a camera can be steered, it has to be provisioned. Next: Managing a Device.