Skip to content

Conversation

@drewnoakes
Copy link
Member

@drewnoakes drewnoakes commented Dec 7, 2023

This .proto file defines a contract between the server Aspire.Hosting and client Aspire.Dashboard.

It supports:

  • Getting basic information about the server (name and version).
  • Subscribing to resources, receiving both an initial snapshot and a stream of updates as they happen.
  • A heartbeat mechanism, to detect when the connection has dropped and allow prompting the user and/or reconnecting.
  • Support for arbitrary kinds of resources. Not limited to known types (project, container, executable).
  • Support for arbitrary commands on resources, intended for actions such as start/stop/refresh/restart/etc. The server defines the commands available for each resource, and the UI can show them.

It's added to both the server and client projects, and code generation is enabled.

This `.proto` file defines a contract between the server `Aspire.Hosting` and client `Aspire.Dashboard`.

It supports:

- Getting basic information about the server (name and version).
- Subscribing to resources, receiving both an initial snapshot and a stream of updates as they happen.
- A heartbeat mechanism, to detect when the connection has dropped and allow prompting the user and/or reconnecting.
- Support for arbitrary kinds of resources. Not limited to known types (project, container, executable).
- Support for arbitrary commands on resources, intended for actions such as start/stop/refresh/restart/etc. The server defines the commands available for each resource, and the UI can show them.

It's added to both the server and client projects, and code generation is enabled.
Turns out gRPC runs over HTTP/2 which includes a keep alive ping. We don't need to model those messages in our API thankfully.
@drewnoakes
Copy link
Member Author

drewnoakes commented Dec 7, 2023

gRPC uses HTTP/2 which has an option for keepalive pings, so we don't have to build heartbeats into the protocol, thankfully.

@drewnoakes drewnoakes force-pushed the add-resource-server-proto branch from 5620dd1 to b834d50 Compare December 10, 2023 10:43
@drewnoakes drewnoakes force-pushed the add-resource-server-proto branch from 8921150 to 00c1d9b Compare December 12, 2023 01:17
These have different fields.
This allows opening the file more conveniently, and the file to participate in find-in-files.
@drewnoakes
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@drewnoakes drewnoakes merged commit bc220e3 into dotnet:main Dec 15, 2023
@drewnoakes drewnoakes deleted the add-resource-server-proto branch December 15, 2023 22:38
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants