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

Introduce Valkey client overview #164

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

asafpamzn
Copy link

  • Created a new document that provides an overview of recommended Valkey clients across various programming languages.
  • Included mandatory features required for each client, such as Cluster Support and TLS/SSL Support.
  • Detailed advanced features supported by the clients, including:
    • Read from Replica
    • Exponential Backoff to Prevent Storm
    • Valkey Version Compatibility
    • PubSub State Restoration
    • Cluster Scan
    • Latency-Based Read from Replica
    • Client-Side Caching
  • Added feature comparison tables for each programming language (Python, JavaScript/Node.js, Java, Go, PHP, C#) to highlight the unique capabilities of each client.
  • Placeholder sections for Ruby and other languages marked as TODO for future updates.
  • References section includes a link to the official Valkey documentation.

clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
@ranshid
Copy link
Member

ranshid commented Aug 18, 2024

@asafpamzn Thank you for that initiative. it was discussed several times that we need some feature support metric for known clients.

Several high level remarks:

  1. our new process for introducing new features/documentations which will require some discussion is to create a suggestion in valkey-rfc first. I suggest you create one there.
  2. I am wondering if a separate table for each language is better than a single flat table also indicating the supported language? (eg. for glide it would state comma separated list of languages and a single one for others)?
  3. I would think we need to discuss which features are important to indicate. For example inline protocol support, binary protocol, functions, client algorithms etc... WDYT?

@asafpamzn
Copy link
Author

@ranshid , thanks for the feedback.

  1. Sure, will do.
  2. I think that usually users are having a single language or 2, it will be more convenient to jump to the relevant part at the doc.
  3. This is just a draft PR and proposal. I agree that we should discuss, what should be the forum? Can we discuss in this PR or do we need additional process?

@asafpamzn asafpamzn marked this pull request as ready for review September 9, 2024 14:16
@asafpamzn
Copy link
Author

@ranshid , @zuiderkwast ,

I updated the PR according to your comments.
Who should I work with on this PR to merge it to the website?

Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

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

I like the summary overall. @rueian @yangbodong22011 Would also be great if you can review this.

clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
@yangbodong22011
Copy link
Contributor

I think we can put all clients Feature Comparison Table in one tables.

Name Language Mode Support Recommend Version Connection Mode SSL Support Cluster Advanced Command Read from replica Exponential backoff to prevent storm Valkey version compatibility PubSub state restoration Cluster Scan Latency-Based Read from Replica Client Side Caching RESP3 Async API Auto reconnect when network down
valkey-java Java standalone/sentinel/cluster 5.3.0+ connection pool Yes No No No 7.2 No No No No Yes No Yes
...

@zuiderkwast
Copy link
Contributor

I think we can put all clients Feature Comparison Table in one tables.

I like this idea.

If the table is large, it can be messy to maintain it as Markdown.

If we have one JSON file per client (like we have for the old redis clients still in this repo), we could add this information in the JSON files and render the table on the website.

@yangbodong22011
Copy link
Contributor

I think we can put all clients Feature Comparison Table in one tables.

I like this idea.

If the table is large, it can be messy to maintain it as Markdown.

If we have one JSON file per client (like we have for the old redis clients still in this repo), we could add this information in the JSON files and render the table on the website.

agree👍

clients/ValkeyClients.md Outdated Show resolved Hide resolved
@asafpamzn
Copy link
Author

I think we can put all clients Feature Comparison Table in one tables.

I like this idea.
If the table is large, it can be messy to maintain it as Markdown.
If we have one JSON file per client (like we have for the old redis clients still in this repo), we could add this information in the JSON files and render the table on the website.

agree👍

I don't agree, usually customers are first choosing the language and next the client, the client is a small part at the application, basically a driver. I don't think that the average reader will care about clients in other languages. I do agree that for the valkey maintainers it is a better view.

Copy link

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

We need to decide where to put this document.

clients/ValkeyClients.md Outdated Show resolved Hide resolved
clients/ValkeyClients.md Outdated Show resolved Hide resolved
asafpamzn and others added 4 commits September 26, 2024 16:47
- Created a new document that provides an overview of recommended Valkey clients across various programming languages.
- Included mandatory features required for each client, such as Cluster Support and TLS/SSL Support.
- Detailed advanced features supported by the clients, including:
  - Read from Replica
  - Exponential Backoff to Prevent Storm
  - Valkey Version Compatibility
  - PubSub State Restoration
  - Cluster Scan
  - Latency-Based Read from Replica
  - Client-Side Caching
- Added feature comparison tables for each programming language (Python, JavaScript/Node.js, Java, Go, PHP, C#) to highlight the unique capabilities of each client.
- Placeholder sections for Ruby and other languages marked as TODO for future updates.
- References section includes a link to the official Valkey documentation.

Signed-off-by: asafpamzn <[email protected]>
Co-authored-by: Avi Fenesh <[email protected]>
Signed-off-by: asafpamzn <[email protected]>
…#159)

Update cluster-slots docs
ref: valkey-io/valkey#265

---------

Signed-off-by: Roshan Khatri <[email protected]>
Signed-off-by: Madelyn Olson <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]>
Signed-off-by: asafpamzn <[email protected]>
Add documentation for the new `info stats` fields.

---------

Signed-off-by: Uri Yagelnik <[email protected]>
Signed-off-by: asafpamzn <[email protected]>
asafpamzn and others added 5 commits September 26, 2024 16:47
@stockholmux
Copy link
Member

I think this will become very difficult to maintain if we have it as hand-written markdown.

I'm generally in favour of having it generated from JSON @zuiderkwast suggested.

The question for me is does that get generated as part of docs or website. Related: should this be in the man pages? The information could be useful but if they're mostly links out to GitHub repos it feels like that's more typically something someone would browse from the web, not from a terminal.

@asafpamzn
Copy link
Author

asafpamzn commented Oct 15, 2024

'm generally in favour of having it generated from JSON @zuiderkwast suggested.

The question for me is does that get generated as part of docs or website. Related: should this be in the man pages? The information could be useful but if they're mostly links out to GitHub repos it feels like that's more typically something someone would browse from the web, not from a terminal.

@stockholmux , why do you think that it will be hard to maintain? It is up on the clients maintainers to update it once new feature is added. It does not happen that frequently.

It should be part of the website, I agree

@stockholmux
Copy link
Member

@asafpamzn If something is represented as data (i.e. JSON), it's far more maintainable than hand written markdown which is difficult/time consuming to review and audit. As an example, some of the hand written markdown in the content we inherited in this repo was literally a decade out-of-date. No one reported this for years. Data we can query and answer questions quickly.

Additionally, markdown fixes the format in markdown tables which is not sortable or filterable. If it's data, that we have more options.

Finally, If we have it stored as data we can do represent of the data in different ways and in different places not just fixed into a single markdown file.

@madolson
Copy link
Member

The question for me is does that get generated as part of docs or website. Related: should this be in the man pages? The information could be useful but if they're mostly links out to GitHub repos it feels like that's more typically something someone would browse from the web, not from a terminal.

My intuition is that all the specific client information shouldn't be part of the man pages. I feel like that is getting too low level to be materially useful to most individuals, and the clients are also updated independently from the rest of the code.

Additionally, markdown fixes the format in markdown tables which is not sortable or filterable. If it's data, that we have more options.

I suppose to extend this, we already have JSON files for all of the clients. We could simply extend them to also include all these extra fields which can be used during the render.

@liorsve
Copy link

liorsve commented Nov 14, 2024

Hi all! Joining @asafpamzn in trying to move this PR along.

I only did a short dive so correct me if I'm wrong or missing something (which may very well be the case), but from what I got from your conversation so far, assuming we're not adding to man pages, seems like we need to -

  1. Add the fields to the json client files for the clients mentioned here
  2. Decide where in the website this page goes, and accordingly
  3. Decide whether the markdown gets generated from this repo (like the docs by topic render to the website now for example) or do we move it to the content of the valkey-io.github.io repo (@stockholmux was this your intention here?) Then
  4. Add the html template for the page in valkey-io.github.io that would have a unified table for all clients, and would render the data from the json files.

Did I get it right?
If so, I'll be happy to get to working on these based on what you say :) Also if there's someone I can work with on the website side of this, lmk

liorsve and others added 2 commits November 25, 2024 12:16
Update client json files and put client page in topics
@liorsve
Copy link

liorsve commented Nov 25, 2024

  • Moved the markdown page to content/topics so it would be under docs by topics in the website.
  • Updated json client files with needed fields (including name changes to some).
  • a corresponding draft PR for the website for when this PR is merged - #166

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Great, so there will be a generated list of clients that can display this information?

The old list of clients used to be rendered on the URL redis.io/clients/. Most of our docs are from that time. There are already links to the page where the list of clients is supposed to be, i.e. the ../clients/ directory relative the topics directory.

I used grep to find some of them:

topics/cluster-tutorial.md:322:See the documentation for your [client of choice](../clients/) to determine its cluster support.
topics/eval-intro.md:176:Most of [Valkey' clients](../clients/) already provide utility APIs for doing that automatically.
topics/installation.md:85:You'll find a [full list of clients for different languages in this page](../clients/).
topics/introduction.md:33:You can use Valkey from [most programming languages](../clients/).
topics/ldb.md:234:LDB uses the client-server model where the Valkey server acts as a debugging server that communicates using [RESP](protocol.md). While `valkey-cli` is the default debug client, any [client](../clients/) can be used for debugging as long as it meets one of the following conditions:
topics/quickstart.md:22:The first step is to connect to Valkey. There are client connectors for [most programming languages](../clients/).

The website instead points these links to the page corresponding to topics/clients.md, which is about the handling of client connections (CLIENT LIST, CLIENT KILL, etc.). I don't know why, but I can only guess that it is to avoid broken links. @stockholmux do you want to confirm? Anyway, these links are supposed to point to the list of clients which used to be at the /clients/ URL.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is already a page called topics/clients.md. It's about inspecting and handling the client connections using commads like CLIENT LIST, CLIENT KILL, etc.

The difference between the names valkey-clients ans clients is not making the difference between these two pages any clearer.

To distinguish them in a meaningful way and still avoid renaming the old one, we could call the new one client-libraries for example.

Copy link
Member

Choose a reason for hiding this comment

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

We have a lot of existing links to valkey.io/clients/ on the web version, this is a hold over from the forked content.

For this file, I'd suggest something like client-list or something equally boring and descriptive.

As far as the valkey.io/clients/ path, once we have some sort of client path, I'll alias any existing links to the new page.

Copy link

Choose a reason for hiding this comment

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

changed the file name to client-list

Comment on lines 2 to 3
title: "Valkey Clients"
linkTitle: "Valkey Clients"
Copy link
Contributor

Choose a reason for hiding this comment

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

In the list of pages, we don't want all of them to start with Valkey.

I believe "linkTitle" is used in menues (@stockholmux correct me if I'm wrong!), where we see all of these together, and "title" is the title of the page.

For linkTitle, we don't want to repeat Valkey everywhere. We already have this for half of the pages and it looks like crap. See "Alphabetical index" on the page https://valkey.io/topics/ and scroll down.

Copy link
Contributor

@zuiderkwast zuiderkwast Nov 25, 2024

Choose a reason for hiding this comment

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

Clarification: The page itself doesn't look like crap. It's looks pretty good IMO. But it's not nice that half of them start with "Valkey".

Copy link
Member

Choose a reason for hiding this comment

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

We no longer use linkTitle that was a hold the Jekyll version.

It does no harm but provides no value either.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know. So we can delete linkTitle to avoid confusion.

Should we skip "Valkey" in the page titles then, or use it in all page titles?

Copy link
Member

@stockholmux stockholmux Nov 26, 2024

Choose a reason for hiding this comment

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

@zuiderkwast (Slightly off topic)
Yeah, so it renders as <title>Valkey Documentation · Valkey persistence</title> which is a little silly.

Do you have a need for it to be "Valkey :topic:" vs just ":topic:"? If so, it's pretty trivial to just remove "Valkey" from the title string in the template rendering for things like the alphabetical index and document title. Feel free to put in an issue; I'm chewing through a backlog slowly.

I also have a PR in review that allows for conditional overrides of front matter directly into Zola so in the few edge cases where we might want to preserve 'Valkey' we can.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I'd like to remove Valkey from all the titles in markdown, so it renders as "Valkey Documentation · Persistence" instead.

The alphabetical index looks especially silly when all or most of the entries start with Valkey.

Copy link
Member

Choose a reason for hiding this comment

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

@viktor See PR that fixes this:
valkey-io/valkey-io.github.io#169

Copy link

Choose a reason for hiding this comment

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

deleted the linkTitle

Copy link
Member

@stockholmux stockholmux left a comment

Choose a reason for hiding this comment

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

Good progress, needs a little work

@@ -0,0 +1,15 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

why is this an aws directory? GLIDE is a valkey project not AWS

Copy link

Choose a reason for hiding this comment

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

moved it to the valkey directory

"language":"Go",
"read_from_replica": true,
"smart_backoff_to_prevent_connection_storm": true,
"valkey_version_compatibility": "7.2",
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this field: Valkey didn't change the API between 8.0 and 7.2 - what makes it 'compatible'?

Copy link

Choose a reason for hiding this comment

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

Supporting Valkey 8.0 features like AZ affinity, supporting new commands (like script show, cluster slot stats), and commands that were modified in 8.0.

"AZ_based_read_from_replica": false,
"client_side_caching": false,
"client_capa_redirect": false,
"persistent_connection_pool": true
Copy link
Member

Choose a reason for hiding this comment

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

How does this take into account language specific properties? For example IIRC, valkey-py is synchronous or async, GLIDE is async. That's super relevant for someone picking a client in python but not at all for other languages.

There are others I'm sure as well.

Copy link

Choose a reason for hiding this comment

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

Maybe we could add a sentence to the description for this sort of stuff where it seems necessary? I think it's better to put it in the upper part and not in the feature table, it will get messy and the table focuses on the specific features that are explained above.
Do you have other ideas for worth mentioning criteria?

"client_side_caching": false,
"client_capa_redirect": false,
"persistent_connection_pool": false
}
Copy link
Member

Choose a reason for hiding this comment

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

Another relevant property: package size. I'm not sure the metric, but GLIDE is quite large compared to other clients (as it needs to pull down the Rust binary stuff).

Copy link

Choose a reason for hiding this comment

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

Will add

Comment on lines 2 to 3
title: "Valkey Clients"
linkTitle: "Valkey Clients"
Copy link
Member

Choose a reason for hiding this comment

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

We no longer use linkTitle that was a hold the Jekyll version.

It does no harm but provides no value either.

Copy link
Member

Choose a reason for hiding this comment

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

We have a lot of existing links to valkey.io/clients/ on the web version, this is a hold over from the forked content.

For this file, I'd suggest something like client-list or something equally boring and descriptive.

As far as the valkey.io/clients/ path, once we have some sort of client path, I'll alias any existing links to the new page.


- **valkey-glide**
- GitHub: [valkey-glide](https://github.com/valkey-io/valkey-glide/tree/main/java)
- Installation: Available via Maven and Gradle
Copy link
Member

Choose a reason for hiding this comment

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

My preference would be to have a one-liner for ever Installation: field

Copy link

Choose a reason for hiding this comment

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

added (small code block for Maven)

- **Valkey-Java**
- GitHub: [valkey-java](https://github.com/valkey-io/valkey-java)
- Installation: Available via Maven and Gradle
- Description: valkey-java is Valkey's Java client, derived from Jedis fork, dedicated to maintaining simplicity and high performance.
Copy link
Member

Choose a reason for hiding this comment

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

'derived from Jedis fork' redundant?

Copy link

Choose a reason for hiding this comment

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

Removed this

-----
- **valkey-go**
- GitHub: [go-valkey-go](https://github.com/valkey-io/valkey-go)
- Installation: TBD
Copy link
Member

Choose a reason for hiding this comment

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

why TBD?

Copy link

Choose a reason for hiding this comment

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

Added

@@ -0,0 +1,15 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure of the value of this directory structure (e.g.clients/go/github.com/valkey/valkey-go.json). Seems like some remnant of something that other datastore was doing.

It might be worth just moving stuff around to be: clients/go/valkey-go.json

Copy link

Choose a reason for hiding this comment

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

Do you mean for Go specifically or for all of the clients directory?

-----
- **valkey-go**
- GitHub: [go-valkey-go](https://github.com/valkey-io/valkey-go)
- Installation: TBD
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Installation: TBD
- Installation: `go get github.com/valkey-io/valkey-go`

⬆️ This is the command.

Copy link

Choose a reason for hiding this comment

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

Added, thanks!

@liorsve
Copy link

liorsve commented Dec 16, 2024

  • Moved all of the client list fields (description, github url, installation) to be generated from jsons as well.
  • Created placeholder fields for package sizes

@zuiderkwast
Copy link
Contributor

zuiderkwast commented Dec 16, 2024

Is there any PR for the website repo to render this page on the website?

I'm thinking, the clients metadata is not really docs, is it? I mean, the docs repo is also used for man pages and potentially other formats, but we don't want to produce man pages with the client listings. If it's easier to just keep this metadata in the website repo, I will not oppose it. It may be easier to handle it.

The docs repo and the website repo have different licenses, but is that a huge problem? These files are just a name and a link in most cases...

@liorsve
Copy link

liorsve commented Dec 16, 2024

Is there any PR for the website repo to render this page on the website?

I'm thinking, the clients metadata is not really docs, is it? I mean, the docs repo is also used for man pages and potentially other formats, but we don't want to produce man pages with the client listings. If it's easier to just keep this metadata in the website repo, I will not oppose it. It may be easier to handle it.

The docs repo and the website repo have different licenses, but is that a huge problem? These files are just a name and a link in most cases...

@zuiderkwast
There is a draft PR - #166. It pulls everything from docs, but for sure it will be easier to handle if we keep all the jsons in that repo, so if that's an option it's probably preferred.

@zuiderkwast
Copy link
Contributor

@stockholmux WDYT? Keep this kind of content in the website repo?

@stockholmux
Copy link
Member

@zuiderkwast I'm not fully opposed to having it in the website repo. My hesitation is if the website repo has the right approval mechanisms: would the website maintainers have the right domain knowledge to make approvals on these. I know I feel relatively confident in say approving a PR, but it's totally possible that in the future we could website maintainers with less domain specific knowledge (e.g. they are experts in maintaining the website but not the nuance of, for example i, if smart_backoff_to_prevent_connection_storm works in a given client). Valkey-doc maintainers would be better equipped to make these calls.

I'd also like to get an opinion on moving this stuff to a different project with a different license, but I don't think this would be too much of an issue.

The other option would be to split out all the client metadata into another repo. Which could make some sense if others want to consume this data (service providers, would be an example).

@zuiderkwast
Copy link
Contributor

Valkey-doc maintainers would be better equipped to make these calls.

Fair point. We can keep it in the doc repo then. I guess the main hassle is just now, to get this up in both repos. Once it's up, it shouldn't be too hard to update it.

The other option would be to split out all the client metadata into another repo. Which could make some sense if others want to consume this data (service providers, would be an example)

Nah, that sounds too scattered to me. Let's just keep it in the doc repo.

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.