viam-server

At the core of Viam is the open-source viam-server executable which runs on a computer and manages hardware, software, and data for a machine. If you are working with microcontrollers, viam-micro-server is a lightweight version of viam-server which can run on resource-limited embedded systems that cannot run the fully-featured viam-server.

To use Viam with a machine, you create a configuration specifying which hardware and software the machine consists of. Viam has many built-in components and services that run within viam-server. The components and services are configurable building blocks you can put together to make your machine. viam-server then manages and runs the drivers for the configured hardware components and software services.

Overall, viam-server manages:

Communication

viam-server handles all gRPC and WebRTC communication for connecting machines to the cloud or for connecting to other parts of your machine.

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 modules, built-in resources and 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 modules that provide the modular resources.

Reconfiguration

When you or your collaborators change the configuration of a machine in the Viam app, viam-server automatically synchronizes the configuration to your machine and updates the running resources within 15 seconds. This means you can add, modify, and remove a modular resource instance from a running machine.

You can see configuration changes made by yourself or by your collaborators by selecting History on the right side of your machine part’s card on the CONFIGURE tab. You can also revert to an earlier configuration from the History tab.

Logging

Log messages written appear under the LOGS tab for the machine running the module.

Shutdown

During machine shutdown, viam-server handles modular resource instances similarly to built-in resource instances - it signals them for shutdown in topological (dependency) order.

Next steps

Have questions, or want to meet other people working on robots? Join our Community Discord.

If you notice any issues with the documentation, feel free to file an issue or edit this file.