code wiki / _hdl_build / nx_connect_datalight.nx

nx_connect_datalight.nx

buildroot/runtime/_hdl_build/nx_connect_datalight.nx

7439 B151 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_datalight.nx -- CONNECT worldwide LOW-BANDWIDTH reach (the last LDS-census MU cell): the data-light wire discipline, MEASURED at the architecture level (integer byte accounting inside the gate; the WhatsApp-MQTT class is the named yardstick -- no live-network H2H is claimed, so the cell flips PRESENT, never PARITY/EXCEEDS). BY CONSTRUCTION properties, each with a measured tooth: - COMPACT ENVELOPE: a text message rides a fixed 34-byte binary header + payload (no per-field text labels). NEG-CONTROL: the verbose labeled envelope (JSON-class) measures >3x our bytes on the same payload. - DELTA SYNC: a client syncs with a since-cursor and receives ONLY newer messages; an up-to-date client pays ~0 payload bytes. NEG-CONTROL: the chatty full-poll model refetches the whole tail every poll -- measured O(N x polls) vs our O(new). - ONE-ROUND-TRIP CATCH-UP: a 100-message backlog drains in a single batched response. - TEXT-FIRST MEDIA: a media message ships an 8-byte content-address REFERENCE inline (the blob fetch is lazy + optional; composes nx_connect_media's content addressing). 100% sovereign, deterministic. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_connect_datalight.nx

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

main sys_mmap sw sys_write dl_envelope_bytes dl_verbose_bytes dl_slen sn sys_mmap ↻ sys_write ↻ tcheck sw ↻ dl_sync dl_envelope_bytes ↻ dl_fullpoll dl_verbose_bytes ↻ sys_exit

structs

none

consts

17const DL_MAGIC_50000: i64 = 50000
18const DL_MAGIC_2000000: i64 = 2000000
19const DL_MAGIC_1000000: i64 = 1000000
21const DL_HDR: i64 = 34
22const DL_MAXM: i64 = 256

functions

24func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: tcheckmain calls 1: sys_write
25func 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 }
called by 1: main calls 2: sys_mmapsys_write
26func tcheck(pass: i64, label: *u8, fails: *i64) -> i64
called by 1: main calls 1: sw
31func dl_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: dl_verbose_bytes
34func dl_envelope_bytes(payload_len: i64) -> i64 { return DL_HDR + payload_len }
called by 2: dl_syncmain
38func dl_verbose_bytes(payload_len: i64) -> i64
called by 2: dl_fullpollmain calls 1: dl_slen
45func dl_sync(ids: *i64, lens: *i64, nmsg: i64, cursor: i64, out_bytes: *i64) -> i64
called by 1: main calls 1: dl_envelope_bytes
61func dl_fullpoll(ids: *i64, lens: *i64, nmsg: i64, window: i64, out_bytes: *i64) -> i64
called by 1: main calls 1: dl_verbose_bytes
74func main() -> i64