ansys / ansys/api-eigen-example

vector serialization does not take into account endianness

Đang mở
#53 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
C++ gRPC Python
Ngôn ngữ chính
Python
Star
8
Fork
0
Merge trung bình
11 giờ 54 phút
Pull request đã merge (30 ngày)
10

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với định nghĩa grpcdemo.proto được tham chiếu và các điểm tuần tự hóa trong src/ansys/eigen/cpp/grpc/client/src/GRPCClient.cpp và src/ansys/eigen/python/grpc/client.py. So sánh biểu diễn hiện tại dựa trên bytes với các mảng gRPC và xác định hành vi giữa các thứ tự byte khác nhau cần được bảo toàn. Công việc được hoàn thành khi các client và server có thứ tự byte gốc khác nhau trao đổi dữ liệu vector mà không xảy ra hỏng dữ liệu âm thầm.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp, grpc, python
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.