danielgtaylor / danielgtaylor/python-betterproto
unary_stream message issue
- Vorherrschende Sprache
- Python
- Sterne
- 1.8k
- Forks
- 234
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I'm currently facing the issue that a unary_stream connection does not behave as I would expect. (betterproto version b5)
## Client code:

## Server code:


Opening the connection works fine, the server receives the request and begins its job.
The task the server performs is taking 1 min +/-, during that time it sends multiple responses to the client.
While debugging I could see that subroutines have been executed and sending data (server side).
But nothing arrives at the client, the red X located at the client if statement is a breakpoint that never executes until after the server method returns. If I breakpoint the server at its last statement (red X) the client is idle. Only after continuing, allowing the server to complete the method (closing the connection?), within the client program the subroutines trigger:

All messages then are 'spammed' to the waiting client. At first glance, nothing is missing, but I expected the stream to work like in the default google implementation. Receiving the messages one after another when sent from the server.
Is this intended behavior?
Beitragsleitfaden
Rechercherichtung
Reproduziere das im Issue gezeigte unary_stream-Beispiel für Client und Server mit betterproto b5 und beobachte anschließend, wann der Client Nachrichten empfängt, während der Server noch läuft. Vergleiche dieses Verhalten mit der erwarteten Streaming-Semantik und bestimme, ob eine Zustellung vor der Rückkehr der Servermethode beabsichtigt ist; erledigt, wenn das Verhalten erklärt und der geeignete Umfang für eine Projektänderung oder einen Test geklärt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- grpc, python
- Bereich
- backend-api-design
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100