Cameras on devices (openpanel C1): frames in memory, a binary uplink, demand
- Volatile frames are held in memory with a byte-bounded queue instead of the /dev/shm ring scanned on every put; workers keep writing to the directory, which is trimmed on a timer. A volatile upload no longer spools to disk. ARTIFACT_VOLATILE_BYTES=0 turns the ring off. - A device sends camera frames as binary messages on its socket, held and published in one step and credited to its device node; refused frames are logged and dropped. Its snapshot carries demand and the uplink (binary, or http through the portal). - One demand registry for every socket's wanted media, the tunnel's included, plus what running flows read, mapped onto on-demand ports and published as device_demand; at most 8 media names per socket. - Per-message deflate off in serve and dev; a device may fetch the last 8 digests of a message; published dashboards cached per store revision; a revoked device socket is closed with 1008. - Media tiles want bytes only while on screen; the Devices tab previews a wired camera; the device node warns when a flow reads an on-demand port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138N7k5PT4dcR1iEqXaaQ9k
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
20251a18b4
commit
62c0b915f3
@@ -511,6 +511,19 @@ function FlowEditorInner({
|
||||
}
|
||||
}, [key])
|
||||
|
||||
// What the flow's nodes read, for a device node to say that a camera read
|
||||
// here sends all the time.
|
||||
const readers = useMemo(() => {
|
||||
const found = new Set<string>()
|
||||
for (const node of definitions) {
|
||||
if (node.type === DEVICE_TYPE) continue
|
||||
for (const spec of node.requires ?? []) {
|
||||
if (spec.name) found.add(qualify(flowName, spec.name))
|
||||
}
|
||||
}
|
||||
return found
|
||||
}, [definitions, flowName])
|
||||
|
||||
/**
|
||||
* Where clicking an endpoint takes you: the thing it stands for.
|
||||
*
|
||||
@@ -1508,6 +1521,7 @@ function FlowEditorInner({
|
||||
nodeTypes={nodeTypeInfo ?? []}
|
||||
origin={flowDoc.origin}
|
||||
suggestions={suggestions}
|
||||
readers={readers}
|
||||
expanded={editorExpanded}
|
||||
onToggleExpand={() => setEditorExpanded((wide) => !wide)}
|
||||
onChange={updateNode}
|
||||
|
||||
Reference in New Issue
Block a user