ansys / ansys/api-eigen-example
vector serialization does not take into account endianness
- 主要言語
- Python
- スター
- 8
- フォーク
- 0
- 平均マージ
- 11時間 54分
- マージ済み PR(30日)
- 10
説明
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.
コントリビューションガイド
調査の方向性
参照されている grpcdemo.proto の定義と、src/ansys/eigen/cpp/grpc/client/src/GRPCClient.cpp および src/ansys/eigen/python/grpc/client.py のシリアライゼーション箇所から始めてください。現在の bytes ベースの表現と gRPC 配列を比較し、維持すべき異なるエンディアン間の動作を明らかにしてください。クライアントとサーバーがネイティブエンディアンの違いに関係なく、暗黙の破損なしにベクトルデータを交換できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, grpc, python
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100