scylladb / scylladb/alternator-client-cpp
Idea: a cross-language test framework for all Alternator drivers
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Jira task: https://scylladb.atlassian.net/browse/DRIVER-717
Jira epic: https://scylladb.atlassian.net/browse/DRIVER-53
Copied from Jira epic DRIVER-53:
There are various features that we need to add to Alternator drivers in every single language. A recent example is handling of Scylla nodes that are not yet available or no longer available (https://github.com/scylladb/scylladb/issues/26326). But there's a whole list of features which we added, or want to add, to every single Alternator driver in every single language - see a collection of these in
https://github.com/scylladb/alternator-load-balancing/issues/152.
The proposal in this issue is to develop a testing framework that will allow us to test these features on every single language, without needing to rewrite each test in N different languages. More importantly, I want to avoid even the need to remember to write the test in each new language: There's a real risk so if we forget to port some feature to our Fortran driver, and we also forget to port the test for that feature for the Fortran driver, then we'll never remember to do that and the feature will forever remain missing in the Fortran driver. The goal of this issue is to prevent this.
I think it should not be too hard to create a test framework that creates a Scylla cluster (or different Scylla clusters for different situations), and then takes a "script" of DynamoDB operations in a pseudo-language (not in any specific language) that the framework can translate into SDK calls in different languages. For example, for [#26326|https://github.com/scylladb/alternator-load-balancing/issues/26326] the test script might say something like:
- Create an Alternator cluster with 3 nodes.
- Kill one of the 3 nodes abruptly.
- Run a "PutItem" request. It shouldn't have an error even if the load balancer chose the dead node as the coordinator because (if [#26326|https://github.com/scylladb/alternator-load-balancing/issues/26326] is done) the retry will happen on a different node.
The idea is that every language the specific command to connect to the cluster and run a "PutItem request" and look at its response will be different, but other than that, the test will be the same.
CC @dkropachev
Migrated from GitHub issue: https://github.com/scylladb/alternator-load-balancing/issues/154
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the DRIVER-53 epic, DRIVER-717, and alternator-load-balancing issues #152 and #154 to understand the proposed scope. Examine the example scenario for unavailable Scylla nodes and the planned pseudo-language-to-SDK approach. Done means a framework can express shared Alternator operations and run the same test across drivers in different languages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100