storage icon indicating copy to clipboard operation
storage copied to clipboard

πŸš€ [Feature]: Implement Valkey Storage

Open H0llyW00dzZ opened this issue 1 year ago β€’ 2 comments

Feature Description

This is similar to the Redis link here

Additional Context (optional)

No response

Code Snippet (optional)

No response

Checklist:

  • [X] I agree to follow Fiber's Code of Conduct.
  • [X] I have checked for existing issues that describe my suggestion prior to opening this one.
  • [X] I understand that improperly formatted feature requests may be closed without explanation.

H0llyW00dzZ avatar May 04 '24 10:05 H0llyW00dzZ

@H0llyW00dzZ The Redis and Rueidis clients work with Valkey. Therr's no need for anlther driver.

  • https://github.com/gofiber/storage/blob/main/redis/README.md
  • https://github.com/gofiber/storage/blob/main/rueidis/README.md

The valkey-go is a fork of rueidis which we have a storage driver for.

gaby avatar May 04 '24 12:05 gaby

@H0llyW00dzZ The Redis and Rueidis clients work with Valkey. Therr's no need for anlther driver.

  • https://github.com/gofiber/storage/blob/main/redis/README.md
  • https://github.com/gofiber/storage/blob/main/rueidis/README.md

The valkey-go is a fork of rueidis which we have a storage driver for.

However, that might not work anymore in the future.

H0llyW00dzZ avatar May 04 '24 13:05 H0llyW00dzZ

I think we are at a good point to revisit this issue. According to a December 2024 Redis Blog Post:

And though [Redis and Valkey] were both once based on the same code, they’ve begun to diverge in feature sets, functionality, capabilities, contributors, and more. Over time, the divergence is only likely to increase.

In this case, it may make sense to officially support Valkey through a separate storage driver. If we do this, we don't need to worry as much about breaking changes between Redis/Rueidis clients and Valkey clients for users that rely on GoFiber's storage module.

Currently, the Valkey client appears to be just enough of the same as Ruedis, so it could be as simple as a copy-and-paste of the existing driver and rename to use Valkey's syntax. This way, once the clients start to vastly diverge, it won't inadvertently break GoFiber applications that upgrade to a future version.

What do you all think of this?

grivera64 avatar Dec 29 '24 03:12 grivera64

@grivera64 Agree, the code from the rueidis driver can be copy/pasted, and swap the dependency for https://github.com/valkey-io/valkey-go

gaby avatar Dec 29 '24 03:12 gaby

nice, finally

H0llyW00dzZ avatar Jan 07 '25 18:01 H0llyW00dzZ

@ReneWerner87 We need a release for Valkey

gaby avatar Jan 07 '25 18:01 gaby

@ReneWerner87 We need a release for Valkey

Furthermore, it can improve performance related to Valkey, such as reducing latency caused by regional factors. In contrast to Redis Cloud, where database deployment for caching or as an in-memory database is restricted to specific regions, Valkey can be self-hosted or directly accessed from cloud providers like Google Cloud.

H0llyW00dzZ avatar Jan 07 '25 18:01 H0llyW00dzZ

@H0llyW00dzZ You can self-host Redis too.

I run multiple self-hosted Redis and Redis Cluster instances.

gaby avatar Jan 07 '25 19:01 gaby

@ReneWerner87 We need a release for Valkey

is a 0.0.1 version okay, as there will definitely be a breaking change in the next month due to our adaptation to fiber v3 ?

ReneWerner87 avatar Jan 07 '25 19:01 ReneWerner87

@H0llyW00dzZ You can self-host Redis too.

I run multiple self-hosted Redis and Redis Cluster instances.

@gaby Do you self-host Redis with TLS or not? Beause Self-hosting Redis has limitations compared to using Redis Cloud.

H0llyW00dzZ avatar Jan 07 '25 19:01 H0llyW00dzZ

@ReneWerner87 We need a release for Valkey

is a 0.0.1 version okay, as there will definitely be a breaking change in the next month due to our adaptation to fiber v3 ?

Yes

gaby avatar Jan 07 '25 19:01 gaby

https://github.com/gofiber/storage/releases/tag/valkey%2Fv0.1.0

ReneWerner87 avatar Jan 07 '25 19:01 ReneWerner87

@H0llyW00dzZ You can self-host Redis too. I run multiple self-hosted Redis and Redis Cluster instances.

@gaby Do you self-host Redis with TLS or not? Beause Self-hosting Redis has limitations compared to using Redis Cloud.

With and without TLS. It's the same thing. If you want all the features you have to use Redis Stack. See here https://github.com/redis-stack/redis-stack

gaby avatar Jan 07 '25 19:01 gaby

@ReneWerner87 We need a release for Valkey

is a 0.0.1 version okay, as there will definitely be a breaking change in the next month due to our adaptation to fiber v3 ?

@ReneWerner87 It will be better for both v2 and v3 because Fiber v2 is stable. I've been using it on Kubernetes.

H0llyW00dzZ avatar Jan 07 '25 19:01 H0llyW00dzZ