Add a distinct type for keys?
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 230
- Forks
- 41
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi,
According to http://antirez.com/news/125 the goal with RESP3 is to be able to have relatively dumb clients which offer a very simple interface such as `result = redis.call(“GET”,keyname);` and don't need to know anything about the command it sends.
As the current maintainer of `redis-rb`, I'm totally behind this as it would indeed make my life much easier, and I'm really eager to be able to delete tons of code.
However I question wether such simplicity will really be achievable in practice. With a regular Redis setup it will indeed be possible, but as soon as you use Redis in a distributed manner, say with Redis cluster, the client do need to know which elements of the command are keys, so that it can hash them and select the proper target.
So ultimately I'm afraid the client will still have to maintain a list of commands, as well as their possible arguments as to be able to extract keys.
Hence why I wonder if `keys` could be a distinct type from strings, with their own prefix such as `#` or `@`.
This way, rather than `redis.call("GET", "foo")`, the interface would be something like `redis.call("GET", redis.key("foo"))`, allowing the client to extract the keys without having to know anything about the command signature.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.