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

Proof-of-concept for automatic key prefixing #3770

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Mar 18, 2024

  1. Proof-of-concept for automatic key prefixing

    R-J Lim committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    7a806a1 View commit details
    Browse the repository at this point in the history
  2. Iteration on key-prefixing POC

    - Demonstrated automatic key-prefixing for all subclasses of
      UnifiedJedis: JedisCluster, JedisPooled, and JedisSentineled
    - Key-prefixing is possible as long as the underlying CommandObjects can
      be customized.
    - CommandObjects cannot use commandArguments in its constructor since
      in the specific case of key-prefixing, commandArguments depends on the
      child constructor running first. So we lose caching of argument-less
      CommandObjects.
    - Based on this POC, the minimum changes required to jedis would be:
      - public constructors that allow UnifiedJedis and its subclasses to
        take a custom CommandObjects.
      - Consistent use of supplied CommandObjects throughout code (e.g. in
        Pipeline, Transaction, etc).
      - Removal of caching of argument-less CommandObjects in the
        constructor of CommandObjects.
    - Applications can then supply CommandObjects with custom behavior as
      necessary. Sample classes that implement the behavior of prefixed keys,
      etc are provided but these can be supplied by the application as long
      as required constructors are available.
    R-J Lim committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    90a50b4 View commit details
    Browse the repository at this point in the history
  3. Second iteration on key-prefixing POC

    - Restore cached key-less commands in CommandObjects
    - Support Transactions
    - New constructors do not take CommandExecutor
    - Requested JavaDoc regarding new constructors specifying RedisProtocol
    - New classes moved into 'prefix' packages
    - De-duplicate prefixing code
    R-J Lim committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    7098377 View commit details
    Browse the repository at this point in the history
  4. Address code review comments

    - Restore public Transaction constructor that was removed
    - Use Connection.executeCommand instead of Connection.sendCommand
    R-J Lim committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    02b8ba9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    66f6336 View commit details
    Browse the repository at this point in the history