Skip to content

Comments

SPIKE: Initial proxy design#2

Merged
palkan merged 2 commits intomasterfrom
spike/basic-proxy
Apr 23, 2021
Merged

SPIKE: Initial proxy design#2
palkan merged 2 commits intomasterfrom
spike/basic-proxy

Conversation

@palkan
Copy link
Member

@palkan palkan commented Apr 20, 2021

  • Implemented state-machine like pattern to handle different session states: handshake (waiting for SELECT), regular (processing regular commands); further development: multi state.
  • Added fastlane API to intercept commands which do not require calling Redis (e.g., PING, CLIENT); maybe, we'll be able to implement SCRIPT using this API as well.
  • Added basic interfaces for Redis (Command and Client).

args := append([]interface{}{cmd.Name}, cmd.Args...)

ctx := context.Background()
// TODO: Use custom cmd to return raw text data
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skryukov Couldn't find a way to retrieve a raw Redis response using the existing APIs.

One idea is to use a custom cmder implementation with overriden readReply function. But we cannot simply add our own from the outside, 'cause it relies on some internal (I mean, from internal/redis/bla-bla) structs.

Would you like to fork go-redis and implement a rawCmd 🙂?_)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@palkan palkan force-pushed the spike/basic-proxy branch from 6087ab6 to 7bdce81 Compare April 23, 2021 10:40
@palkan palkan force-pushed the spike/basic-proxy branch from 7bdce81 to ffa0343 Compare April 23, 2021 11:10
@palkan palkan marked this pull request as ready for review April 23, 2021 11:11
@palkan palkan merged commit 411cb83 into master Apr 23, 2021
@palkan palkan deleted the spike/basic-proxy branch April 23, 2021 11:12
@palkan palkan restored the spike/basic-proxy branch January 11, 2022 13:12
@palkan palkan deleted the spike/basic-proxy branch January 11, 2022 13:12
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 this pull request may close these issues.

2 participants