Tracing the lineage: how every Gold concept lives on in Xudanu
Udanax Gold was a C++ implementation of the Xanadu hypertext system, in active development from 1988 through 1995, and released as open source in 1999. It contained the accumulated wisdom of decades of thinking about how documents should connect: the O-tree, clubs, transclusion detection, canopy trees, the GrandMap, and the lock hierarchy.
Xudanu is a Rust based implementation of Udanax Gold, migrated from the released C++ code base. Every Gold subsystem was reviewed, mapped, and rebuilt with modern tools. This page traces each Gold concept to its Xudanu descendant, so you can see exactly what survived and what evolved.
The Gold architecture was organized around the Fe/Be (Frontend/Backend) split. Xudanu preserves this conceptual separation but collapses it into a single server process with a WebSocket API.
Gold layers (amber, purple) are preserved concepts. Enhanced layers (blue, red) use modern technology. Green is entirely new.
The O-tree (orgl tree) is Gold’s persistent splay tree for storing edition content. It was the heart of the system — a structure that could represent infinitely large documents, splay arbitrary regions to the root, and share structure across versions.
orootx.hxx, loavesx.hxx
Loaves auto-split at tableSegmentMaxSize (16384). Nine-case splay transformation. DspLoaf for lazy displacement. OPartialLoaf with TrailBlazer. Splay restructures tree so any region is near the root.
src/edition/orgl.rs
Loaf enum: Leaf or Split. Auto-splits at 16384 (matching Gold). Full 9-case splay algorithm ported. Loaf::Dsp for lazy transforms. Infinite domains via default + tombstone entries. 22 O-tree tests passing.
nkernelx.hxx, brange3x.hxx
Editions wrap an OrglRoot. FeRangeElement hierarchy: DataHolder, Edition, PlaceHolder, Label, IDHolder, Work. BeCarrier pairs element + optional label. Infinite-domain support via default entries.
src/edition/edition.rs
RangeElement enum: Data, Text, Edition, Label, PlaceHolder, Work, WorkRef, EditionRef. Carrier pairs element + optional label. Same infinite-domain semantics. fetch(), with(), without(), replace() use structural sharing via O-tree.
nkernelt.cxx ported and passing.
grandmapx.hxx
Bidirectional mapping: BeId ↔ BeRangeElement. assignID() registers content. fetch() retrieves by ID. IDSpace::global() / IDSpace::unique() for ID allocation. Counter / BatchCounter for preallocating ranges.
src/edition/grand_map.rs, src/edition/content_pool.rs
Same bidirectional mapping. Enhancement: ContentPool adds BLAKE3 content addressing — find_by_content() hashes content and returns existing ID if already stored. This means identical content is stored exactly once (Rule 8).
nkernelx.hxx
Clubs are identity groups. Club IS a Work (inheritance). ClubDescription contained a Set of member clubs — recursive membership. sponsor(IDRegion) was separate from read/edit. historyClub controlled revision access.
src/server/club.rs
Club contains a Work internally (composition). Personal clubs with Ed25519 keypairs. read_club, edit_club, default_read_club, default_edit_club. Enhancement: Encrypted signing keys (Argon2id + ChaCha20-Poly1305). OAuth login (GitHub, Google).
historyClub concept is not yet separate — anyone with read access can see history. Sponsor clubs are not yet implemented.
Gold’s lock system was a brilliant hierarchy of authentication mechanisms. Every lock type had a matching LockSmith that created it and a credential that opened it. Xudanu preserves the full hierarchy.
The backfollow engine was Gold’s crown jewel: given a piece of content, find every document that contains it, anywhere in the system. This is what makes transclusion visible — you can trace where content has been reused.
backfollx.hxx, recordrx.hxx
Recorder registered persistent queries. Fossil accumulated results over time. Matcher compared fingerprints. TrailBlazer resolved lazy placeholders. transcluders(), works(), rangeTranscluders().
src/edition/backfollow.rs
Synchronous in-memory engine. TransclusionIndex maps BeId → works containing it. find_transcluders, find_works_for_content wire ops. BLAKE3 fingerprinting for content matching. Enhancement: Real-time WebSocket push of transclusion results.
Gold used canopy trees (BertCanopy and SensorCanopy) as balanced binary indices over edition content. They enabled fast filtering of transclusion queries — instead of scanning every position, the canopy pruned the search space.
canopyx.hxx
Bert flags tracked which content fingerprints appeared in subtrees. Sensor flags tracked which positions had specific properties. Flag propagation up the tree enabled O(log n) filtering.
src/edition/canopy.rs
Rc<RefCell<>> balanced binary tree with flag propagation. BertProp / SensorProp flag sets. Endorsement bit allocation. Flag-based filtering on transclusion queries. Fully tested with Gold scenarios.
Parallel to the O-tree, Gold maintained an H-tree (history tree) that tracked version information for every position. When content was transcluded from one document to another, the H-tree recorded the provenance. This was essential for backfollow — the H-tree is what let Gold trace content reuse backward through version history.
htreex.hxx
H-tree paralleled the O-tree. HUpperCrumData stored delayed backfollow walks. When new content was inserted, the H-tree recorded where it came from, enabling recursive transclusion tracking.
src/edition/htree.rs
H-tree with delayed_store_backfollow walk. Integrated with canopy for transclusion queries. Records provenance on insert. Enables again()-style recursive transclusion chains.
nkernelx.hxx
Work holds current edition + revision history. revise() creates new edition. history() returns past editions. Clubs for read/edit. Sponsors for vouching.
src/server/server.rs
Same model: current edition + history. work_revise, work_fetch_edition, work_fetch_history. Enhancement: CRDT collaborative editing (multiple users, same work, real-time sync). Version genealogy API (version_is_before, version_ancestors).
Gold had a rich algebra of position spaces: Integer, Real, Sequence (tumblers), Cross (multi-dimensional), Filter. Each space had positions, regions, displacements, and orderings. This was the mathematical foundation for addressing within documents.
spacex.hxx, integerx.hxx, sequencex.hxx, crossx.hxx
Generic Position/Region/Dsp hierarchy. SequenceSpace had full tumbler addressing (variable-length integer tuples like 1.2.3.4). CrossSpace supported multi-axis coordinates for endorsements.
src/space/
Circular associated types replace C++ inheritance. IntegerSpace, RealSpace, SequenceSpace, CrossSpace2, FilterSpace, SimpleMapping, CompositeMapping. 74 space tests passing.
Gap: No full tumbler addressing yet. SequenceSpace uses Vec<i64> without hierarchical prefix queries.
linkx.hxx
Bidirectional links. HyperRef::Single and MultiRef for multi-ended. Link type sets. Named ends. Endorsed wrappers. endNames() returned SequenceRegion.
src/edition/link.rs
Bidirectional links tracked in both directions. Single and Multi refs. Excerpt field on Single. Gap: No link type sets or named ends yet. Span-level targeting not yet exposed in protocol.
packerx.hxx, turtlex.hxx, urdix.hxx
Full disk abstraction: shepherds mapped to disk blocks (snarfs). Object-level persistence granularity. Purger evicted clean objects. Agenda persisted deferred work. Turtle was the root persistent object.
src/persist/
BLAKE3 content-addressed .xchunk files in hex-sharded directories. WAL + dual manifest slots + atomic checkpoints. LRU cache. Different from Gold: Simpler, more robust, but lacks Gold’s object-level persistence granularity.
src/persist/snarf.rs and tested, but the production server uses the chunk store.
binary2.hxx, promanx.hxx
Custom binary protocol with humber encoding. 470+ numbered request handlers. Portal for bidirectional channels. Recipe for message construction. Negotiator for version negotiation. BootPlan for connection setup.
src/server/transport/
140+ operation codes. Dual codec: JSON (human-readable) and binary (postcard). WebSocket transport (ubiquitous). CSRF tokens. Heartbeats. Handshake response with version negotiation. Enhancement: Browser-native, no custom client needed.
Every Gold type, module, and concept mapped to its Xudanu equivalent:
| Udanax Gold (C++) | Xudanu (Rust) | Status | Notes |
|---|---|---|---|
OrglRoot / Loaf | OrglRoot / Loaf | Done | Full 9-case splay algorithm ported |
FeEdition / BeEdition | Edition | Done | Wraps OrglRoot, structural sharing |
XnRegion / IntegerRegion | XnRegion / IntegerRegion | Done | Transition-array encoding preserved |
FeRangeElement hierarchy | RangeElement enum | Done | Data, Text, Edition, Label, PlaceHolder, Work |
BeCarrier | Carrier | Done | Element + optional label |
BeGrandMap | GrandMap + ContentPool | Enhanced | BLAKE3 content addressing added |
FeWork | Work | Enhanced | CRDT collaborative editing |
FeClub | Club | Enhanced | Ed25519 keys, OAuth, encrypted at rest |
FeKeyMaster | KeyMaster | Done | Authority accumulation |
| Lock hierarchy | Lock trait + 5 locks | Done | Boo, Wall, Match, Challenge, Multi |
FeSession | Session | Done | Connection context |
FeServer | Server | Done | All ops as permission-checked methods |
BackfollowEngine | BackfollowEngine | Done | BLAKE3 fingerprint matching |
RecorderFossil | TransclusionIndex | Done | Persistent transclusion index |
BertCrum / SensorCrum | BertCanopy / SensorCanopy | Done | Flag propagation preserved |
HistoryCrum / H-tree | HUpperCrumData / H-tree | Done | Version tracking for backfollow |
HyperLink / HyperRef | HyperLink / HyperRef | Done | Bidirectional, Single + Multi refs |
SequenceSpace (tumblers) | SequenceSpace | Partial | No hierarchical tumbler addressing |
CrossSpace | CrossSpace2<A,B> | Partial | 2D generic, no higher dimensions |
FilterSpace | FilterSpace | Partial | Tag-based, not region comparison |
IntegerSpace / RealSpace | IntegerSpace / RealSpace | Done | Transition arrays, flip model |
SimpleMapping / CompositeMapping | SimpleMapping / CompositeMapping | Done | Position transformations |
SnarfPacker / Turtle | Chunk store + WAL | Different | Content-addressed, simpler approach |
Urdi (disk I/O) | UrdiFile | Done | File-backed, guard records |
Counter / BatchCounter | Counter / BatchCounter | Done | ID pre-allocation |
Abraham (persistence) | Persistent trait | Done | flock_id, to_bytes, type_tag |
Cookbook / Recipe | TypeRegistry | Done | HashMap<tag, deserializer> |
FeAdminer | AdminState | Done | Accept/reject, shutdown, grants |
FeFillDetector | Detector trait | Done | Callback-based events |
PlaceHolder / FillDetector | PlaceHolder variant | Partial | No fill detection, no template slots |
Agenda / AgendaItem | — | Not yet | Persistent task queue planned |
ClubDescription recursive membership | Flat membership | Not yet | Clubs can't contain clubs |
Work::sponsor() | — | Not yet | Sponsor clubs planned |
historyClub | — | Not yet | History access = read access |
| Binary2 over TCP | WebSocket JSON + Binary | Enhanced | Browser-native, dual codec |
XuPromise (lazy eval) | Synchronous Result | Simplified | Adequate for WebSocket model |
| # | Rule | Status |
|---|---|---|
| 1 | Every document consists of arbitrarily many portions | DONE |
| 2 | Every portion can be transcluded | PARTIAL |
| 3 | Permission is required to transclude | DONE |
| 4 | Permission is required to quote | DONE |
| 5 | Tumbler addressing | PARTIAL |
| 6 | Bidirectional links | DONE |
| 7 | Links visible from all endpoints | DONE |
| 8 | Identical content stored once | DONE |
| 9 | Royalty at any granularity | PARTIAL |
| 10 | Mix of royalty-bearing and free content | DONE |
| 11 | Data available from any server | PARTIAL |
| 12 | Connection by any protocol | DONE |
| 13 | Adaptive storage tiering | PARTIAL |
| 14 | Redundant storage | PARTIAL |
| 15 | Charge users at any rate | PARTIAL |
| 16 | Handle any data type | PARTIAL |
| 17 | Portable front-end | DONE |