Status Update: 2022-08-31 #77
Replies: 3 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Investigating Operators |
Beta Was this translation helpful? Give feedback.
-
Dora CoreSupport for Windows and macOS
New higher-level shared library API for operatorsAll types that pass the FFI-boundary between the runtime and operators compiled as shared libraries must be FFI-safe. One requirement for that is that the types have a specified layout in memory. As a result, we cannot use most of Rust's higher-level types and have to use raw pointers instead. Previously, we defined this raw pointer API manually, which resulted in quite complex code. It was difficult to add new fields such as additional metadata. It was also difficult to maintain because we had to manually verify that the Rust API crate, the C header file, and the runtime stayed in sync. To improve this situation, we rewrote the operator API in the past two weeks based on the We also created a separate sub-crate to hold all the type information. This way, we can reuse the same definitions in the operator API and the runtime, thereby preventing dangerous type mismatch errors. We also autogenerate a C-header file based on these definitions to improve safety for operators written in C as well. Plan: Use Iceoryx to improve IPC performanceRight now we use Iceoryx implements zero-copy IPC by passing messages via shared memory. The memory is handled by a central deamon, which makes it possible to send a message to multiple receivers without copying. Like zenoh, iceoryx provides a publish/subscribe-based interface, so the migration should be fairly simple. If the iceoryx implementation turns out to be significantly faster, we will try to create a hybrid communication layer next. The idea is to select the communication backend based on the receiver's location. This would allow us to automatically use iceoryx for local nodes, while still supporting communication with remote nodes through Plan: Switch communication to synchronous APIAsynchronous Rust still has some rough edges. For example, the ecosystem is split between different async runtimes and the language is still missing support for async functions in traits. This leads to some additional complexity in our communication layer code and makes it more difficult to add support for other backends (e.g. iceoryx or mqtt). Because of this we decided to convert the communication layer trait to a synchronous trait for now. We don't expect that this will affect performance much. Making the communication layer synchronous also affects the Rust node API, which features an asynchronous input stream right now. Our current plan is to migrate to a channel-based interface instead. The operator interface and the node interface for other nodes is already synchronous, so no changes are expected there. |
Beta Was this translation helpful? Give feedback.
-
Status Update! 🚀
Beta Was this translation helpful? Give feedback.
All reactions