antirez / antirez/RESP3

Reconsider format for streamed types

Aperta
#28 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
230
Fork
41
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Streamed types are modeled with an unknown length. However, the individual chunk lengths are known. Defining an EOF marker and stream-parsing the EOF marker introduces a certain degree of complexity to clients.

Why we don't stick to a pattern such as partial length-prefixed chunks? Each chunk is prefixed with a length indicator (similar to strings) and a negative length value would serve for the EOF marker.

```
?10
<10 bytes of data>
?400
<400 bytes of data>
?-1 <----- EOF marker
```

(using `?` here as there was no other free character as a prefix for a stream response type).

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.