Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: RESP 3 support #84

Closed
schlitzered opened this issue Mar 8, 2019 · 11 comments · Fixed by #104
Closed

Request: RESP 3 support #84

schlitzered opened this issue Mar 8, 2019 · 11 comments · Fixed by #104

Comments

@schlitzered
Copy link

hi, i am the author of one of the python redis implementations, and i am currently working on implementing resp3 in my fallback parser.

are there already plans to support RESP 3? if yes how are you planning to implement protocol switching?

this is somehow important because with RESP 3 parsers/clients are expected to return programming language native responses, like dicts, lists or sets.

since i mimic the api of hiredis-py, i would think it would be nice if there is a function to tell the parser to switch protocols.

something like parsert.protocol = 3

what do you think?

Kind regards

@ifduyue
Copy link
Collaborator

ifduyue commented Mar 9, 2019

Hello,

Currently no plan to support RESP3.
hiredis-py is a wrapper of hiredis. Unless hiredis supports RESP3, hiredis-py will not support RESP3.

@bsergean
Copy link

bsergean commented Feb 4, 2020

It looks like this PR added RESP3 support to the mainline.

redis/hiredis#697

@ifduyue
Copy link
Collaborator

ifduyue commented Feb 25, 2020

Noticed. I think we need to write a pure python reader if we want to continue the support for windows.

@bsergean
Copy link

bsergean commented Feb 25, 2020 via email

@ifduyue
Copy link
Collaborator

ifduyue commented Feb 26, 2020

redis-py has a pure python parser, too

@ifduyue
Copy link
Collaborator

ifduyue commented Feb 26, 2020

These two parsers aren't RESP3 yet
image

@bsergean
Copy link

bsergean commented Feb 26, 2020 via email

@michael-grunder
Copy link
Contributor

michael-grunder commented Feb 26, 2020

No there are a ton of new types

  • , - DOUBLE
  • _ - NIL
  • % - MAP
  • ~ - SET
  • # - BOOL
  • ! - BLOB ERROR
  • = - VERTBATIM STRING
  • ( - BIG NUMBER
  • < - PUSH (e.g. CLIENT TRACKING)

Edit: Initially forgot <

@Harrison88
Copy link

I've been implementing a Python RESP3 parser here, if that's helpful at all: https://github.com/Harrison88/redtrio/blob/master/src/redtrio/lowlevel/protocol.py

@schlitzered
Copy link
Author

@Harrison88: nice, i will take a look at the implementation later. would you might consider putting the parser into a separate package?

then i could make use of it in https://github.com/schlitzered/pyredis.

@Harrison88
Copy link

@schlitzered It's now available here: https://github.com/Harrison88/respy3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants