From bed3362a67ac705b4b99d8a281046a5c48b0088b Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 21 Mar 2022 13:56:51 +0100 Subject: [PATCH] Adding Python API design README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7e3e47b3..8e939cf0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ # dora-rs Dataflow Oriented Robotic Architecture + +## Python API Design + +The Python API is probably going to look as follows: +```python +@register +async def function_name(state: DoraState, message: DoraMessage): + return outputs +``` + +The philosophy is to use async function as primary instance to: +- Mitigate the risk of running undafe data mutations. +- Managing several run at the same time with timeout / deadline capabilities +- Using Tokio Spawn to avoid thread locks on CPU bound runs.