code wiki / _hdl_build / nx_connect_room_scale.nx
nx_connect_room_scale.nx
buildroot/runtime/_hdl_build/nx_connect_room_scale.nx
about
nx_connect_room_scale.nx -- VIDEO ROOM large-scale capability (the architectural enabler for big
E2E rooms). Incumbent E2E caps: Signal 75, Telegram 200 (verified, research wf_9c707709). The
enabler to exceed fixed caps is NOT keying (MLS/TreeKEM is O(log N)) but RECEIVE-side discipline:
SVC + PAGINATION so a receiver subscribes only to its visible PAGE (active speaker @ L2 + a few
thumbnails @ L0 + top-K audio) -- receive bandwidth is O(page), INDEPENDENT of room size N. Audio
scales via top-K active-talker selection (content-blind, level-metadata). The SFU stays content-
blind at any N.
HONEST GRADE: this is the scale CAPABILITY (PRESENT), NOT a claimed EXCEEDS over Telegram-200 --
the 2nd research pass (loss-resilience/scale numbers) was RATE-LIMITED and returned 0 sources, so
there is no verified incumbent bottleneck to measure against yet. We claim no exceed here.
7 checks incl. negative control. 100% sovereign. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 15 | const L0: i64 = 10 // thumbnail layer |
| 16 | const L2: i64 = 100 // active-speaker full layer |
| 17 | const AUDIO: i64 = 2 // per-audio-stream cost |
| 18 | const AUDIO_K: i64 = 3 // top-K active-talker audio streams forwarded |
| 19 | const PAGE: i64 = 25 // visible video tiles per receiver page |
functions
| 21 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 22 | func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 24 | func minv(a: i64, b: i64) -> i64 { if a<b { return a } return b } called by 1: decoded_tiles |
| 25 | func log2_ceil(n: i64) -> i64 { var c: i64=0; var v: i64=1; while v<n { v=v*2; c=c+1 } return c } called by 1: main |
| 27 | func decoded_tiles(n: i64) -> i64 { return minv(n, PAGE) } |
| 29 | func recv_bw_scaled(n: i64) -> i64 { let t: i64 = decoded_tiles(n); return L2 + (t-1)*L0 + AUDIO_K*AUDIO } |
| 31 | func recv_bw_naive(n: i64) -> i64 { return n*L2 + n*AUDIO } called by 1: main |
| 33 | func sfu_decoded(n: i64) -> i64 { return 0 } called by 1: main |
| 35 | func tcheck(pass: i64, label: *u8, fails: *i64) -> i64 |
| 41 | func main() -> i64 |