fabric ·nu.proxy

Any Nu fabric, across processes.

Bind a fabric on one process. Reach it from another. Same Refs, same calls, over TCP or a Unix socket.

Powered byinvisibles

See it.

Pair it with nu.mp or nu.cluster to spin the other process. Proxy hosts the fabric there and wires it back to your tree.

Any fabric, hosted in another process.

nu.proxy lets you host any fabric in another process. Your Nu tree flows the same way as if the fabric were right here.

Wrap it with the proxy provider and you are done. No boilerplate, no client to keep in sync.

two_procs.py
python · 16 locpy
import nu
# inside the spawned process: bind a fabric, expose it on a port
host_init = nu.With(
nu.Provide(nu.kv.RocksDBStorage, {"path": "/data/counters"}),
nu.Provide(nu.kv.Navigator, {}),
nu.Provide(nu.proxy.InvisiblesServer, {"target": nu.kv.Navigator, "address": "0.0.0.0:19000"}),
)
# driver: spawn the process, then reach its fabric as if it lived here
tree = nu.Provide(nu.mp.MpWorker, {"init": host_init},
nu.proxy.InvisiblesProxy(nu.kv.Navigator, address="0.0.0.0:19000",
bump, # any Nu body that touches Navigator now runs on the host
),
)
nu.arun(tree)

What you can do with it.

One fabric, hosted once, reachable from anywhere in your system.

shared service

Host a shared fabric.

Run a fabric as its own always-on service. Anyone else can attach and use it whenever they need to.

independent lifetime

Do not die with the main process.

The service lives on its own. Main app restarts, deploys, crashes — the hosted fabric keeps running with all its state intact.

anywhere

Local box or across a rack.

Same wrap, different address. The hosted service does not care where callers live, they just point at it.

Try Nu.

One command gets you the wheel with every fabric. Then follow the movies tutorial to build a real app in an afternoon.

01 Install

pip install "nustack-py[all]"

02 Run the demo

nu demo movies

03 Build your app

Browse examples

Like what you see?

The project is young. Star it, join the room, watch what we ship next.