antirez / antirez/RESP3

Reconsider format for streamed types

Ouverte
#28 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Aucune donnée de langage
Étoiles
230
Forks
41
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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).

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.