code wiki / (root) / nx_index_scale_census.nx

nx_index_scale_census.nx source

↩ module page · 43 lines · 4888 B

1// nx_index_scale_census.nx -- HONEST census of our INDEX SCALE / PERFORMANCE / MIGRATABILITY capabilities for the 2// Common-Crawl-scale sovereign index, vs the June-2026 SOTA (Lucene segments + roaring + sharding + LSM + 3// disaggregated/NVMe-oF/RDMA migration). Follows the IM lane's NO-WAVE law (nx_infomgmt_exceed): a capability is 4// HAVE iff its organ actually opens on disk (structural-present); at-SCALE numbers are NEVER claimed here (deferred to 5// the NAS run + measured separately). Grades the SUBSTRATE we have vs the build-targets. Research: 6// knowledge/research/2026-07-01-index-scale-performance-migration.md. license_tier: ORIGINAL 7import "nx_gate.nx" 8 9func isc_have(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 { return 0 } sys_close(fd); return 1 } 10func isc_row(label: *u8, path: *u8, note: *u8, acc: *i64) -> i64 { 11 let h: i64 = isc_have(path) 12 if h==1 { gw(" [HAVE] " as *u8); acc[1]=acc[1]+1 } else { gw(" [GAP ] " as *u8) } 13 acc[0]=acc[0]+1 14 gw(label); gw(" -> " as *u8); gw(note); gw("\n" as *u8) 15 return h 16} 17 18func main() -> i64 { 19 gw("=== nx_index_scale_census: performant / scalable / MIGRATABLE index (no-wave; structural, NOT at-scale) ===\n\n" as *u8) 20 let acc: *i64 = sys_mmap(16) as *i64; acc[0]=0; acc[1]=0 21 22 gw(" -- STRUCTURAL SUBSTRATE WE HAVE (organ on disk; structural-present != scale-measured) --\n" as *u8) 23 isc_row("portable-offset-index-format " as *u8, "runtime/_hdl_build/nx_search_inverted_persist.nx" as *u8, "MIGRATABLE BY CONSTRUCTION: offsets-not-pointers -> load w/ ZERO relocation; MAGIC-versioned (NXINV)" as *u8, acc) 24 isc_row("immutable-segment-store " as *u8, "runtime/nx_seg_store.nx" as *u8, "Lucene-segment / LSM-SSTable analogue: append-only immutable segments + manifest; merge=compaction" as *u8, acc) 25 isc_row("sharding " as *u8, "runtime/nx_shard.nx" as *u8, "partition the index across nodes (+ registry/view/rbac) -> horizontal scale" as *u8, acc) 26 isc_row("tiering + compaction " as *u8, "runtime/nx_tier.nx" as *u8, "hot(mmap/NVMe) vs cold(compressed); nx_im4_compact_gate" as *u8, acc) 27 isc_row("segment-merge-queue " as *u8, "runtime/_hdl_build/nx_merge_queue.nx" as *u8, "background merge of immutable segments" as *u8, acc) 28 isc_row("measured-exceed no-wave law " as *u8, "runtime/_hdl_build/nx_infomgmt_exceed.nx" as *u8, "claim exceed ONLY where measured; fabrication liar-killed (the anti-overclaim discipline)" as *u8, acc) 29 isc_row("pagerank authority signal " as *u8, "runtime/nx_pagerank.nx" as *u8, "link-authority for BETTER ranking (built+gated 4/4 this session; scale-run on NAS)" as *u8, acc) 30 isc_row("MIGRATION-PROOF (byte-artifact)" as *u8, "runtime/nx_index_migrate_gate.nx" as *u8, "PROVEN 5/5: built hw-A -> save -> migrate(copy to hw-B) -> load -> BYTE-IDENTICAL query; endian/word-size pinned (i64 LE NXINV); portable laptop->NAS->cluster->sovereign-silicon" as *u8, acc) 31 isc_row("posting-list compression " as *u8, "runtime/nx_posting_compress.nx" as *u8, "PROVEN 4/4: lossless delta+bit-pack 256-blocks -> ~13x on dense lists (~2 bits/posting vs 32); SIMD/roaring later" as *u8, acc) 32 isc_row("block-max-WAND top-k prune " as *u8, "runtime/nx_blockmax_wand.nx" as *u8, "PROVEN 4/4: EXACT top-k (== exhaustive) while scoring fewer docs -> skip whole blocks by max-score (composes 256-doc blocks); query-speed lever" as *u8, acc) 33 isc_row("sharded scatter-gather query " as *u8, "runtime/nx_shard_query.nx" as *u8, "PROVEN 3/3: scatter-gather top-k == single-index (EXACT, cross-shard winners); horizontal read path (network fan-out on NAS/cluster)" as *u8, acc) 34 isc_row("write-read decoupling " as *u8, "runtime/nx_index_wr_decouple.nx" as *u8, "PROVEN 4/4: reader pinned to a generation is UNAFFECTED by concurrent writes (snapshot isolation) -> NAS ingests continuously while the site serves" as *u8, acc) 35 36 gw("\n -- BUILD-TARGETS: 0 remaining on the laptop-buildable CAPABILITY layer; NEXT = the NAS SCALE-RUN (measure at Common-Crawl scale) --\n" as *u8) 37 38 let permil: i64 = (acc[1]*1000)/acc[0] 39 gw("\n=== index-scale substrate: " as *u8); gn(acc[1]); gw("/" as *u8); gn(acc[0]); gw(" structural-present = " as *u8); gn(permil); gw(" permil ===\n" as *u8) 40 gw("HONEST (no-wave): 1000permil = all 12 CAPABILITIES built + gated on representative data. It does NOT mean 'we out-index Google/Mojeek' -- the at-scale RUN (billions of pages) + the head-to-head MEASUREMENT are the NAS step, still ABSENT until measured.\n" as *u8) 41 gw("MIGRATABILITY EDGE: offset-based + endian-defined + MAGIC-versioned = a portable byte artifact, no JVM/OS lock-in -> migrates laptop->NAS->cluster->sovereign-silicon. MEASURED 5/5 by nx_index_migrate_gate -- a real differentiator vs JVM-bound Lucene/ES.\n" as *u8) 42 sys_exit(0); return 0 43}