On this page

Frame boundaries: isolated worlds๏ƒ

Advanced. Hard isolation walls inside a single interpreter.

Everything so far has lived in one aetheric frame โ€” the default world. A frame is the outermost boundary in Melder: it owns its own conduits, registries, control plane, and dynamic posture. Name a different one and you get a second world that shares nothing with the first:

tenant_a = md.Spellbook(aetheric_frame="tenant-a")
tenant_b = md.Spellbook(aetheric_frame="tenant-b")

Bind a distinct class in each world โ€” a subclass per tenant is enough. A spell ID is the SHA256 of the registered object's code (its methods, constructor, class-level values and bases), with nothing from the bind call in it, and spell IDs are unique across the process: the same class bound in another frame is the same spell, and it is refused whatever binding_name or spellframe it gets. A unique spell is a singleton per frame โ€” not per process. Two classes, two frames, two instances, one interpreter. To register one class in several worlds instead, turn process_wide_unique_spell_ids off in the Aether configuration before the first frame exists; spell IDs are then unique per frame.

That makes frames the natural seam for multi-tenancy, plugin isolation, and test isolation (a fresh frame per test is a fresh world). Conduits link within a frame; they do not link across one โ€” the wall is real.

Don't confuse the two "frames": spellframe= is an address key that categorizes spells inside a world. aetheric_frame= is the world itself.

Three widths of category๏ƒ

Once you see it, the same idea repeats at three scales โ€” each one a wider boundary than the last:

Scale

Categorizes

Owner

spellframe

Spells within one world

The book that bound them

Conduit

Worlds of resolution, linked by contract

Each conduit owns its category

aetheric_frame

Entire isolated worlds

The frame itself

Pick the narrowest one that expresses what you mean. Most systems need only the first; large ones grow into the second; the third is for genuine isolation.

Runnable examples๏ƒ

All advanced examples ยท Level contents ยท Full contents

Canonical page source