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

issue #2220 - client side caching PoC test 1 #2236

Closed
wants to merge 1 commit into from
Closed

issue #2220 - client side caching PoC test 1 #2236

wants to merge 1 commit into from

Conversation

tgrall
Copy link
Contributor

@tgrall tgrall commented Aug 26, 2020

Hi,

I have created a small Proof of Concept for Client Side Caching.

The ideas behind it:

  • almost transparent for the application, as soo as the jedis.clientTracking is called & enabled the cache is done for GET and HGETALL
  • it is really limited (currently all String and Hash are cached when used by a client connection (Prefix is not used)

Q1: Should I continue with this approach, where I make the cache almost transparent for the user, but it will impact all the client code to check if the connection is using CSC ?

OR should I used a different approach where the client instantiate a new class associated to the client, and have to call JedisClientCache.get/hgetall. (this allows a better isolation of the code for caching)

Q2: if I stay with the current approach I do not know how to create a new connection on the fly with the same connection string information (needed for Pub/Sub client in RESP2) this is why I pass a Jedis connection to the ClientTracking method down to the Client code itself.

As I said it is just a PoC open for comments/discussions. (few hours of work during my PTO while kids are sleeping.. so probably need a lot more thinking....)

@sazzad16
Copy link
Collaborator

@tgrall

About Q1:

should I used a different approach where the client instantiate a new class associated to the client, and have to call JedisClientCache.get/hgetall. (this allows a better isolation of the code for caching)

This is not a strong opinion, but this sounds comparatively better to me.

BTW, how old are are your kids?

@tgrall
Copy link
Contributor Author

tgrall commented Aug 26, 2020

I will test another implementation tomorrow morning.

17/19/21 2 of them are coding a lot (java, node and more ... they have started with Minecraft programming)

@sazzad16
Copy link
Collaborator

Your kids are not that kid then. Congrats!

Copy link

github-actions bot commented Aug 9, 2024

This pull request is marked stale. It will be closed in 30 days if it is not updated.

@github-actions github-actions bot added the stale label Aug 9, 2024
@github-actions github-actions bot closed this Sep 8, 2024
@sazzad16
Copy link
Collaborator

#3757

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

Successfully merging this pull request may close these issues.

2 participants