Skip to content

Yimo/feat/hosted - #3692

Draft
poorwym wants to merge 4 commits into
mainfrom
yimo/feat/hosted
Draft

Yimo/feat/hosted#3692
poorwym wants to merge 4 commits into
mainfrom
yimo/feat/hosted

Conversation

@poorwym

@poorwym poorwym commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

This PR introduces the basic API design for hosted support. It is an initial implementation intended to establish a foundation and is open for public discussion and further iteration. @spomichter @leshy

@github-actions github-actions Bot added the first-time-contributor PR opened by an author who had not previously committed to this repository label Aug 26, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we decided against multi language docs for now (since it adds maitenance burden and translation tools are so good)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll keep that in mind for next time. This PR isn't built for merge so the Chinese documentation was just there to help me think things through in Chinese.I will make sure this doesn't happen again.


The system has three related but separate concerns.

### Discovery plane

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep in mind, next to RPC, zenoh also offers distributed key/value store, but this is risky/complex so I think rpc for initial implementation is a responsible choice

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I noticed that some of the transports in the dimos are implemented using Zenoh as well.


This means the application can continue moving data if the controller exits
after startup, although the MVP may keep it alive to aggregate status and
coordinate shutdown.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think keepalive packets will be neccessary between coordinator and Host service(s)

if someone runs kill -9 on a laptop - remote system should notice that owning blueprint is down, and shutdown it's modules

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'll add that in just a bit

- Host presence disappears when its Zenoh liveliness token is lost;
- a descriptor is fetched from the live Host rather than trusted from a stale
retained value;
- discovery works through routers and gossip, not only local multicast;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3617

start from here (about to get merged) makes zenoh default across dimos

| `protocol_version`, `plan_schema_version` | Control and deployment-plan compatibility. |
| `dimos_version`, `application_revision` | Runtime and code compatibility. |
| `active_runs`, `leases` | Current occupancy and pending reservations. |
| `health`, `last_error` | Whether the Host can accept work and why not. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, later we can add even system metrics etc

MarkerDetectionStreamModule.blueprint(
marker_length_m=0.1,
camera_info=GO2Connection.camera_info_static,
).placement(tags={"gpu"}),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.placement is a weird word, maybe .remote ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes a lot of sense. The reason I used "placement" is because local execution can also serve as a placement location. But "remote" is definitely clearer semantically, so I'll change it to "remote".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe placement is a bad term, but remote is worse. How about "on_host" or "remote_host"?

| Cross-Host stream using shared memory | Rejected. |
| Other machine-local transports | Supported only when both endpoints are on the same Host. |

Keeping explicit shared memory for local image or point-cloud paths avoids a

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah now that we merge zenoh #3617 shm will be used automatically between local modules, so all blueprints will just be on zenoh and you won't have these issues

Comment thread dimos/spec/hosted.py

# Select one G1 Host and one GPU Host; navigation remains local.
multi_host_g1 = autoconnect(
unitree_g1.blueprint().placement(tags={"g1"}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick but dont like the word placement. maybe .hosted()

This proposal adds a thin distributed orchestration layer:

- Each execution device runs a small, persistent **Host service**.
- A Host joins a Zenoh fabric and advertises its generated identity, discoverable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a fabric?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Question. "Fabric" is a term in zenoh. It can be understood as a "logical data network" composed of Zenoh nodes, connections, routing, and key-expression namespaces.


This proposal adds a thin distributed orchestration layer:

- Each execution device runs a small, persistent **Host service**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably this would be a standalone Rust binary, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a standalone binary. I haven't decided on the language yet, but Rust sounds like a good choice!

Comment on lines +68 to +70
5. Reuse the current blueprint compiler, `ModuleCoordinator`, workers, module
lifecycle, and stream implementations on each machine.
6. Use Zenoh for streams that cross machine boundaries.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying that LCM would be supported on a machine, but for cross machine streams, Zenoh would be enforced?

I think it would be easier to just mandate Zenoh for everything for blueprints containing remote modules.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my document might not have been very clear. I actually mentioned elsewhere in it that LCM isn't enabled on hosted, meaning it doesn't reuse the existing LCM. All RPCs and streams go through Zenoh instead.

Comment on lines +75 to +76
10. Establish a foundation for discovering robot embodiments and other typed
hardware capabilities without making fleet replication part of the MVP.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this matter? I assume distributed modules are completely independent of what a particular module does (control a robot or not).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under the current design, machine capabilities rely entirely on manual tag annotation. For instance, if I tag a machine with GPU, it doesn't actually mean the hardware is there. This kind of manual convention isn't really the best practice, but during the MVP stage, we can go ahead and do it that way for now.

Later on, we will definitely need automated hardware discovery. Otherwise, if someone applies a GPU tag to a machine that doesn't actually have one, it's going to cause issues.


| Term | Meaning |
| --- | --- |
| Application | One logical blueprint graph that may span several Hosts. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this just be Blueprint?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem.

| Term | Meaning |
| --- | --- |
| Application | One logical blueprint graph that may span several Hosts. |
| Controller | The `dimos run` process that compiles, places, and coordinates an application. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Orchestrator?

Controller is a much more generic term and could be easily confused with many other things.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. It's a good idea.

| --- | --- |
| Application | One logical blueprint graph that may span several Hosts. |
| Controller | The `dimos run` process that compiles, places, and coordinates an application. |
| Host | One advertised execution service. Usually one per machine, although several may sit behind one router or even share a machine. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Host is an incredibly overloaded term. I much prefer rarer terms because we can imbue them with precise meanings for our system.

I'm not sure what to propose as an alternative though. Node or runner are too generic as well...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "outpost"? :)

It definitely gives out the meaning of "something that's lightweight and waits for you to use it".

runtime; it is a discoverable supervisor that creates and controls an existing
local runtime.

## Terminology

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You haven't defined the most important term: fabric. :)

### Discovery plane

Hosts advertise live execution capacity on Zenoh. The controller first joins a
fabric, observes live Host identities, and queries their descriptors. A Zenoh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can two different controllers place modules on the same host? How do we deal with this? Or should it be left for later?

| `host_id`, `name`, `epoch` | Stable identity, display, and current process incarnation. |
| `tags` | Opaque placement labels configured by the user or a capability provider. |
| `capabilities` | Structured hardware facts, such as robot model/serial, GPU type, architecture, and attached devices. |
| `resources_total`, `resources_available` | CPU, memory, accelerators, deployment slots, and other schedulable capacity. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this for the first version. We don't even have detailed resource usage requirements for the modules yet (though we've talked about it).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is just very easy to log and nice to have but optional

Comment on lines +357 to +359
- A module with no placement metadata has a soft preference for the controlling
machine, preserving current behavior.
- `.placement(local=True)` can express a hard local constraint when needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed. Local should be the default.

Comment on lines +399 to +401
Unconstrained modules stay local unless merging a module-reference co-location
unit with an explicitly placed module forces them onto that module's Host. The
placement explanation should make this inheritance visible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the unless part. Unconstrained modules should always be local, right?

Comment on lines +508 to +509
> A module and every module reference it consumes must belong to the same
> placement unit and resolve to the same Host.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is quite limiting. I would have assumed doing RPC across hosts would be easy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true this is a good catch, Zenoh gives us RPC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor PR opened by an author who had not previously committed to this repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants