Skip to content

Using iceoryx2 as default UTransport #319

@sophokles73

Description

@sophokles73

We currently use protobuf to define service interfaces and types. The protobuf compiler generates code that does not know anything about iceoryx2's ZeroCopySend trait and it seems impossible to simply implement the trait on the generated types, because they heavily rely on types that are not ZeroCopySend like std::string::String.

The current UTransport API relies on the UMessage type which contains a byte array as the payload. The byte array is expected to contain a well-defined serialization of the data, e.g. UTF-8 encoded JSON or a protobuf, indicated by the payload format header field. While this allows for a lot of flexibility in supported data types, it does not fit the intended zero-copy approach very well.

In an attempt to simply optimize for intra-node communication, we might want to add variants of the L2-APIs that are generic over a payload type that is ZeroCopySend.

This would, however, raise some questions when it comes to user-experience and cross-language interoperability:

  1. How does this fit with using protobuf as the IDL for defining service interfaces? Can we provide a blanket implementation for ZeroCopySend for protobuf::Message? Or do we need to build our own code generators?

  2. If so, would it make sense to use an IDL like Franca that is already being used in the automotive domain for such use cases? However, building and maintaining our own code generators will be quite an effort, if we intend to support anything beyond Rust only.

  3. If we use ZeroCopySend types for intra-node communication, what would be the data serialization format for inter-node communication? Can we simply map the ZeroCopySend types into a byte array and send it over whatever transport we want to use, similar to what we already do today in a UTransport?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions