Skip to content

Commit

Permalink
Move management information
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Nov 4, 2023
1 parent 8745513 commit fc80847
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 52 deletions.
47 changes: 38 additions & 9 deletions docs/internals/RDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,44 @@ Viam’s Robot Development Kit (RDK) is the [open-source](https://github.com/via

## `viam-server`

_viam-server_ is responsible for:

- All {{< glossary_tooltip term_id="grpc" text="gRPC" >}} and {{< glossary_tooltip term_id="webrtc" >}} communication
- Connecting robots to the cloud
- Loading and managing connections to hardware [components](/components/)
- Running built-in [services](/services/)
- Loading and interfacing with {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}} provided by {{< glossary_tooltip term_id="module" text="modules" >}}.
- Managing configured processes
- Connecting to other parts of your robot
_viam-server_ manages {{< glossary_tooltip term_id="resource" text="resources" >}}:

### Communication

`viam-server` handles all {{< glossary_tooltip term_id="grpc" text="gRPC" >}} and {{< glossary_tooltip term_id="webrtc" >}} communication for connecting robots to the cloud or for connecting to other parts of your robot.

### Dependency Management

Modular resources may depend on other built-in resources or other modular resources, and vice versa.
The Viam RDK handles dependency management.

### Start-up

`viam-server` ensures that any configured {{< glossary_tooltip term_id="module" text="modules" >}}, {{< glossary_tooltip term_id="resource" text="built-in resources" >}} and {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, and processes are loaded on startup.

After start-up, `viam-server` manages:

- the configured processes,
- the connections to hardware,
- the running services, and
- the {{< glossary_tooltip term_id="module" text="modules" >}} that provide the {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}.

### Reconfiguration

When you change the configuration of a smart machine, `viam-server` automatically synchronizes configuration to your robot and updates the running resources.
This means you can add, modify, and remove a modular resource instance from a running robot.

### Logging

Log messages written appear under the [**Logs** tab](/manage/fleet/robots/#logs) for the smart machine running the module.

### Data management

Data capture for individual components is supported on [certain component subtypes](/services/data/configure-data-capture/#configure-data-capture-for-individual-components).

### Shutdown

During robot shutdown, the RDK handles modular resource instances similarly to built-in resource instances - it signals them for shutdown in topological (dependency) order.

## Next Steps

Expand Down
10 changes: 6 additions & 4 deletions docs/manage/fleet/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,16 @@ If you edit a config while someone else edits the same config, the person who sa
Before editing a config, we recommend you refresh the page to ensure you have all the latest changes.
{{< /alert >}}

When you or your collaborators change a robot's configuration, the robot will automatically reconfigure itself within 15 seconds.
You can see configuration changes made by yourself or by your collaborators on the [History tab](robots/#history).
You can also revert to an earlier configuration from the History tab.

{{< alert title="Tip" color="tip" >}}
For some configuration aspects you may require physical access to the robot so you can see how components are connected.
{{< /alert >}}

#### Reconfiguration

When you or your collaborators change a robot's configuration, the robot will automatically reconfigure itself within 15 seconds.
You can see configuration changes made by yourself or by your collaborators on the [History tab](robots/#history).
You can also revert to an earlier configuration from the History tab.

### Package deployment

_Coming soon._
Expand Down
4 changes: 3 additions & 1 deletion docs/modular-resources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Viam provides built-in support for a variety of {{< glossary_tooltip term_id="re
- High-level functionality exposed as {{< glossary_tooltip term_id="service" text="services" >}}.

If the {{< glossary_tooltip term_id="component" text="component" >}} or {{< glossary_tooltip term_id="service" text="service" >}} you want to use for your project is not natively supported, you can use _{{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}_ from [the Viam Registry](#the-viam-registry) or [create your own modular resources](#create-your-own-modular-resources).
You configure and manage modular resources the same way as built-in resources and use the same [standardized APIs](/program/apis/).

You configure modular resources same way as built-in resources and use the same [standardized APIs](/program/apis/).
`viam-server` manages dependencies, start-up, [reconfiguration](/manage/fleet/#reconfiguration), and [data management](/services/data/configure-data-capture/#configure-data-capture-for-individual-components) and shutdown.

## The Viam Registry

Expand Down
38 changes: 0 additions & 38 deletions docs/modular-resources/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,41 +73,3 @@ For example:
It implements the custom API `viam-labs:service:audioout`.

The `viam` namespace is reserved for models provided by Viam.

## Management

The Robot Development Kit (RDK) `viam-server` provides automatically manages modular resources to function like built-in resources:

### Logging

You can configure your module to write log messages to the Viam app.
Log messages written to the app appear under the **Logs** tab for the smart machine running the module.
See [Configure logging](/modular-resources/create/#configure-logging) for more information.

### Dependency Management

Modular resources may depend on other built-in resources or other modular resources, and vice versa.
The Viam RDK handles dependency management.

### Start-up

The RDK ensures that any configured modules are loaded automatically on start-up, and that configured modular resource instances are started alongside configured built-in resource instances.

### Reconfiguration

When you change the configuration of a Viam robot, the behavior of modular resource instances versus built-in resource instances is equivalent.
This means you can add, modify, and remove a modular resource instance from a running robot as normal.

### Data management

Data capture for individual components is supported on [certain component subtypes](/services/data/configure-data-capture/#configure-data-capture-for-individual-components).
If your modular resource is a model of one of these subtypes, you can configure data capture on it just as you would on a built-in resource.

### Shutdown

During robot shutdown, the RDK handles modular resource instances similarly to built-in resource instances - it signals them for shutdown in topological (dependency) order.

### Modular resources as remotes

[Remote](/manage/parts-and-remotes/) parts may load their own modules and provide modular resources, just as the main part can.
This means that you can compose a robot of any number of parts running in different compute locations, each containing both built-in and custom resources.

0 comments on commit fc80847

Please sign in to comment.