Status Update: 2022-04-13 #22
Replies: 4 comments 9 replies
-
Design OverviewOur current design draft looks like this: The coordinator is responsible for reading the dataflow from a YAML file, verifying it, and deploying the operators to the specified or automatically determined machines. It monitors the operator's health and implements high level cluster management functionality. For example, we could implement automatic scaling for cloud nodes or operator replication and restarts. The coordinator can be controlled through a command line program (CLI). Dora provides its main functionality through an API, ideally for multiple languages. Operators communicate through a shared communication layer, which will be zenoh in the first iteration. However, we will design dora in a way that makes it easy to use different communication layers in the future. All communication layers should be robust against disconnections, so operators should be able to keep running even if they lose the connection to the coordinator. Light-weight and Heavy-weight OperatorsDora supports two types of operators: heavy-weight and light-weight operators. (The names are only placeholders for now.) Each heavy-weight operator is a separate, isolated process that communicates with other operators through the dora library. This operator type is for example useful for security-critical operators (isolation is important), resource-heavy operators (resources can be pinned to processes), or operators which need maximal control (e.g. for complex input rules). However, running each operator has a separate executable also has some drawbacks. For example, the isolation between operators comes with some overhead and not all features of dora are usable (e.g. no real-time support). For this reason, dora also supports so-called light-weight operators, organized into operators groups. Light-weight operators are cooperative, library-based components that are executed by a dora runtime process. Multiple formats are supported for light-weight operators, for example they can be implemented as a Python object, a WebAssembly module, or a traditional C-compatible shared library. The dora runtime links multiple light-weight operators (of the same operator group) together and executes them from a single, multi-threaded process. The full set of dora's features are available for light-weight operators, for example priority scheduling or native deadline support. |
Beta Was this translation helpful? Give feedback.
-
Dataflow SpecificationDataflows are specified through a YAML file. This section presents our current draft for the file format. It only includes basic functionality for now, we will extend it later when we introduce more advanced features. Run OperationFor heavy-weight operators (see #22 (comment)), we plan to specify the executable name and arguments like a normal shell operation: operators:
- run: path/to/executable arg1 arg2
env:
- ENVIRONMENT_VARIABLE_1: true
working-directory: some/path
inputs: # ...
outputs: # ... This way, we stay close to popular continuous integration (CI) services such as GitHub Actions, so the format should already be familiar to many people. We haven't decided yet on a syntax for light-weight operators. Dataflow GraphEach operator has a separate namespace for its outputs. To refer to outputs, the Input operands are specified using the Exampleoperators:
# sources (only outputs)
- id: timer
name: Clock timer # optional, human-readable name
description: Send the time.
run: path/to/timer --interval 0.5
outputs:
- time
- id: camera-uuid-1
name: Front camera
run: camera --id camera_id
outputs:
- image
- metadata
- id: camera-uuid-2
name: Front camera
run: camera --id camera_id
outputs:
- image
- metadata
# actions (inputs and outputs)
- id: timestamp
description: Add a watermark on the camera.
run: path/to/timestamp
inputs:
timestamp: timer/time
image: camera-uuid-1/image
outputs:
- image # with timestamp watermark
# sinks (only inputs)
- id: logger
description: Sink the data into the logger.
run: path/to/logger --target-dir /foo/bar
inputs:
image: timestamp/image
camera: camera-uuid-2/metadata Visualizedflowchart TB
timer[\timer/]
camera[\camera/]
timestamp
logger[/logger\]
camera -- image as pic --> timestamp
timer -- time as timestamp --> timestamp
timestamp -- image as data --> logger
timer -- time --> logger
Integration with ROS 1/2To integrate dora-rs operators with ROS1 or ROS2 operators, we plan to provide special bridge operators. These operators act as a sink in one dataflow framework and push all messages to a different dataflow framework, where they act as source. For example, we plan to provide a |
Beta Was this translation helpful? Give feedback.
-
Pylot AdvancementAddedCARLA bridge
Detection
Planning
Visualisation
Deployment
Those implementation are currently committed into #18. Changed
Fixed
|
Beta Was this translation helpful? Give feedback.
-
State ManagementDuring our status meeting, we have lots of discussion around state management, and also stateless and stateful operators. Operator state basically is its local running context (e.g. local variables). For stateless operator (we can view operator as a function f ), state is irrelevant, y = f(x); for stateful operator, state needs to be part of operator function, y=f(x, s). For stateless operator, y = f(x), the same input x always produce the same output y. Since there is no state, there is no state management. This removes lot of complexity around state management, which is also why majority of the commercial FaaS service is stateless serverless functions. For stateful operator, y = f(x, s), the same input x may not produce the same output y, which also depends on operator state (its context). In dora-rs, we have a few cases around state management:
Another key concept for state management is state sharing, e.g. how to share the state (similar to global varibles) among operators, normally there are three alternatives:
Hopefully this short, high level description clarifies many confusion around state management. |
Beta Was this translation helpful? Give feedback.
-
In this discussion, we describe our recent progress and the main topics that we would like to discuss in today's meeting. We use a separate post for each topic to keep the discussion focused. Feel free to create new posts for topics that are not mentioned yet.
Beta Was this translation helpful? Give feedback.
All reactions