ansys / ansys/api-eigen-example
vector serialization does not take into account endianness
- Dominant language
- Python
- Stars
- 8
- Forks
- 0
- Avg merge
- 11h 54m
- Merged PRs (30d)
- 10
Description
The [gRPC protocol is defined](https://github.com/ansys/api-eigen-example/blob/108085fcaa860a9d1e27abbdc561c160a98e09e3/src/ansys/eigen/protos/grpcdemo.proto#L21) as sending over the bytes of arrays directly, but does not take into account endianness. This means the protocol will fail spectacularly (type 3 error, bad data with no error) if the client and server machines have different native endianness.
https://github.com/ansys/api-eigen-example/blob/108085fcaa860a9d1e27abbdc561c160a98e09e3/src/ansys/eigen/cpp/grpc/client/src/GRPCClient.cpp#L499
https://github.com/ansys/api-eigen-example/blob/108085fcaa860a9d1e27abbdc561c160a98e09e3/src/ansys/eigen/python/grpc/client.py#L280
Unless there is another reason, I recommend using gRPC arrays instead of bytes. gRPC can handle this for us.
Contributor guide
Assessment
This issue has not been assessed yet.