ansys / ansys/api-eigen-example
vector serialization does not take into account endianness
- Lingua principale
- Python
- Stelle
- 8
- Fork
- 0
- Merge medio
- 11h 54m
- PR unite (30g)
- 10
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Iniziate dalla definizione referenziata di grpcdemo.proto e dai punti di serializzazione in src/ansys/eigen/cpp/grpc/client/src/GRPCClient.cpp e src/ansys/eigen/python/grpc/client.py. Confrontate la rappresentazione attuale basata su bytes con gli array gRPC e determinate il comportamento tra endianess diverse che deve essere preservato. Il lavoro è completato quando client e server con endianess native diverse scambiano dati vettoriali senza corruzione silenziosa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, grpc, python
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100