--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Note that the Hello reply still allows a client that wants to be compatible with older versions of Redis to detect the version of the protocol. Upon connection the client should send aPINGcommand. If the first byte read will be@, the version of the protocol is RESP3, the Hello reply will be processed, and later thePINGreply will be read. Instead if the first byte is not@we just read thePINGreply and switch to RESP version 2 mode.
an email to redis-db+unsubscribe@googlegroups.com.
>> To post to this group, send email to redi...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/redis-db.
>> For more options, visit https://groups.google.com/d/optout.
> --
> You received this message because you are subscribed to the Google Groups
"Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to redis-db+unsubscribe@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
I think we should boldly move forward without having this terrible things
inside Redis. Clients can move forward to newer versions IMHO, there will
be enough time, and people that don't want to stay cutting edge, can still
use older versions of Redis
Redis clients are, from the POV of the protocol, simple
software (they are complex to handle things that are not related to the
protocol itself mostly),
A problem with that approach though is that you'd need an incredibly good reason to ever build out a `/v2/` because if you ever bump that major version you're going to leave an incredible number of users behind on the original. Most people want to integrate one time and not have to worry about upgrading (ideally ever).
At Stripe, we've tried to build a compromise by introducing minor, date-based versions that include only a fairly constrained set of changes, but which we can bump more liberally. As others have mentioned here, your account gets locked into a version on its first request, and if never want to worry about API versioning at all, you can leave that version untouched essentially indefinitely.
> >> an email to redis-db+unsubscribe@googlegroups.com.
> >> >> To post to this group, send email to redi...@googlegroups.com.
> >> >> Visit this group at https://groups.google.com/group/redis-db.
> >> >> For more options, visit https://groups.google.com/d/optout.
> >> > --
> >> > You received this message because you are subscribed to the Google
> Groups
> >> "Redis DB" group.
> >> > To unsubscribe from this group and stop receiving emails from it,
send
> an
> >> email to redis-db+unsubscribe@googlegroups.com.
> >> > To post to this group, send email to redi...@googlegroups.com.
> >> > Visit this group at https://groups.google.com/group/redis-db.
> >> > For more options, visit https://groups.google.com/d/optout.
> >> --
> >> Salvatore 'antirez' Sanfilippo
> >> open source developer - Redis Labs https://redislabs.com
> >> "If a system is to have conceptual integrity, someone must control the
> >> concepts."
> >> — Fred Brooks, "The Mythical Man-Month", 1975.
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "Redis DB" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to redis-db+unsubscribe@googlegroups.com.
> >> To post to this group, send email to redi...@googlegroups.com.
> >> Visit this group at https://groups.google.com/group/redis-db.
> >> For more options, visit https://groups.google.com/d/optout.
> > --
> > You received this message because you are subscribed to the Google
Groups
> "Redis DB" group.
> > To unsubscribe from this group and stop receiving emails from it, send
an
> email to redis-db+unsubscribe@googlegroups.com.
> > To post to this group, send email to redi...@googlegroups.com.
> > Visit this group at https://groups.google.com/group/redis-db.
> > For more options, visit https://groups.google.com/d/optout.
> --
> Salvatore 'antirez' Sanfilippo
> open source developer - Redis Labs https://redislabs.com
> "If a system is to have conceptual integrity, someone must control the
> concepts."
> — Fred Brooks, "The Mythical Man-Month", 1975.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
Salvatore, I like the new data types, especially the attribute, map, and push types. I agree with the others that there will be difficulties transitioning between protocols, but currently I don't have any great suggestions. It would seem to me that for the time being a connection to the Redis server should default to RESP2 and change to RESP3 on client request. I would think (hope?) most clients would want to support the RESP3 improvements so support would arrive pretty quickly.
One question, though: you mentioned the client should send a PING command to determine if the server supported RESP2 or RESP3--should the client terminate the PING command with <CRLF> or <LF>? Wouldn't the client already know if the server supported RESP3 before it could make that determination?
As you know, my big interest is client-side caching, and I know it's too early to start discussing that but I am interested in what you're thinking as it could impact RESP3. Are you thinking that the client would "subscribe" to specific key changes, making that decision based on the key's popularity attribute? Or would the Redis server just send push messages for any changes to keys above a certain popularity level? Also have you considered having an alternate numeric ID for keys, which you could reference in push messages in place of the actual key? That would keep the message short, even in the case of long key names. I think that would be a good use of attributes, but is that something you'd want to send with every time a key was updated?
Also I like Daniel's idea of attributes with requests. Again thinking of client-side caching, one thing we've noticed is that once data gets into the client-side cache, Redis will see very few requests for that key even if it's actually being requests hundreds of times a second. Perhaps the client could use attributes to send "hints" to Redis about key popularity, e.g. "this key was requested 10,000 times in the last minute". Then the key statistics maintained by Redis could more accurately reflect client demand. Definitely not something necessary, but could be a nice-to-have.
Looking forward to watching this discussion evolve 😊
Hello Yossi,
On Tue, May 8, 2018 at 9:00 AM <yos...@gmail.com> wrote:
> Hi Salvatore, a more expressive protocol that supports common types is a
great idea, it's easy to immediately see how it solves lots of common
problems and simplifies clients.
Thanks, I agree and if you look at clients like Redigo or Redic, you think,
hey those clients are simple and neat, but how they could be simpler? Now
we have a way. I hope that also this will also will open the way for new
clients to be simpler in general from the POV of the way they mediate the
API.
> When reading the spec it occurred to me that it may be better to treat
RESP3 as a protocol stack, with proper layers: serialization of primitives,
session layer (handshake, state, etc) and an app layer (especially as with
Lua and modules there is little control over how it's used). If we follow
this then the Hello special type may not be needed, it can use any other
type as part of a well defined handshake process implemented on top of the
serialization layer protocol.
The problem is that RESP3 can be made to do anything, but RESP2 can't be
changed, so it's not clear how this handshake works. Moreover I wanted
really the hello message to be "push style" because I don't like much the
idea of using round trip times to perform an handshake. This way AFAIK
accept() returns, we write to the socket ASAP, and the client should be
able to read the reply immediately and go on, which is a latency win.
> Variable length (streaming) strings and aggregates are really much
needed, in one place the spec says they are supported but I couldn't find
how or an example.
If you check the latest TODO session, it's a work in progress, I had no
time to finish that part, but will do soon.
> The definition of aggregates is extremely permissive, which I fear may
add unnecessary complexity for clients that implement it. For example,
arrays of different arbitrary types, a set that has a error blob element,
etc. To me, a good baseline may be JSON - if I'm able to convert RESP3
aggregate to JSON and back without losing expressive information that's
probably good enough.
Arrays of different types are already in RESP2 and actively used by Redis,
so basically the only possible change is to say that keys in maps should
not be aggregate data types. But anyway, I think that mostly nobody could
use it, and clients for languages where this is not trivial to model
(aggregate data types as keys) can just raise an error when this happens.
Redis for sure will not use such features, but in modules, to prevent
actively the API from producing such beasts is hard, so I'll likely leave
it as an open possibility and just hint that servers producing the replies,
should avoid to use aggregate data types. But I don't see myself doing
complex things inside Redis to avoid Lua/modules from doing that.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
On Tue, May 8, 2018 at 1:04 PM <yos...@gmail.com> wrote:
> The reality is that most clients/apps will already have at least one
roundtrip (AUTH), and quite a few I've seen (or implemented) also PING to
validate connectivity and trigger authentication on demand. So if it's
possible to come up with a clean and neat design I don't think there will
be a regression here in terms of performance if the handshake is limited to
a single ClientHello/ServerHello iteration.
Makes sense, but for my personal taste, handshaking is already over the
line. I see the current push hello message as a very good solution
honestly. It's a shame to make this more complex from my POV.
> Maybe I'm wrong here, but I think the cases you refer to in RESP2 are
logically an array of objects. If the implementation is not trivial it can
be left to the user but I think if you agree it's not a useful feature I
suggest to narrow down the protocol specification so if things broken it's
clear on which side they need to be fixed...
Sorry this point is not clear for me, I think I'm not understanding what
you say. I can describe what is the difference between the two protocols in
order to make this more clear.
Basically in RESP2 you can have Array of any possible type, including
arrays of arrays that have inside anything, heterogeneously.
RESP3 in this regard is the same, and the Set type is exactly like the
Array type.
Let's assume that it is obvious that we need to emit Arrays having as sub
types Sets, Maps, ... and everything else, because of MULTI semantics, and
because this is handled by clients without having to do any effort, so,
what's left? AFAIK the only thing left is the Map type keys. So, is your
sole concern the fact that Map types should not be aggregates, but should
be, for instance, only single values, or even more strictly, strings?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
The RESP3 protocol is asymmetrical: only a subset can be sent by the client to the server, while the server can return the full set of types available. This is due to the fact that RESP is designed to send non structured commands like SET mykey somevalue or SADD myset a b c d. Such commands can be represented as arrays, where each argument is an array element, so this is the only type the client can send to a server.
Big number
Aggregate data types
Maps can have any other type as field and value [...] Client libraries should return Maps using the idiomatic dictionary type available.
Hello, the following is a draft describing the new Redis protocol, RESP3:
https://gist.github.com/antirez/2bc68a9e9e45395e297d288453d5d54c
This will be implemented after many months of thinking more about the
design, so please, let's use this thread to collect feedbacks. The RESP3
protocol does not really want to get too complicated compared to the
current topic, but certain limitations of the current protocol are evident
for years now... and should be addressed.
Thanks for any feedback,
Salvatore
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Re async - observation: on a per connection basis, this is already possible, since messages are processed in connection order; so all you need is a per-connection queue of "awaiting reply" messages.
Anecdotally, even for the proxy scenario where you're tracking multiple connections: it is presumably *much more efficient* to simply store a FIFO queue per connection and simply dequeue the next thing awaiting a response - rather than having to look things up by some index.
That leaves the non-blocking command case; while I agree that is an interesting aspect, IMO that deserves to be considered fully in its own right, rather than forced in here. So - and maybe I'm missing the point here (I do that a lot) - it isn't obvious to me that there is anything extra needed to enable fully async access over multiple connections.