From 38fc099dbfe3630e4db26d36491ba5bb6193fc87 Mon Sep 17 00:00:00 2001 From: Bar Shaul <88437685+barshaul@users.noreply.github.com> Date: Thu, 21 Dec 2023 18:58:45 +0200 Subject: [PATCH] ### Renaming the project to GLIDE for Redis ### (#699) --- .../workflows/build-node-wrapper/action.yml | 2 +- .../workflows/build-python-wrapper/action.yml | 4 +- .github/workflows/cd.yml | 12 +- .github/workflows/csharp.yml | 6 +- .github/workflows/java.yml | 12 +- .github/workflows/node.yml | 4 +- .github/workflows/python.yml | 8 +- .github/workflows/rust.yml | 12 +- .github/workflows/test-benchmark/action.yml | 2 +- .gitignore | 8 +- .vscode/settings.json | 2 +- CHANGELOG.md | 2 +- CODEOWNERS | 2 +- README.md | 15 +- benchmarks/.gitignore | 2 +- benchmarks/csharp/Program.cs | 14 +- benchmarks/csharp/csharp_benchmark.csproj | 2 +- benchmarks/install_and_test.sh | 15 +- benchmarks/node/node_benchmark.ts | 27 +- benchmarks/node/package.json | 2 +- benchmarks/python/python_benchmark.py | 8 +- benchmarks/rust/Cargo.toml | 2 +- benchmarks/rust/src/main.rs | 10 +- csharp/csharp.sln | 2 +- csharp/lib/AsyncClient.cs | 10 +- csharp/lib/Cargo.toml | 5 +- csharp/lib/Logger.cs | 8 +- csharp/lib/Message.cs | 2 +- csharp/lib/MessageContainer.cs | 2 +- csharp/lib/{babushka.csproj => glide.csproj} | 4 +- csharp/lib/src/lib.rs | 10 +- csharp/tests/AsyncClientTests.cs | 4 +- csharp/tests/tests.csproj | 2 +- examples/node/README.MD | 8 +- examples/node/index.ts | 4 +- examples/node/package.json | 2 +- examples/python/README.md | 4 +- examples/python/build_client.sh | 6 +- examples/python/client_example.py | 4 +- .../.cargo/config.toml | 0 {babushka-core => glide-core}/Cargo.toml | 2 +- {babushka-core => glide-core}/README.md | 0 .../THIRD_PARTY_LICENSES_RUST | 0 .../benches/connections_benchmark.rs | 10 +- .../benches/memory_benchmark.rs | 2 +- .../benches/rotating_buffer_benchmark.rs | 6 +- {babushka-core => glide-core}/build.rs | 0 .../src/client/mod.rs | 8 +- .../src/client/reconnecting_connection.rs | 0 .../src/client/standalone_client.rs | 0 {babushka-core => glide-core}/src/lib.rs | 0 .../src/protobuf/connection_request.proto | 0 .../src/protobuf/redis_request.proto | 0 .../src/protobuf/response.proto | 0 .../src/retry_strategies.rs | 0 .../src/rotating_buffer.rs | 0 .../src/socket_listener.rs | 2 +- .../tests/test_client.rs | 2 +- .../tests/test_cluster_client.rs | 2 +- .../tests/test_socket_listener.rs | 8 +- .../tests/test_standalone_client.rs | 8 +- .../tests/utilities/cluster.rs | 4 +- .../tests/utilities/mocks.rs | 0 .../tests/utilities/mod.rs | 4 +- java/Cargo.toml | 5 +- java/README.md | 12 +- java/benchmarks/build.gradle | 2 +- .../benchmarks/BenchmarkingApp.java | 20 +- .../benchmarks/clients/AsyncClient.java | 2 +- .../benchmarks/clients/Client.java | 4 +- .../benchmarks/clients/SyncClient.java | 2 +- .../benchmarks/clients/jedis/JedisClient.java | 6 +- .../clients/lettuce/LettuceAsyncClient.java | 6 +- .../benchmarks/utils/Benchmarking.java | 10 +- .../benchmarks/utils/ChosenAction.java | 2 +- .../benchmarks/utils/ConnectionSettings.java | 2 +- .../benchmarks/utils/JsonWriter.java | 2 +- .../benchmarks/utils/LatencyResults.java | 2 +- java/client/build.gradle | 14 +- .../handlers/CallbackDispatcher.java | 2 +- .../connectors/handlers/ChannelHandler.java | 6 +- .../ProtobufSocketChannelInitializer.java | 2 +- .../connectors/handlers/ReadHandler.java | 4 +- .../connectors/resources/Platform.java | 4 +- .../GlideCoreNativeDefinitions.java} | 6 +- java/settings.gradle | 2 +- java/src/lib.rs | 6 +- logger_core/src/lib.rs | 6 +- logger_core/tests/test_logger.rs | 2 +- node/.gitignore | 2 +- node/DEVELOPER.md | 6 +- node/README.md | 24 +- node/THIRD_PARTY_LICENSES_NODE | 208 -- node/npm/{babushka => glide}/.gitignore | 0 node/npm/{babushka => glide}/index.ts | 8 +- node/npm/{babushka => glide}/package.json | 14 +- node/npm/{babushka => glide}/tsconfig.json | 0 node/package.json | 12 +- node/rust-client/Cargo.toml | 4 +- node/rust-client/package.json | 6 +- node/rust-client/src/lib.rs | 8 +- node/src/BaseClient.ts | 2 +- node/src/Commands.ts | 2 +- node/src/Logger.ts | 2 +- node/tests/AsyncClient.test.ts | 2 +- node/tests/RedisClientInternals.test.ts | 4 +- node/tests/SharedTests.ts | 4 +- python/Cargo.toml | 6 +- python/DEVELOPER.md | 24 +- python/README.md | 20 +- python/THIRD_PARTY_LICENSES_PYTHON | 2858 ++++++++--------- python/pyproject.toml | 2 +- python/python/{pybushka => glide}/__init__.py | 18 +- .../async_commands/__init__.py | 0 .../async_commands/cluster_commands.py | 10 +- .../async_commands/core.py | 6 +- .../async_commands/standalone_commands.py | 8 +- .../async_commands/transaction.py | 4 +- python/python/{pybushka => glide}/config.py | 6 +- .../python/{pybushka => glide}/constants.py | 6 +- .../python/{pybushka => glide}/exceptions.py | 0 .../pybushka.pyi => glide/glide.pyi} | 2 +- python/python/{pybushka => glide}/logger.py | 4 +- .../{pybushka => glide}/protobuf_codec.py | 0 python/python/{pybushka => glide}/py.typed | 0 .../{pybushka => glide}/redis_client.py | 28 +- python/python/{pybushka => glide}/routes.py | 4 +- python/python/tests/conftest.py | 8 +- python/python/tests/test_async_client.py | 24 +- python/python/tests/test_config.py | 8 +- python/python/tests/test_proto_coded.py | 6 +- python/python/tests/test_transaction.py | 8 +- python/python/tests/test_utils.py | 2 +- python/python/tests/utils/cluster.py | 2 +- python/src/lib.rs | 6 +- utils/cluster_manager.py | 7 +- 136 files changed, 1808 insertions(+), 2016 deletions(-) rename csharp/lib/{babushka.csproj => glide.csproj} (86%) rename {babushka-core => glide-core}/.cargo/config.toml (100%) rename {babushka-core => glide-core}/Cargo.toml (98%) rename {babushka-core => glide-core}/README.md (100%) rename {babushka-core => glide-core}/THIRD_PARTY_LICENSES_RUST (100%) rename {babushka-core => glide-core}/benches/connections_benchmark.rs (95%) rename {babushka-core => glide-core}/benches/memory_benchmark.rs (99%) rename {babushka-core => glide-core}/benches/rotating_buffer_benchmark.rs (99%) rename {babushka-core => glide-core}/build.rs (100%) rename {babushka-core => glide-core}/src/client/mod.rs (97%) rename {babushka-core => glide-core}/src/client/reconnecting_connection.rs (100%) rename {babushka-core => glide-core}/src/client/standalone_client.rs (100%) rename {babushka-core => glide-core}/src/lib.rs (100%) rename {babushka-core => glide-core}/src/protobuf/connection_request.proto (100%) rename {babushka-core => glide-core}/src/protobuf/redis_request.proto (100%) rename {babushka-core => glide-core}/src/protobuf/response.proto (100%) rename {babushka-core => glide-core}/src/retry_strategies.rs (100%) rename {babushka-core => glide-core}/src/rotating_buffer.rs (100%) rename {babushka-core => glide-core}/src/socket_listener.rs (99%) rename {babushka-core => glide-core}/tests/test_client.rs (99%) rename {babushka-core => glide-core}/tests/test_cluster_client.rs (99%) rename {babushka-core => glide-core}/tests/test_socket_listener.rs (99%) rename {babushka-core => glide-core}/tests/test_standalone_client.rs (97%) rename {babushka-core => glide-core}/tests/utilities/cluster.rs (99%) rename {babushka-core => glide-core}/tests/utilities/mocks.rs (100%) rename {babushka-core => glide-core}/tests/utilities/mod.rs (99%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/BenchmarkingApp.java (94%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/clients/AsyncClient.java (96%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/clients/Client.java (66%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/clients/SyncClient.java (81%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/clients/jedis/JedisClient.java (89%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/clients/lettuce/LettuceAsyncClient.java (93%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/utils/Benchmarking.java (97%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/utils/ChosenAction.java (67%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/utils/ConnectionSettings.java (91%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/utils/JsonWriter.java (99%) rename java/benchmarks/src/main/java/{babushka => glide}/benchmarks/utils/LatencyResults.java (96%) rename java/client/src/main/java/{babushka => glide}/connectors/handlers/CallbackDispatcher.java (98%) rename java/client/src/main/java/{babushka => glide}/connectors/handlers/ChannelHandler.java (94%) rename java/client/src/main/java/{babushka => glide}/connectors/handlers/ProtobufSocketChannelInitializer.java (97%) rename java/client/src/main/java/{babushka => glide}/connectors/handlers/ReadHandler.java (87%) rename java/client/src/main/java/{babushka => glide}/connectors/resources/Platform.java (98%) rename java/client/src/main/java/{babushka/ffi/resolvers/BabushkaCoreNativeDefinitions.java => glide/ffi/resolvers/GlideCoreNativeDefinitions.java} (81%) rename node/npm/{babushka => glide}/.gitignore (100%) rename node/npm/{babushka => glide}/index.ts (76%) rename node/npm/{babushka => glide}/package.json (77%) rename node/npm/{babushka => glide}/tsconfig.json (100%) rename python/python/{pybushka => glide}/__init__.py (72%) rename python/python/{pybushka => glide}/async_commands/__init__.py (100%) rename python/python/{pybushka => glide}/async_commands/cluster_commands.py (97%) rename python/python/{pybushka => glide}/async_commands/core.py (99%) rename python/python/{pybushka => glide}/async_commands/standalone_commands.py (96%) rename python/python/{pybushka => glide}/async_commands/transaction.py (99%) rename python/python/{pybushka => glide}/config.py (98%) rename python/python/{pybushka => glide}/constants.py (72%) rename python/python/{pybushka => glide}/exceptions.py (100%) rename python/python/{pybushka/pybushka.pyi => glide/glide.pyi} (93%) rename python/python/{pybushka => glide}/logger.py (97%) rename python/python/{pybushka => glide}/protobuf_codec.py (100%) rename python/python/{pybushka => glide}/py.typed (100%) rename python/python/{pybushka => glide}/redis_client.py (92%) rename python/python/{pybushka => glide}/routes.py (92%) diff --git a/.github/workflows/build-node-wrapper/action.yml b/.github/workflows/build-node-wrapper/action.yml index 7b6d6f8985..19e21ad4b0 100644 --- a/.github/workflows/build-node-wrapper/action.yml +++ b/.github/workflows/build-node-wrapper/action.yml @@ -62,7 +62,7 @@ runs: working-directory: ./node run: | # set the package name - name="babushka" + name="glide-for-redis" # derive the OS and architecture from the inputs export node_os="${{ inputs.named_os }}" export node_arch="${{ inputs.arch }}" diff --git a/.github/workflows/build-python-wrapper/action.yml b/.github/workflows/build-python-wrapper/action.yml index 0b686db40e..d3b884aefb 100644 --- a/.github/workflows/build-python-wrapper/action.yml +++ b/.github/workflows/build-python-wrapper/action.yml @@ -48,9 +48,9 @@ runs: run: | export PATH="$PATH:$HOME/.local/bin" MYPY_PROTOC_PATH=`which protoc-gen-mypy` - protoc --plugin=protoc-gen-mypy=${MYPY_PROTOC_PATH} -Iprotobuf=./babushka-core/src/protobuf/ --python_out=./python/python/pybushka --mypy_out=./python/python/pybushka ./babushka-core/src/protobuf/*.proto + protoc --plugin=protoc-gen-mypy=${MYPY_PROTOC_PATH} -Iprotobuf=./glide-core/src/protobuf/ --python_out=./python/python/glide --mypy_out=./python/python/glide ./glide-core/src/protobuf/*.proto - - name: Build Pybushka + - name: Build GLIDE shell: bash working-directory: ./python if: ${{ inputs.publish != 'true' }} diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b2cc5cc5cf..20ba4b4b2b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -235,9 +235,9 @@ jobs: - name: Create package.json file shell: bash - working-directory: ./node/npm/babushka + working-directory: ./node/npm/glide run: | - export pkg_name=babushka + export pkg_name=glide-for-redis echo "${GITHUB_REF:11}" export package_version=${GITHUB_REF:11} export scope=`if [ "$NPM_SCOPE" != '' ]; then echo "$NPM_SCOPE/"; fi` @@ -258,18 +258,18 @@ jobs: - name: Create a directory for the packed packages shell: bash - working-directory: ./node/npm/babushka + working-directory: ./node/npm/glide run: mkdir packages - name: Download the packed packages id: download uses: actions/download-artifact@v3 with: - path: ./node/npm/babushka/packages + path: ./node/npm/glide/packages - name: Install the packed packages shell: bash - working-directory: ./node/npm/babushka + working-directory: ./node/npm/glide run: | ls -LR packages/ packages_list=`find ${{steps.download.outputs.download-path}} -type f -follow -print` @@ -284,7 +284,7 @@ jobs: - name: Publish the base package shell: bash - working-directory: ./node/npm/babushka + working-directory: ./node/npm/glide run: | # Copy the main README file cp ../../README.md . diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index 38cb3d8479..cb447dbc16 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -5,13 +5,13 @@ on: branches: ["main"] paths: - csharp/** - - babushka-core/** + - glide-core/** - submodules/** - .github/workflows/csharp.yml pull_request: paths: - csharp/** - - babushka-core/src/** + - glide-core/src/** - submodules/** - .github/workflows/csharp.yml @@ -42,7 +42,7 @@ jobs: - name: Install protoc (protobuf) uses: arduino/setup-protoc@v2.1.0 with: - version: "25.1" + version: "25.1" - name: Set up dotnet uses: actions/setup-dotnet@v3 diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index f52e944e6d..1e610a9970 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -4,13 +4,13 @@ on: push: branches: ["main"] paths: - - babushka-core/** + - glide-core/** - submodules/** - "java/**" - ".github/workflows/java.yml" pull_request: paths: - - babushka-core/** + - glide-core/** - submodules/** - "java/**" - ".github/workflows/java.yml" @@ -73,16 +73,16 @@ jobs: # - uses: ./.github/workflows/test-benchmark # with: # language-flag: -java - + lint-rust: timeout-minutes: 15 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: - submodules: recursive + submodules: recursive - uses: ./.github/workflows/lint-rust with: - cargo-toml-folder: ./java - name: lint java rust + cargo-toml-folder: ./java + name: lint java rust diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 15d396f943..a047424a93 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -4,7 +4,7 @@ on: push: branches: ["main"] paths: - - babushka-core/** + - glide-core/** - submodules/** - node/** - utils/cluster_manager.py @@ -13,7 +13,7 @@ on: - .github/workflows/install-shared-dependencies/action.yml pull_request: paths: - - babushka-core/src/** + - glide-core/src/** - submodules/** - node/** - utils/cluster_manager.py diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index ca4fdfe82e..9f499f2f50 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -5,7 +5,7 @@ on: branches: ["main"] paths: - python/** - - babushka-core/src/** + - glide-core/src/** - submodules/** - utils/cluster_manager.py - .github/workflows/python.yml @@ -14,7 +14,7 @@ on: pull_request: paths: - python/** - - babushka-core/src/** + - glide-core/src/** - submodules/** - utils/cluster_manager.py - .github/workflows/python.yml @@ -65,9 +65,9 @@ jobs: working-directory: ./python run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/* + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --extend-ignore=E230 --exclude=python/glide/protobuf,.env/* # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/* + flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --extend-ignore=E230 --exclude=python/glide/protobuf,.env/* - name: Lint with black working-directory: ./python diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index aa6e3f9b9e..8768e40b9c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,14 +5,14 @@ on: branches: [main] paths: - logger_core/** - - babushka-core/** + - glide-core/** - submodules/** - utils/cluster_manager.py - .github/workflows/rust.yml pull_request: paths: - logger_core/** - - babushka-core/** + - glide-core/** - submodules/** - utils/cluster_manager.py - .github/workflows/rust.yml @@ -51,7 +51,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Run tests - working-directory: ./babushka-core + working-directory: ./glide-core run: cargo test -- --nocapture --test-threads=1 # TODO remove the concurrency limit after we fix test flakyness. - name: Run logger tests @@ -59,7 +59,7 @@ jobs: run: cargo test -- --nocapture --test-threads=1 - name: Check features - working-directory: ./babushka-core + working-directory: ./glide-core run: | cargo check --benches --all-features cargo check --no-default-features @@ -78,8 +78,8 @@ jobs: - uses: ./.github/workflows/lint-rust with: - cargo-toml-folder: ./babushka-core - name: lint babushka-core + cargo-toml-folder: ./glide-core + name: lint glide-core - uses: ./.github/workflows/lint-rust with: diff --git a/.github/workflows/test-benchmark/action.yml b/.github/workflows/test-benchmark/action.yml index 9c3d3484dc..91cc36697f 100644 --- a/.github/workflows/test-benchmark/action.yml +++ b/.github/workflows/test-benchmark/action.yml @@ -15,4 +15,4 @@ runs: - shell: bash working-directory: ./benchmarks - run: ./install_and_test.sh -no-tls -minimal -only-babushka -data 1 -tasks 10 ${{ inputs.language-flag }} + run: ./install_and_test.sh -no-tls -minimal -only-glide -data 1 -tasks 10 ${{ inputs.language-flag }} diff --git a/.gitignore b/.gitignore index ad4f5014ba..2ee4e82601 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ Cargo.lock *.pdb dump.rdb .env +python/.env* benchmarks/results # IDE generaged files @@ -37,7 +38,12 @@ node_modules/ install_and_test_cp.sh -babushka-logs/ +glide-logs/ logger-rs.linux-x64-gnu.node utils/clusters/ utils/tls_crts/ + +# OSS Review Toolkit (ORT) files +**/ort/** +**/ort_results/** +**/.ort.yml diff --git a/.vscode/settings.json b/.vscode/settings.json index c2070fd9f1..82ebf9c98a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,7 @@ "files.trimFinalNewlines": true, "python.formatting.provider": "black", "rust-analyzer.linkedProjects": [ - "babushka-core/Cargo.toml", + "glide-core/Cargo.toml", "python/Cargo.toml", "node/rust-client/Cargo.toml", "logger_core/Cargo.toml", diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ac44b9200..22659df058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## 0.1.0 -Preview release of **babushka** a Polyglot Redis client. +Preview release of **GLIDE for Redis** a Polyglot Redis client. See the [README](README.md) for additional information. diff --git a/CODEOWNERS b/CODEOWNERS index bbcdebd221..3dc9aa40c2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @aws/babushka +* @aws/glide diff --git a/README.md b/README.md index c2c2d4e273..3de4d01d3a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ -# Babushka (Temporary Name) -[The followig short description is place holder, copied from PRFAQ - should not be reviewed] -Babushka is a Redis client. It’s free, open-sourced under a permissive license (Apache 2.0), sponsored by AWS and connects to any Redis datastore. Over the years, AWS has gained operational experience in managing ElastiCache for Redis and MemoryDB at a very large scale. We know that the client library is key for reliability, performance, and security. We brought this operational experience to Babushka, and we optimized it for open-source and managed Redis workloads running on AWS. Here are some examples: Babushka is configured by default with an exponential backoff retry strategy to prevent connection storms. To handle cluster topology changes better, Babushka proactively checks DNS endpoints validity, and auto-triggers DNS refreshes. Customers do not experience slowness originating from bad connections configuration, because Babushka uses a smart connection multiplexing algorithm. Babushka is built with a common core layer, written in Rust, which can be extended to support various programming languages. With this release, Babushka supports Python and TypeScript. Having a common core ensures consistency across all supported languages, and provides a unified client experience, which means similar behavior and functionality. +# GLIDE for Redis +General Language Independent Driver for the Enterprise (GLIDE) for Redis, is an AWS-sponsored, open-source Redis client. GLIDE for Redis works with any Redis distribution that adheres to the Redis Serialization Protocol (RESP) specification, including open-source Redis, Amazon ElastiCache for Redis, and Amazon MemoryDB for Redis. +Strategic, mission-critical Redis-based applications have requirements for security, optimized performance, minimal downtime, and observability. GLIDE for Redis is designed to provide a client experience that helps meet these objectives. It is sponsored and supported by AWS, and comes pre-configured with best practices learned from over a decade of operating Redis-compatible services used by hundreds of thousands of customers. To help ensure consistency in development and operations, GLIDE for Redis is implemented using a core driver framework, written in Rust, with extensions made available for each supported programming language. This design ensures that updates easily propagate to each language and reduces overall complexity. In this Preview release, GLIDE for Redis is available for Python and Javascript (Node.js), with support for Java actively under development. ## Supported Redis Versions -Redis 6 and above +GLIDE for Redis is API-compatible with open source Redis version 6 and 7. ## Current Status -Babushka is currently a **beta release** and is recommended for testing purposes only. We're tracking its production readiness and future features on the [roadmap](https://github.com/orgs/aws/projects/165/). +We've made GLIDE for Redis an open-source project, and are releasing it in Preview to the community to gather feedback, and actively collaborate on the project roadmap. We welcome questions and contributions from all Redis stakeholders. +This preview release is recommended for testing purposes only. It is available in Python and Javascript (Node.js), with Java to follow. We're tracking its production readiness and future features on the [roadmap](https://github.com/orgs/aws/projects/165/). ## Getting Started @@ -15,12 +16,12 @@ Babushka is currently a **beta release** and is recommended for testing purposes - [Python](./python/README.md) ## Getting Help -If you have any questions, feature requests, encounter issues, or need assistance with this project, please don't hesitate to open a GitHub issue. Our community and contributors are here to help you. Before creating an issue, we recommend checking the [existing issues](https://github.com/aws/babushka/issues) to see if your question or problem has already been addressed. If not, feel free to create a new issue, and we'll do our best to assist you. Please provide as much detail as possible in your issue description, including: +If you have any questions, feature requests, encounter issues, or need assistance with this project, please don't hesitate to open a GitHub issue. Our community and contributors are here to help you. Before creating an issue, we recommend checking the [existing issues](https://github.com/aws/glide/issues) to see if your question or problem has already been addressed. If not, feel free to create a new issue, and we'll do our best to assist you. Please provide as much detail as possible in your issue description, including: 1. A clear and concise title 2. Detailed description of the problem or question 3. A reproducible test case or series of steps -4. The Babushka version in use +4. The GLIDE version in use 5. Operating system 6. Redis version 7. Redis cluster information, cluster topology, number of shards, number of replicas, used data types diff --git a/benchmarks/.gitignore b/benchmarks/.gitignore index 7b7157e580..7888797416 100644 --- a/benchmarks/.gitignore +++ b/benchmarks/.gitignore @@ -133,7 +133,7 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* -*babushka*.node +*glide*.node yarn.lock diff --git a/benchmarks/csharp/Program.cs b/benchmarks/csharp/Program.cs index e9c3cf3431..b2db9070a9 100644 --- a/benchmarks/csharp/Program.cs +++ b/benchmarks/csharp/Program.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; -using babushka; +using Glide; using CommandLine; using LinqStatistics; using StackExchange.Redis; @@ -282,20 +282,20 @@ private static async Task run_with_parameters(int total_commands, int clientCount, bool useTLS) { - if (clientsToRun == "all" || clientsToRun == "babushka") + if (clientsToRun == "all" || clientsToRun == "glide") { var clients = await createClients(clientCount, () => { - var babushka_client = new AsyncClient(host, PORT, useTLS); + var glide_client = new AsyncClient(host, PORT, useTLS); return Task.FromResult<(Func>, Func, Action)>( - (async (key) => await babushka_client.GetAsync(key), - async (key, value) => await babushka_client.SetAsync(key, value), - () => babushka_client.Dispose())); + (async (key) => await glide_client.GetAsync(key), + async (key, value) => await glide_client.SetAsync(key, value), + () => glide_client.Dispose())); }); await run_clients( clients, - "babushka", + "glide", total_commands, data_size, num_of_concurrent_tasks diff --git a/benchmarks/csharp/csharp_benchmark.csproj b/benchmarks/csharp/csharp_benchmark.csproj index 189100a26d..2d8868d9df 100644 --- a/benchmarks/csharp/csharp_benchmark.csproj +++ b/benchmarks/csharp/csharp_benchmark.csproj @@ -1,7 +1,7 @@ - + diff --git a/benchmarks/install_and_test.sh b/benchmarks/install_and_test.sh index e5793edc23..dcbaa9307d 100755 --- a/benchmarks/install_and_test.sh +++ b/benchmarks/install_and_test.sh @@ -37,7 +37,7 @@ javaTlsFlag="-tls" function runPythonBenchmark(){ # generate protobuf files - protoc -Iprotobuf=${BABUSHKA_HOME_FOLDER}/babushka-core/src/protobuf/ --python_out=${PYTHON_FOLDER}/python/pybushka ${BABUSHKA_HOME_FOLDER}/babushka-core/src/protobuf/*.proto + protoc -Iprotobuf=${GLIDE_HOME_FOLDER}/glide-core/src/protobuf/ --python_out=${PYTHON_FOLDER}/python/glide ${GLIDE_HOME_FOLDER}/glide-core/src/protobuf/*.proto cd ${PYTHON_FOLDER} $pythonCommand -m venv .env source .env/bin/activate @@ -103,7 +103,7 @@ script=`pwd`/${BASH_SOURCE[0]} RELATIVE_BENCH_PATH=`dirname ${script}` export BENCH_FOLDER=`realpath ${RELATIVE_BENCH_PATH}` export PYTHON_FOLDER="${BENCH_FOLDER}/../python" -export BABUSHKA_HOME_FOLDER="${BENCH_FOLDER}/.." +export GLIDE_HOME_FOLDER="${BENCH_FOLDER}/.." export BENCH_RESULTS_FOLDER="${BENCH_FOLDER}/results" identifier=$(date +"%F")-$(date +"%H")-$(date +"%M")-$(date +"%S") # Create results folder @@ -135,9 +135,9 @@ function Help() { echo " 2 clients, 100 concurrent tasks and 20 bytes of data per value, " echo and the outputs will be saved to a file prefixed with \"foo\". echo - echo Pass -only-ffi to only run Babushka FFI based clients. - echo Pass -only-socket to only run Babushka socket based clients. - echo Pass -only-babushka to only run Babushk clients. + echo Pass -only-ffi to only run GLIDE FFI based clients. + echo Pass -only-socket to only run GLIDE socket based clients. + echo Pass -only-glide to only run GLIDE clients. echo Pass -is-cluster if the host is a Cluster server. Otherwise the server is assumed to be in standalone mode. echo The benchmark will connect to the server using transport level security \(TLS\) by default. Pass -no-tls to connect to server without TLS. echo By default, the benchmark runs against localhost. Pass -host and then the address of the requested Redis server in order to connect to a different server. @@ -194,7 +194,6 @@ do -java) runAllBenchmarks=0 runJava=1 - chosenClients="Babushka" ;; -lettuce) runAllBenchmarks=0 @@ -214,8 +213,8 @@ do runAllBenchmarks=0 runRust=1 ;; - -only-babushka) - chosenClients="babushka" + -only-glide) + chosenClients="glide" ;; -no-csv) writeResultsCSV=0 ;; -no-tls) diff --git a/benchmarks/node/node_benchmark.ts b/benchmarks/node/node_benchmark.ts index 246166d323..c78595fb73 100644 --- a/benchmarks/node/node_benchmark.ts +++ b/benchmarks/node/node_benchmark.ts @@ -1,5 +1,5 @@ -import { Logger, RedisClient, RedisClusterClient } from "babushka-rs"; import { writeFileSync } from "fs"; +import { Logger, RedisClient, RedisClusterClient } from "glide-for-redis"; import percentile from "percentile"; import { RedisClientType, createClient, createCluster } from "redis"; import { stdev } from "stats-lite"; @@ -127,8 +127,7 @@ async function run_clients( ) { const now = new Date(); console.log( - `Starting ${client_name} data size: ${data_size} concurrency: ${num_of_concurrent_tasks} client count: ${ - clients.length + `Starting ${client_name} data size: ${data_size} concurrency: ${num_of_concurrent_tasks} client count: ${clients.length } is_cluster: ${is_cluster} ${now.toLocaleTimeString()}` ); const action_latencies = { @@ -192,7 +191,7 @@ async function main( total_commands: number, num_of_concurrent_tasks: number, data_size: number, - clients_to_run: "all" | "babushka", + clients_to_run: "all" | "glide", host: string, clientCount: number, useTLS: boolean, @@ -200,7 +199,7 @@ async function main( port: number ) { const data = generate_value(data_size); - if (clients_to_run == "all" || clients_to_run == "babushka") { + if (clients_to_run == "all" || clients_to_run == "glide") { const clientClass = clusterModeEnabled ? RedisClusterClient : RedisClient; @@ -212,7 +211,7 @@ async function main( ); await run_clients( clients, - "babushka", + "glide", total_commands, num_of_concurrent_tasks, data_size, @@ -232,14 +231,14 @@ async function main( }; const node_redis_client = clusterModeEnabled ? createCluster({ - rootNodes: [{ socket: { host, port, tls: useTLS } }], - defaults: { - socket: { - tls: useTLS, - }, - }, - useReplicas: true, - }) + rootNodes: [{ socket: { host, port, tls: useTLS } }], + defaults: { + socket: { + tls: useTLS, + }, + }, + useReplicas: true, + }) : createClient(node); await node_redis_client.connect(); return node_redis_client; diff --git a/benchmarks/node/package.json b/benchmarks/node/package.json index c8b640ee08..f2b90c0f1d 100644 --- a/benchmarks/node/package.json +++ b/benchmarks/node/package.json @@ -11,7 +11,7 @@ "dependencies": { "@types/command-line-args": "^5.2.0", "@types/stats-lite": "^2.2.0", - "babushka-rs": "file:../../node", + "glide-for-redis": "file:../../node", "command-line-args": "^5.2.1", "redis": "^4.6.2", "stats-lite": "^2.2.0", diff --git a/benchmarks/python/python_benchmark.py b/benchmarks/python/python_benchmark.py index f06432cf6f..c22eb60da2 100644 --- a/benchmarks/python/python_benchmark.py +++ b/benchmarks/python/python_benchmark.py @@ -11,7 +11,7 @@ import numpy as np import redis.asyncio as redispy # type: ignore -from pybushka import ( +from glide import ( BaseClientConfiguration, Logger, LogLevel, @@ -277,8 +277,8 @@ async def main( for client in clients: await client.aclose() - if clients_to_run == "all" or clients_to_run == "babushka": - # Babushka Socket + if clients_to_run == "all" or clients_to_run == "glide": + # Glide Socket client_class = RedisClusterClient if is_cluster else RedisClient config = BaseClientConfiguration( [NodeAddress(host=host, port=port)], use_tls=use_tls @@ -289,7 +289,7 @@ async def main( ) await run_clients( clients, - "babushka", + "glide", event_loop_name, total_commands, num_of_concurrent_tasks, diff --git a/benchmarks/rust/Cargo.toml b/benchmarks/rust/Cargo.toml index bffbad8985..c9a35e861f 100644 --- a/benchmarks/rust/Cargo.toml +++ b/benchmarks/rust/Cargo.toml @@ -9,7 +9,7 @@ authors = ["Amazon Web Services"] [dependencies] tokio = { version = "1", features = ["macros", "time", "rt-multi-thread"] } -babushka = { path = "../../babushka-core" } +glide-core = { path = "../../glide-core" } logger_core = {path = "../../logger_core"} redis = { path = "../../submodules/redis-rs/redis", features = ["aio"] } futures = "0.3.28" diff --git a/benchmarks/rust/src/main.rs b/benchmarks/rust/src/main.rs index e12502f3b8..e69d9e85dc 100644 --- a/benchmarks/rust/src/main.rs +++ b/benchmarks/rust/src/main.rs @@ -1,9 +1,9 @@ -use babushka::{ +use clap::Parser; +use futures::{self, future::join_all, stream, StreamExt}; +use glide_core::{ client::Client, connection_request::{ConnectionRequest, NodeAddress, TlsMode}, }; -use clap::Parser; -use futures::{self, future::join_all, stream, StreamExt}; use rand::{thread_rng, Rng}; use serde_json::Value; use std::{ @@ -123,7 +123,7 @@ async fn perform_benchmark(args: Args) { acc }); let mut results_json = HashMap::new(); - results_json.insert("client".to_string(), Value::String("babushka".to_string())); + results_json.insert("client".to_string(), Value::String("glide".to_string())); results_json.insert( "num_of_tasks".to_string(), Value::Number((*concurrent_tasks_count).into()), @@ -218,7 +218,7 @@ async fn get_connection(args: &Args) -> Client { connection_request.request_timeout = 2000; connection_request.cluster_mode_enabled = args.cluster_mode_enabled; - babushka::client::Client::new(connection_request) + glide_core::client::Client::new(connection_request) .await .unwrap() } diff --git a/csharp/csharp.sln b/csharp/csharp.sln index b3427147a2..8458290dfe 100644 --- a/csharp/csharp.sln +++ b/csharp/csharp.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "babushka", "lib\babushka.csproj", "{32EC49AD-EB2E-4B07-8644-E56E4EC517BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "glide", "lib\glide.csproj", "{32EC49AD-EB2E-4B07-8644-E56E4EC517BD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests\tests.csproj", "{B5A73329-1C34-4D33-8013-D030983A59FF}" EndProject diff --git a/csharp/lib/AsyncClient.cs b/csharp/lib/AsyncClient.cs index 4e4944e6c4..a47cf4810d 100644 --- a/csharp/lib/AsyncClient.cs +++ b/csharp/lib/AsyncClient.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace babushka +namespace Glide { public class AsyncClient : IDisposable { @@ -95,17 +95,17 @@ private void FailureCallback(ulong index) private delegate void StringAction(ulong index, IntPtr str); private delegate void FailureAction(ulong index); - [DllImport("libbabushka_csharp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "get")] + [DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "get")] private static extern void GetFfi(IntPtr client, ulong index, IntPtr key); - [DllImport("libbabushka_csharp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "set")] + [DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "set")] private static extern void SetFfi(IntPtr client, ulong index, IntPtr key, IntPtr value); private delegate void IntAction(IntPtr arg); - [DllImport("libbabushka_csharp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "create_client")] + [DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "create_client")] private static extern IntPtr CreateClientFfi(String host, UInt32 port, bool useTLS, IntPtr successCallback, IntPtr failureCallback); - [DllImport("libbabushka_csharp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "close_client")] + [DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "close_client")] private static extern void CloseClientFfi(IntPtr client); #endregion diff --git a/csharp/lib/Cargo.toml b/csharp/lib/Cargo.toml index 2bc009acf1..f0f9f0889c 100644 --- a/csharp/lib/Cargo.toml +++ b/csharp/lib/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "babushka_csharp" +name = "glide-rs" version = "0.1.0" edition = "2021" license = "Apache-2.0" @@ -8,11 +8,12 @@ authors = ["Amazon Web Services"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] +name = "glide_rs" crate-type = ["cdylib"] [dependencies] redis = { path = "../../submodules/redis-rs/redis", features = ["aio", "tokio-comp","tokio-native-tls-comp"] } -babushka = { path = "../../babushka-core" } +glide-core = { path = "../../glide-core" } tokio = { version = "^1", features = ["rt", "macros", "rt-multi-thread", "time"] } num-derive = "0.4.0" num-traits = "0.2.15" diff --git a/csharp/lib/Logger.cs b/csharp/lib/Logger.cs index 2a358a4345..29bbd958cf 100644 --- a/csharp/lib/Logger.cs +++ b/csharp/lib/Logger.cs @@ -2,7 +2,7 @@ using System.Text; -namespace babushka +namespace Glide { // TODO - use a bindings generator to create this enum. public enum Level @@ -59,7 +59,7 @@ internal static void Log(Level logLevel, string logIdentifier, string message) #region public methods // config the logger instance - in fact - create new logger instance with the new args // exist in addition to init for two main reason's: - // 1. if Babushka dev want intentionally to change the logger instance configuration + // 1. if GLIDE dev want intentionally to change the logger instance configuration // 2. external user want to set the logger and we don't want to return to him the logger itself, just config it // the level argument is the level of the logs you want the system to provide (error logs, warn logs, etc.) // the filename argument is optional - if provided the target of the logs will be the file mentioned, else will be the console @@ -71,10 +71,10 @@ public static void SetLoggerConfig(Level? level, string? filename = null) #endregion public methods #region FFI function declaration - [DllImport("libbabushka_csharp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "log")] + [DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "log")] private static extern void log(Int32 logLevel, byte[] logIdentifier, byte[] message); - [DllImport("libbabushka_csharp", CallingConvention = CallingConvention.Cdecl, EntryPoint = "init")] + [DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "init")] private static extern Level InitInternalLogger(Int32 level, byte[]? filename); #endregion diff --git a/csharp/lib/Message.cs b/csharp/lib/Message.cs index b7a9ea2021..8faafd37fa 100644 --- a/csharp/lib/Message.cs +++ b/csharp/lib/Message.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using babushka; +using Glide; /// Reusable source of ValueTask. This object can be allocated once and then reused /// to create multiple asynchronous operations, as long as each call to CreateTask diff --git a/csharp/lib/MessageContainer.cs b/csharp/lib/MessageContainer.cs index 7b8895b21c..37876e2be8 100644 --- a/csharp/lib/MessageContainer.cs +++ b/csharp/lib/MessageContainer.cs @@ -1,6 +1,6 @@ using System.Collections.Concurrent; -namespace babushka +namespace Glide { internal class MessageContainer diff --git a/csharp/lib/babushka.csproj b/csharp/lib/glide.csproj similarity index 86% rename from csharp/lib/babushka.csproj rename to csharp/lib/glide.csproj index 61e6303ff6..f8cc254da1 100644 --- a/csharp/lib/babushka.csproj +++ b/csharp/lib/glide.csproj @@ -2,7 +2,7 @@ net6.0 - babushka + Glide enable enable @@ -12,7 +12,7 @@ - + PreserveNewest %(FileName)%(Extension) diff --git a/csharp/lib/src/lib.rs b/csharp/lib/src/lib.rs index 777e2aaffa..2646e4a201 100644 --- a/csharp/lib/src/lib.rs +++ b/csharp/lib/src/lib.rs @@ -1,5 +1,5 @@ -use babushka::connection_request; -use babushka::{client::Client as BabushkaClient, connection_request::NodeAddress}; +use glide_core::connection_request; +use glide_core::{client::Client as GlideClient, connection_request::NodeAddress}; use redis::{Cmd, FromRedisValue, RedisResult}; use std::{ ffi::{c_void, CStr, CString}, @@ -17,7 +17,7 @@ pub enum Level { } pub struct Client { - client: BabushkaClient, + client: GlideClient, success_callback: unsafe extern "C" fn(usize, *const c_char) -> (), failure_callback: unsafe extern "C" fn(usize) -> (), // TODO - add specific error codes runtime: Runtime, @@ -56,10 +56,10 @@ fn create_client_internal( let request = create_connection_request(host_string, port, use_tls); let runtime = Builder::new_multi_thread() .enable_all() - .thread_name("Babushka C# thread") + .thread_name("GLIDE for Redis C# thread") .build()?; let _runtime_handle = runtime.enter(); - let client = runtime.block_on(BabushkaClient::new(request)).unwrap(); // TODO - handle errors. + let client = runtime.block_on(GlideClient::new(request)).unwrap(); // TODO - handle errors. Ok(Client { client, success_callback, diff --git a/csharp/tests/AsyncClientTests.cs b/csharp/tests/AsyncClientTests.cs index b9c6eaef5a..44bece2776 100644 --- a/csharp/tests/AsyncClientTests.cs +++ b/csharp/tests/AsyncClientTests.cs @@ -1,6 +1,6 @@ namespace tests; -using babushka; +using Glide; // TODO - need to start a new redis server for each test? public class AsyncClientTests @@ -8,7 +8,7 @@ public class AsyncClientTests [OneTimeSetUp] public void Setup() { - babushka.Logger.SetLoggerConfig(babushka.Level.Info); + Glide.Logger.SetLoggerConfig(Glide.Level.Info); } private async Task GetAndSetRandomValues(AsyncClient client) diff --git a/csharp/tests/tests.csproj b/csharp/tests/tests.csproj index bf3373fb58..ce974b7cb9 100644 --- a/csharp/tests/tests.csproj +++ b/csharp/tests/tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/examples/node/README.MD b/examples/node/README.MD index bb6e80f8dd..9e666ff66f 100644 --- a/examples/node/README.MD +++ b/examples/node/README.MD @@ -19,14 +19,14 @@ npm i -g npm@8 ``` ## Build -To build Babushka's Node client, run (on unix based systems): +To build GLIDE's Node client, run (on unix based systems): ``` -cd babushka/node +cd glide-for-redis/node git submodule update --init --recursive npm install rm -rf build-ts npm run build:release -cd babushka/examples/node +cd glide-for-redis/examples/node npm install npx tsc ``` @@ -34,6 +34,6 @@ npx tsc ## Run To run the example: ``` -cd babushka/examples/node +cd glide-for-redis/examples/node node index.js ``` diff --git a/examples/node/index.ts b/examples/node/index.ts index 51bb38b1b6..77666e7bbd 100644 --- a/examples/node/index.ts +++ b/examples/node/index.ts @@ -1,4 +1,4 @@ -import { Logger, RedisClient, RedisClusterClient } from "babushka-rs"; +import { Logger, RedisClient, RedisClusterClient } from "glide-for-redis"; async function sendPingToNode() { // When in Redis is in standalone mode, add address of the primary node, and any replicas you'd like to be able to read from. @@ -48,7 +48,7 @@ async function sendPingToRandomNodeInCluster() { } function setFileLogger() { - Logger.setLoggerConfig("warn", "babushka.log"); + Logger.setLoggerConfig("warn", "glide.log"); } function setConsoleLogger() { diff --git a/examples/node/package.json b/examples/node/package.json index e3c49d7f4c..ee25b8f1e8 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -2,7 +2,7 @@ "type": "module", "dependencies": { "@types/node": "^20.4.8", - "babushka-rs": "file:../../node" + "glide-for-redis": "file:../../node" }, "devDependencies": { "typescript": "^5.1.6" diff --git a/examples/python/README.md b/examples/python/README.md index 86cb885f04..261f112f62 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -11,7 +11,7 @@ Installation for ubuntu: `sudo apt install -y gcc pkg-config protobuf-compiler openssl libssl-dev python3 python3-venv` ## Build -To build Babushka's Python client, run (on unix based systems): +To build GLIDE's Python client, run (on unix based systems): ``` cd examples/python sudo chmod +x build_client.sh @@ -19,7 +19,7 @@ sudo chmod +x build_client.sh ``` ## Run -To run the example or any other Python application utilizing Babushka, activate the virtual environment that created by the 'Build' stage: +To run the example or any other Python application utilizing GLIDE for Redis, activate the virtual environment that created by the 'Build' stage: ``` cd examples/python source .env/bin/activate diff --git a/examples/python/build_client.sh b/examples/python/build_client.sh index ac3a5049fd..ad9a4f4e7d 100755 --- a/examples/python/build_client.sh +++ b/examples/python/build_client.sh @@ -5,11 +5,11 @@ set -x script=`pwd`/${BASH_SOURCE[0]} RELATIVE_BUILD_PATH=`dirname ${script}` export PYTHON_EXAMPLE_FOLDER=`realpath ${RELATIVE_BUILD_PATH}` -export BABUSHKA_HOME_FOLDER="${PYTHON_EXAMPLE_FOLDER}/../.." -export PYTHON_FOLDER="${BABUSHKA_HOME_FOLDER}/python" +export GLIDE_HOME_FOLDER="${PYTHON_EXAMPLE_FOLDER}/../.." +export PYTHON_FOLDER="${GLIDE_HOME_FOLDER}/python" # Generate protobuf files -protoc -Iprotobuf=${BABUSHKA_HOME_FOLDER}/babushka-core/src/protobuf/ --python_out=${PYTHON_FOLDER}/python/pybushka ${BABUSHKA_HOME_FOLDER}/babushka-core/src/protobuf/*.proto +protoc -Iprotobuf=${GLIDE_HOME_FOLDER}/glide-core/src/protobuf/ --python_out=${PYTHON_FOLDER}/python/glide ${GLIDE_HOME_FOLDER}/glide-core/src/protobuf/*.proto cd ${PYTHON_EXAMPLE_FOLDER} # Create a virtual environment python3 -m pip install --user virtualenv diff --git a/examples/python/client_example.py b/examples/python/client_example.py index 7e1b7eb52a..10ec402e7b 100644 --- a/examples/python/client_example.py +++ b/examples/python/client_example.py @@ -1,7 +1,7 @@ import asyncio from typing import Optional, Union -from pybushka import ( +from glide import ( AllNodes, BaseClientConfiguration, Logger, @@ -22,7 +22,7 @@ def set_file_logger(level: LogLevel = LogLevel.WARN, file: Optional[str] = None) curr_time = datetime.now(timezone.utc) curr_time_str = curr_time.strftime("%Y-%m-%dT%H:%M:%SZ") - file = f"{curr_time_str}-babushka.log" + file = f"{curr_time_str}-glide.log" Logger.set_logger_config(level, file) diff --git a/babushka-core/.cargo/config.toml b/glide-core/.cargo/config.toml similarity index 100% rename from babushka-core/.cargo/config.toml rename to glide-core/.cargo/config.toml diff --git a/babushka-core/Cargo.toml b/glide-core/Cargo.toml similarity index 98% rename from babushka-core/Cargo.toml rename to glide-core/Cargo.toml index b05dcf2f99..0640a751cb 100644 --- a/babushka-core/Cargo.toml +++ b/glide-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "babushka" +name = "glide-core" version = "0.1.0" edition = "2021" license = "Apache-2.0" diff --git a/babushka-core/README.md b/glide-core/README.md similarity index 100% rename from babushka-core/README.md rename to glide-core/README.md diff --git a/babushka-core/THIRD_PARTY_LICENSES_RUST b/glide-core/THIRD_PARTY_LICENSES_RUST similarity index 100% rename from babushka-core/THIRD_PARTY_LICENSES_RUST rename to glide-core/THIRD_PARTY_LICENSES_RUST diff --git a/babushka-core/benches/connections_benchmark.rs b/glide-core/benches/connections_benchmark.rs similarity index 95% rename from babushka-core/benches/connections_benchmark.rs rename to glide-core/benches/connections_benchmark.rs index 5743a0112e..e39a41dcf8 100644 --- a/babushka-core/benches/connections_benchmark.rs +++ b/glide-core/benches/connections_benchmark.rs @@ -1,6 +1,6 @@ -use babushka::client::BabushkaClient; use criterion::{criterion_group, criterion_main, Criterion}; use futures::future::join_all; +use glide_core::client::GlideClient; use redis::{ cluster::ClusterClientBuilder, AsyncCommands, ConnectionAddr, ConnectionInfo, RedisConnectionInfo, RedisResult, Value, @@ -8,7 +8,7 @@ use redis::{ use std::env; use tokio::runtime::{Builder, Runtime}; -async fn run_get(mut connection: impl BabushkaClient) -> RedisResult { +async fn run_get(mut connection: impl GlideClient) -> RedisResult { connection.get("foo").await } @@ -16,7 +16,7 @@ fn benchmark_single_get( c: &mut Criterion, connection_id: &str, test_group: &str, - connection: impl BabushkaClient, + connection: impl GlideClient, runtime: &Runtime, ) { let mut group = c.benchmark_group(test_group); @@ -30,7 +30,7 @@ fn benchmark_concurrent_gets( c: &mut Criterion, connection_id: &str, test_group: &str, - connection: impl BabushkaClient, + connection: impl GlideClient, runtime: &Runtime, ) { const ITERATIONS: usize = 100; @@ -54,7 +54,7 @@ fn benchmark( group: &str, connection_creation: Fun, ) where - Con: BabushkaClient, + Con: GlideClient, Fun: FnOnce(ConnectionAddr, &Runtime) -> Con, { let runtime = Builder::new_current_thread().enable_all().build().unwrap(); diff --git a/babushka-core/benches/memory_benchmark.rs b/glide-core/benches/memory_benchmark.rs similarity index 99% rename from babushka-core/benches/memory_benchmark.rs rename to glide-core/benches/memory_benchmark.rs index 48753a1804..200c0da397 100644 --- a/babushka-core/benches/memory_benchmark.rs +++ b/glide-core/benches/memory_benchmark.rs @@ -1,4 +1,4 @@ -use babushka::{ +use glide_core::{ client::Client, connection_request::{ConnectionRequest, NodeAddress, TlsMode}, }; diff --git a/babushka-core/benches/rotating_buffer_benchmark.rs b/glide-core/benches/rotating_buffer_benchmark.rs similarity index 99% rename from babushka-core/benches/rotating_buffer_benchmark.rs rename to glide-core/benches/rotating_buffer_benchmark.rs index 45805238b5..bf88fb4e9c 100644 --- a/babushka-core/benches/rotating_buffer_benchmark.rs +++ b/glide-core/benches/rotating_buffer_benchmark.rs @@ -1,12 +1,12 @@ use std::io::Write; -use babushka::{ +use bytes::BufMut; +use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use glide_core::{ redis_request::{command, redis_request}, redis_request::{Command, RedisRequest, RequestType}, rotating_buffer::RotatingBuffer, }; -use bytes::BufMut; -use criterion::{black_box, criterion_group, criterion_main, Criterion}; use integer_encoding::VarInt; use protobuf::Message; use rand::{distributions::Alphanumeric, Rng}; diff --git a/babushka-core/build.rs b/glide-core/build.rs similarity index 100% rename from babushka-core/build.rs rename to glide-core/build.rs diff --git a/babushka-core/src/client/mod.rs b/glide-core/src/client/mod.rs similarity index 97% rename from babushka-core/src/client/mod.rs rename to glide-core/src/client/mod.rs index a54e766853..6f745d33ab 100644 --- a/babushka-core/src/client/mod.rs +++ b/glide-core/src/client/mod.rs @@ -17,11 +17,11 @@ mod standalone_client; pub const HEARTBEAT_SLEEP_DURATION: Duration = Duration::from_secs(1); -pub trait BabushkaClient: ConnectionLike + Send + Clone {} +pub trait GlideClient: ConnectionLike + Send + Clone {} -impl BabushkaClient for MultiplexedConnection {} -impl BabushkaClient for ConnectionManager {} -impl BabushkaClient for ClusterConnection {} +impl GlideClient for MultiplexedConnection {} +impl GlideClient for ConnectionManager {} +impl GlideClient for ClusterConnection {} pub const DEFAULT_RESPONSE_TIMEOUT: Duration = Duration::from_millis(250); pub const DEFAULT_CONNECTION_ATTEMPT_TIMEOUT: Duration = Duration::from_millis(250); diff --git a/babushka-core/src/client/reconnecting_connection.rs b/glide-core/src/client/reconnecting_connection.rs similarity index 100% rename from babushka-core/src/client/reconnecting_connection.rs rename to glide-core/src/client/reconnecting_connection.rs diff --git a/babushka-core/src/client/standalone_client.rs b/glide-core/src/client/standalone_client.rs similarity index 100% rename from babushka-core/src/client/standalone_client.rs rename to glide-core/src/client/standalone_client.rs diff --git a/babushka-core/src/lib.rs b/glide-core/src/lib.rs similarity index 100% rename from babushka-core/src/lib.rs rename to glide-core/src/lib.rs diff --git a/babushka-core/src/protobuf/connection_request.proto b/glide-core/src/protobuf/connection_request.proto similarity index 100% rename from babushka-core/src/protobuf/connection_request.proto rename to glide-core/src/protobuf/connection_request.proto diff --git a/babushka-core/src/protobuf/redis_request.proto b/glide-core/src/protobuf/redis_request.proto similarity index 100% rename from babushka-core/src/protobuf/redis_request.proto rename to glide-core/src/protobuf/redis_request.proto diff --git a/babushka-core/src/protobuf/response.proto b/glide-core/src/protobuf/response.proto similarity index 100% rename from babushka-core/src/protobuf/response.proto rename to glide-core/src/protobuf/response.proto diff --git a/babushka-core/src/retry_strategies.rs b/glide-core/src/retry_strategies.rs similarity index 100% rename from babushka-core/src/retry_strategies.rs rename to glide-core/src/retry_strategies.rs diff --git a/babushka-core/src/rotating_buffer.rs b/glide-core/src/rotating_buffer.rs similarity index 100% rename from babushka-core/src/rotating_buffer.rs rename to glide-core/src/rotating_buffer.rs diff --git a/babushka-core/src/socket_listener.rs b/glide-core/src/socket_listener.rs similarity index 99% rename from babushka-core/src/socket_listener.rs rename to glide-core/src/socket_listener.rs index 354e0c4709..313f5d0041 100644 --- a/babushka-core/src/socket_listener.rs +++ b/glide-core/src/socket_listener.rs @@ -37,7 +37,7 @@ use ClosingReason::*; use PipeListeningResult::*; /// The socket file name -const SOCKET_FILE_NAME: &str = "babushka-socket"; +const SOCKET_FILE_NAME: &str = "glide-socket"; /// The maximum length of a request's arguments to be passed as a vector of /// strings instead of a pointer diff --git a/babushka-core/tests/test_client.rs b/glide-core/tests/test_client.rs similarity index 99% rename from babushka-core/tests/test_client.rs rename to glide-core/tests/test_client.rs index 465711d103..067855e924 100644 --- a/babushka-core/tests/test_client.rs +++ b/glide-core/tests/test_client.rs @@ -3,7 +3,7 @@ mod utilities; #[cfg(test)] mod shared_client_tests { use super::*; - use babushka::client::Client; + use glide_core::client::Client; use redis::RedisConnectionInfo; use redis::Value; use rstest::rstest; diff --git a/babushka-core/tests/test_cluster_client.rs b/glide-core/tests/test_cluster_client.rs similarity index 99% rename from babushka-core/tests/test_cluster_client.rs rename to glide-core/tests/test_cluster_client.rs index 864db0d9df..f2302ae159 100644 --- a/babushka-core/tests/test_cluster_client.rs +++ b/glide-core/tests/test_cluster_client.rs @@ -5,7 +5,7 @@ mod cluster_client_tests { use std::collections::HashMap; use super::*; - use babushka::connection_request::ReadFrom; + use glide_core::connection_request::ReadFrom; use redis::cluster_routing::{ MultipleNodeRoutingInfo, Route, RoutingInfo, SingleNodeRoutingInfo, SlotAddr, }; diff --git a/babushka-core/tests/test_socket_listener.rs b/glide-core/tests/test_socket_listener.rs similarity index 99% rename from babushka-core/tests/test_socket_listener.rs rename to glide-core/tests/test_socket_listener.rs index b6bdd49a2f..ecd5369202 100644 --- a/babushka-core/tests/test_socket_listener.rs +++ b/glide-core/tests/test_socket_listener.rs @@ -1,4 +1,4 @@ -use babushka::*; +use glide_core::*; use rsevents::{Awaitable, EventState, ManualResetEvent}; use std::io::prelude::*; use std::sync::{Arc, Mutex}; @@ -17,9 +17,9 @@ mod socket_listener { use crate::utilities::mocks::{Mock, ServerMock}; use super::*; - use babushka::redis_request::command::{Args, ArgsArray}; - use babushka::redis_request::{Command, Transaction}; - use babushka::response::{response, ConstantResponse, Response}; + use glide_core::redis_request::command::{Args, ArgsArray}; + use glide_core::redis_request::{Command, Transaction}; + use glide_core::response::{response, ConstantResponse, Response}; use protobuf::{EnumOrUnknown, Message}; use redis::{Cmd, ConnectionAddr, Value}; use redis_request::{RedisRequest, RequestType}; diff --git a/babushka-core/tests/test_standalone_client.rs b/glide-core/tests/test_standalone_client.rs similarity index 97% rename from babushka-core/tests/test_standalone_client.rs rename to glide-core/tests/test_standalone_client.rs index 119b4cacea..010ab0df8c 100644 --- a/babushka-core/tests/test_standalone_client.rs +++ b/glide-core/tests/test_standalone_client.rs @@ -5,7 +5,7 @@ mod standalone_client_tests { use crate::utilities::mocks::{Mock, ServerMock}; use super::*; - use babushka::{client::StandaloneClient, connection_request::ReadFrom}; + use glide_core::{client::StandaloneClient, connection_request::ReadFrom}; use redis::{FromRedisValue, Value}; use rstest::rstest; use utilities::*; @@ -75,8 +75,10 @@ mod standalone_client_tests { }); let _new_server = receiver.await; - tokio::time::sleep(babushka::client::HEARTBEAT_SLEEP_DURATION + Duration::from_secs(1)) - .await; + tokio::time::sleep( + glide_core::client::HEARTBEAT_SLEEP_DURATION + Duration::from_secs(1), + ) + .await; let mut get_command = redis::Cmd::new(); get_command diff --git a/babushka-core/tests/utilities/cluster.rs b/glide-core/tests/utilities/cluster.rs similarity index 99% rename from babushka-core/tests/utilities/cluster.rs rename to glide-core/tests/utilities/cluster.rs index 30c63930de..891eff411c 100644 --- a/babushka-core/tests/utilities/cluster.rs +++ b/glide-core/tests/utilities/cluster.rs @@ -1,8 +1,8 @@ use super::{create_connection_request, ClusterMode, TestConfiguration}; -use babushka::client::Client; -use babushka::connection_request::NodeAddress; use futures::future::{join_all, BoxFuture}; use futures::FutureExt; +use glide_core::client::Client; +use glide_core::connection_request::NodeAddress; use once_cell::sync::Lazy; use redis::{ConnectionAddr, RedisConnectionInfo}; use std::process::Command; diff --git a/babushka-core/tests/utilities/mocks.rs b/glide-core/tests/utilities/mocks.rs similarity index 100% rename from babushka-core/tests/utilities/mocks.rs rename to glide-core/tests/utilities/mocks.rs diff --git a/babushka-core/tests/utilities/mod.rs b/glide-core/tests/utilities/mod.rs similarity index 99% rename from babushka-core/tests/utilities/mod.rs rename to glide-core/tests/utilities/mod.rs index c84e785e88..9117425e7e 100644 --- a/babushka-core/tests/utilities/mod.rs +++ b/glide-core/tests/utilities/mod.rs @@ -1,9 +1,9 @@ #![allow(dead_code)] -use babushka::{ +use futures::Future; +use glide_core::{ client::{Client, StandaloneClient}, connection_request::{self, AuthenticationInfo, NodeAddress}, }; -use futures::Future; use once_cell::sync::Lazy; use rand::{distributions::Alphanumeric, Rng}; use redis::{aio::ConnectionLike, ConnectionAddr, RedisConnectionInfo, RedisResult, Value}; diff --git a/java/Cargo.toml b/java/Cargo.toml index 33672eec41..d5c30d1bc4 100644 --- a/java/Cargo.toml +++ b/java/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "javababushka" +name = "glide-rs" version = "0.1.0" edition = "2021" license = "Apache-2.0" @@ -7,12 +7,11 @@ authors = ["Amazon Web Services"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "javababushka" crate-type = ["cdylib"] [dependencies] redis = { path = "../submodules/redis-rs/redis", features = ["aio", "tokio-comp", "connection-manager", "tokio-rustls-comp"] } -babushka = { path = "../babushka-core" } +glide-core = { path = "../glide-core" } tokio = { version = "^1", features = ["rt", "macros", "rt-multi-thread", "time"] } logger_core = {path = "../logger_core"} tracing-subscriber = "0.3.16" diff --git a/java/README.md b/java/README.md index 07a5fc7b49..8dced4b04b 100644 --- a/java/README.md +++ b/java/README.md @@ -10,7 +10,7 @@ to develop this Java wrapper. The Java client contains the following parts: 1. A Java client (lib folder): wrapper to rust client. -2. A benchmark app: A dedicated benchmarking tool designed to evaluate and compare the performance of Babushka and other Java clients. +2. A benchmark app: A dedicated benchmarking tool designed to evaluate and compare the performance of GLIDE for Redis and other Java clients. ## Installation and Setup @@ -57,8 +57,8 @@ Before starting this step, make sure you've installed all software requirements. 1. Clone the repository: ```bash VERSION=0.1.0 # You can modify this to other released version or set it to "main" to get the unstable branch -git clone --branch ${VERSION} https://github.com/aws/babushka.git -cd babushka +git clone --branch ${VERSION} https://github.com/aws/glide-for-redis.git +cd glide-for-redis ``` 2. Initialize git submodule: ```bash @@ -91,8 +91,8 @@ Other useful gradle developer commands: ### Standalone Redis: ```java -import javababushka.Client; -import javababushka.Client.SingleResponse; +import glide.Client; +import glide.Client.SingleResponse; Client client = new Client(); @@ -118,7 +118,7 @@ You can run benchmarks using `./gradlew run`. You can set arguments using the ar The following arguments are accepted: * `resultsFile`: the results output file * `concurrentTasks`: Number of concurrent tasks -* `clients`: one of: all|jedis|lettuce|babushka +* `clients`: one of: all|jedis|lettuce|glide * `clientCount`: Client count * `host`: redis server host url * `port`: redis server port number diff --git a/java/benchmarks/build.gradle b/java/benchmarks/build.gradle index 2a641a307a..317895de52 100644 --- a/java/benchmarks/build.gradle +++ b/java/benchmarks/build.gradle @@ -29,5 +29,5 @@ java { application { // Define the main class for the application. - mainClass = 'babushka.benchmarks.BenchmarkingApp' + mainClass = 'glide.benchmarks.BenchmarkingApp' } diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/BenchmarkingApp.java b/java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java similarity index 94% rename from java/benchmarks/src/main/java/babushka/benchmarks/BenchmarkingApp.java rename to java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java index 7c756df432..5ce098f22a 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/BenchmarkingApp.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/BenchmarkingApp.java @@ -1,9 +1,9 @@ -package babushka.benchmarks; +package glide.benchmarks; -import static babushka.benchmarks.utils.Benchmarking.testClientSetGet; +import static glide.benchmarks.utils.Benchmarking.testClientSetGet; -import babushka.benchmarks.clients.jedis.JedisClient; -import babushka.benchmarks.clients.lettuce.LettuceAsyncClient; +import glide.benchmarks.clients.jedis.JedisClient; +import glide.benchmarks.clients.lettuce.LettuceAsyncClient; import java.util.Arrays; import java.util.Optional; import java.util.stream.Stream; @@ -32,7 +32,7 @@ public static void main(String[] args) { // generate the help statement if (line.hasOption("help")) { HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("babushka", options); + formatter.printHelp("glide", options); return; } @@ -54,8 +54,8 @@ public static void main(String[] args) { System.out.println("Run LETTUCE async client"); testClientSetGet(LettuceAsyncClient::new, runConfiguration, true); break; - case BABUSHKA: - System.out.println("Babushka async not yet configured"); + case GLIDE: + System.out.println("GLIDE for Redis async not yet configured"); break; } } @@ -81,7 +81,7 @@ private static Options getOptions() { .desc("Number of concurrent tasks [100, 1000]") .build()); options.addOption( - Option.builder("clients").hasArg(true).desc("one of: all|jedis|lettuce|babushka").build()); + Option.builder("clients").hasArg(true).desc("one of: all|jedis|lettuce|glide").build()); options.addOption(Option.builder("host").hasArg(true).desc("Hostname [localhost]").build()); options.addOption(Option.builder("port").hasArg(true).desc("Port number [6379]").build()); options.addOption( @@ -133,7 +133,7 @@ private static RunConfiguration verifyOptions(CommandLine line) throws ParseExce e -> { switch (e) { case ALL: - return Stream.of(ClientName.JEDIS, ClientName.BABUSHKA, ClientName.LETTUCE); + return Stream.of(ClientName.JEDIS, ClientName.GLIDE, ClientName.LETTUCE); default: return Stream.of(e); } @@ -183,7 +183,7 @@ private static int[] parseIntListOption(String line) throws ParseException { public enum ClientName { JEDIS("Jedis"), // sync LETTUCE("Lettuce"), // async - BABUSHKA("Babushka"), // async + GLIDE("Glide"), // async ALL("All"); private String name; diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/clients/AsyncClient.java b/java/benchmarks/src/main/java/glide/benchmarks/clients/AsyncClient.java similarity index 96% rename from java/benchmarks/src/main/java/babushka/benchmarks/clients/AsyncClient.java rename to java/benchmarks/src/main/java/glide/benchmarks/clients/AsyncClient.java index 9fec9fbf51..076c79d29b 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/clients/AsyncClient.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/clients/AsyncClient.java @@ -1,4 +1,4 @@ -package babushka.benchmarks.clients; +package glide.benchmarks.clients; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/clients/Client.java b/java/benchmarks/src/main/java/glide/benchmarks/clients/Client.java similarity index 66% rename from java/benchmarks/src/main/java/babushka/benchmarks/clients/Client.java rename to java/benchmarks/src/main/java/glide/benchmarks/clients/Client.java index 9564504ecf..f35970f7c3 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/clients/Client.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/clients/Client.java @@ -1,6 +1,6 @@ -package babushka.benchmarks.clients; +package glide.benchmarks.clients; -import babushka.benchmarks.utils.ConnectionSettings; +import glide.benchmarks.utils.ConnectionSettings; /** A Redis client interface */ public interface Client { diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/clients/SyncClient.java b/java/benchmarks/src/main/java/glide/benchmarks/clients/SyncClient.java similarity index 81% rename from java/benchmarks/src/main/java/babushka/benchmarks/clients/SyncClient.java rename to java/benchmarks/src/main/java/glide/benchmarks/clients/SyncClient.java index c2e0563f76..2da6e3d595 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/clients/SyncClient.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/clients/SyncClient.java @@ -1,4 +1,4 @@ -package babushka.benchmarks.clients; +package glide.benchmarks.clients; /** A Redis client with sync capabilities */ public interface SyncClient extends Client { diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/clients/jedis/JedisClient.java b/java/benchmarks/src/main/java/glide/benchmarks/clients/jedis/JedisClient.java similarity index 89% rename from java/benchmarks/src/main/java/babushka/benchmarks/clients/jedis/JedisClient.java rename to java/benchmarks/src/main/java/glide/benchmarks/clients/jedis/JedisClient.java index 764235df27..d7519161b2 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/clients/jedis/JedisClient.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/clients/jedis/JedisClient.java @@ -1,7 +1,7 @@ -package babushka.benchmarks.clients.jedis; +package glide.benchmarks.clients.jedis; -import babushka.benchmarks.clients.SyncClient; -import babushka.benchmarks.utils.ConnectionSettings; +import glide.benchmarks.clients.SyncClient; +import glide.benchmarks.utils.ConnectionSettings; import java.util.Set; import redis.clients.jedis.DefaultJedisClientConfig; import redis.clients.jedis.HostAndPort; diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/clients/lettuce/LettuceAsyncClient.java b/java/benchmarks/src/main/java/glide/benchmarks/clients/lettuce/LettuceAsyncClient.java similarity index 93% rename from java/benchmarks/src/main/java/babushka/benchmarks/clients/lettuce/LettuceAsyncClient.java rename to java/benchmarks/src/main/java/glide/benchmarks/clients/lettuce/LettuceAsyncClient.java index 1290acbdfd..3cd25ef2fa 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/clients/lettuce/LettuceAsyncClient.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/clients/lettuce/LettuceAsyncClient.java @@ -1,7 +1,7 @@ -package babushka.benchmarks.clients.lettuce; +package glide.benchmarks.clients.lettuce; -import babushka.benchmarks.clients.AsyncClient; -import babushka.benchmarks.utils.ConnectionSettings; +import glide.benchmarks.clients.AsyncClient; +import glide.benchmarks.utils.ConnectionSettings; import io.lettuce.core.AbstractRedisClient; import io.lettuce.core.RedisClient; import io.lettuce.core.RedisFuture; diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/utils/Benchmarking.java b/java/benchmarks/src/main/java/glide/benchmarks/utils/Benchmarking.java similarity index 97% rename from java/benchmarks/src/main/java/babushka/benchmarks/utils/Benchmarking.java rename to java/benchmarks/src/main/java/glide/benchmarks/utils/Benchmarking.java index 132ed8d2e0..8092fc8548 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/utils/Benchmarking.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/utils/Benchmarking.java @@ -1,9 +1,9 @@ -package babushka.benchmarks.utils; +package glide.benchmarks.utils; -import babushka.benchmarks.BenchmarkingApp; -import babushka.benchmarks.clients.AsyncClient; -import babushka.benchmarks.clients.Client; -import babushka.benchmarks.clients.SyncClient; +import glide.benchmarks.BenchmarkingApp; +import glide.benchmarks.clients.AsyncClient; +import glide.benchmarks.clients.Client; +import glide.benchmarks.clients.SyncClient; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/utils/ChosenAction.java b/java/benchmarks/src/main/java/glide/benchmarks/utils/ChosenAction.java similarity index 67% rename from java/benchmarks/src/main/java/babushka/benchmarks/utils/ChosenAction.java rename to java/benchmarks/src/main/java/glide/benchmarks/utils/ChosenAction.java index 42eceabd8d..d4c9a53dcf 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/utils/ChosenAction.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/utils/ChosenAction.java @@ -1,4 +1,4 @@ -package babushka.benchmarks.utils; +package glide.benchmarks.utils; public enum ChosenAction { GET_NON_EXISTING, diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/utils/ConnectionSettings.java b/java/benchmarks/src/main/java/glide/benchmarks/utils/ConnectionSettings.java similarity index 91% rename from java/benchmarks/src/main/java/babushka/benchmarks/utils/ConnectionSettings.java rename to java/benchmarks/src/main/java/glide/benchmarks/utils/ConnectionSettings.java index 5a6b15fd12..8cc1f729a4 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/utils/ConnectionSettings.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/utils/ConnectionSettings.java @@ -1,4 +1,4 @@ -package babushka.benchmarks.utils; +package glide.benchmarks.utils; /** Redis-client settings */ public class ConnectionSettings { diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/utils/JsonWriter.java b/java/benchmarks/src/main/java/glide/benchmarks/utils/JsonWriter.java similarity index 99% rename from java/benchmarks/src/main/java/babushka/benchmarks/utils/JsonWriter.java rename to java/benchmarks/src/main/java/glide/benchmarks/utils/JsonWriter.java index f21a90d56c..b2900811a0 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/utils/JsonWriter.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/utils/JsonWriter.java @@ -1,4 +1,4 @@ -package babushka.benchmarks.utils; +package glide.benchmarks.utils; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/java/benchmarks/src/main/java/babushka/benchmarks/utils/LatencyResults.java b/java/benchmarks/src/main/java/glide/benchmarks/utils/LatencyResults.java similarity index 96% rename from java/benchmarks/src/main/java/babushka/benchmarks/utils/LatencyResults.java rename to java/benchmarks/src/main/java/glide/benchmarks/utils/LatencyResults.java index 1dd89e35c1..0368ab1166 100644 --- a/java/benchmarks/src/main/java/babushka/benchmarks/utils/LatencyResults.java +++ b/java/benchmarks/src/main/java/glide/benchmarks/utils/LatencyResults.java @@ -1,4 +1,4 @@ -package babushka.benchmarks.utils; +package glide.benchmarks.utils; import java.util.Arrays; import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; diff --git a/java/client/build.gradle b/java/client/build.gradle index be9120cf3f..e3010b3bbb 100644 --- a/java/client/build.gradle +++ b/java/client/build.gradle @@ -32,20 +32,20 @@ dependencies { tasks.register('protobuf', Exec) { doFirst { - project.mkdir(Paths.get(project.projectDir.path, 'src/main/java/babushka/models/protobuf').toString()) + project.mkdir(Paths.get(project.projectDir.path, 'src/main/java/glide/models/protobuf').toString()) } commandLine 'protoc', - '-Iprotobuf=babushka-core/src/protobuf/', - '--java_out=java/client/src/main/java/babushka/models/protobuf', - 'babushka-core/src/protobuf/connection_request.proto', - 'babushka-core/src/protobuf/redis_request.proto', - 'babushka-core/src/protobuf/response.proto' + '-Iprotobuf=glide-core/src/protobuf/', + '--java_out=java/client/src/main/java/glide/models/protobuf', + 'glide-core/src/protobuf/connection_request.proto', + 'glide-core/src/protobuf/redis_request.proto', + 'glide-core/src/protobuf/response.proto' workingDir Paths.get(project.rootDir.path, '..').toFile() } tasks.register('cleanProtobuf') { doFirst { - project.delete(Paths.get(project.projectDir.path, 'src/main/java/babushka/models/protobuf').toString()) + project.delete(Paths.get(project.projectDir.path, 'src/main/java/glide/models/protobuf').toString()) } } diff --git a/java/client/src/main/java/babushka/connectors/handlers/CallbackDispatcher.java b/java/client/src/main/java/glide/connectors/handlers/CallbackDispatcher.java similarity index 98% rename from java/client/src/main/java/babushka/connectors/handlers/CallbackDispatcher.java rename to java/client/src/main/java/glide/connectors/handlers/CallbackDispatcher.java index 5ebaa03969..b356cb218a 100644 --- a/java/client/src/main/java/babushka/connectors/handlers/CallbackDispatcher.java +++ b/java/client/src/main/java/glide/connectors/handlers/CallbackDispatcher.java @@ -1,4 +1,4 @@ -package babushka.connectors.handlers; +package glide.connectors.handlers; import java.util.Map; import java.util.concurrent.CompletableFuture; diff --git a/java/client/src/main/java/babushka/connectors/handlers/ChannelHandler.java b/java/client/src/main/java/glide/connectors/handlers/ChannelHandler.java similarity index 94% rename from java/client/src/main/java/babushka/connectors/handlers/ChannelHandler.java rename to java/client/src/main/java/glide/connectors/handlers/ChannelHandler.java index 40feea417b..068ea3dd79 100644 --- a/java/client/src/main/java/babushka/connectors/handlers/ChannelHandler.java +++ b/java/client/src/main/java/glide/connectors/handlers/ChannelHandler.java @@ -1,7 +1,7 @@ -package babushka.connectors.handlers; +package glide.connectors.handlers; -import babushka.connectors.resources.Platform; import connection_request.ConnectionRequestOuterClass.ConnectionRequest; +import glide.connectors.resources.Platform; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.unix.DomainSocketAddress; @@ -17,7 +17,7 @@ */ public class ChannelHandler { - private static final String THREAD_POOL_NAME = "babushka-channel"; + private static final String THREAD_POOL_NAME = "glide-channel"; private final Channel channel; private final CallbackDispatcher callbackDispatcher; diff --git a/java/client/src/main/java/babushka/connectors/handlers/ProtobufSocketChannelInitializer.java b/java/client/src/main/java/glide/connectors/handlers/ProtobufSocketChannelInitializer.java similarity index 97% rename from java/client/src/main/java/babushka/connectors/handlers/ProtobufSocketChannelInitializer.java rename to java/client/src/main/java/glide/connectors/handlers/ProtobufSocketChannelInitializer.java index 06c4c03f02..fbc8b59b6a 100644 --- a/java/client/src/main/java/babushka/connectors/handlers/ProtobufSocketChannelInitializer.java +++ b/java/client/src/main/java/glide/connectors/handlers/ProtobufSocketChannelInitializer.java @@ -1,4 +1,4 @@ -package babushka.connectors.handlers; +package glide.connectors.handlers; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOutboundHandlerAdapter; diff --git a/java/client/src/main/java/babushka/connectors/handlers/ReadHandler.java b/java/client/src/main/java/glide/connectors/handlers/ReadHandler.java similarity index 87% rename from java/client/src/main/java/babushka/connectors/handlers/ReadHandler.java rename to java/client/src/main/java/glide/connectors/handlers/ReadHandler.java index 63aedf001e..dee2abc1b2 100644 --- a/java/client/src/main/java/babushka/connectors/handlers/ReadHandler.java +++ b/java/client/src/main/java/glide/connectors/handlers/ReadHandler.java @@ -1,4 +1,4 @@ -package babushka.connectors.handlers; +package glide.connectors.handlers; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; @@ -12,7 +12,7 @@ public class ReadHandler extends ChannelInboundHandlerAdapter { private final CallbackDispatcher callbackDispatcher; - /** Submit responses from babushka to an instance {@link CallbackDispatcher} to handle them. */ + /** Submit responses from glide to an instance {@link CallbackDispatcher} to handle them. */ @Override public void channelRead(@NonNull ChannelHandlerContext ctx, @NonNull Object msg) { callbackDispatcher.completeRequest((Response) msg); diff --git a/java/client/src/main/java/babushka/connectors/resources/Platform.java b/java/client/src/main/java/glide/connectors/resources/Platform.java similarity index 98% rename from java/client/src/main/java/babushka/connectors/resources/Platform.java rename to java/client/src/main/java/glide/connectors/resources/Platform.java index 0e6c3edec9..7f9b95d9c2 100644 --- a/java/client/src/main/java/babushka/connectors/resources/Platform.java +++ b/java/client/src/main/java/glide/connectors/resources/Platform.java @@ -1,4 +1,4 @@ -package babushka.connectors.resources; +package glide.connectors.resources; import io.netty.channel.EventLoopGroup; import io.netty.channel.epoll.Epoll; @@ -134,6 +134,6 @@ public void run() { } static { - Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownHook(), "Babushka-shutdown-hook")); + Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownHook(), "Glide-shutdown-hook")); } } diff --git a/java/client/src/main/java/babushka/ffi/resolvers/BabushkaCoreNativeDefinitions.java b/java/client/src/main/java/glide/ffi/resolvers/GlideCoreNativeDefinitions.java similarity index 81% rename from java/client/src/main/java/babushka/ffi/resolvers/BabushkaCoreNativeDefinitions.java rename to java/client/src/main/java/glide/ffi/resolvers/GlideCoreNativeDefinitions.java index 6d4ec45121..cdcc8957cc 100644 --- a/java/client/src/main/java/babushka/ffi/resolvers/BabushkaCoreNativeDefinitions.java +++ b/java/client/src/main/java/glide/ffi/resolvers/GlideCoreNativeDefinitions.java @@ -1,12 +1,12 @@ -package babushka.ffi.resolvers; +package glide.ffi.resolvers; -public class BabushkaCoreNativeDefinitions { +public class GlideCoreNativeDefinitions { public static native String startSocketListenerExternal() throws Exception; public static native Object valueFromPointer(long pointer); static { - System.loadLibrary("javababushka"); + System.loadLibrary("glide-rs"); } /** diff --git a/java/settings.gradle b/java/settings.gradle index e96b2925b4..6d5e31d8a0 100644 --- a/java/settings.gradle +++ b/java/settings.gradle @@ -1,4 +1,4 @@ -rootProject.name = 'babushka' +rootProject.name = 'glide' include 'client' include 'integTest' diff --git a/java/src/lib.rs b/java/src/lib.rs index 13577f0805..f204af0909 100644 --- a/java/src/lib.rs +++ b/java/src/lib.rs @@ -1,4 +1,4 @@ -use babushka::start_socket_listener; +use glide_core::start_socket_listener; use jni::objects::{JClass, JObject, JThrowable}; use jni::sys::jlong; @@ -42,7 +42,7 @@ fn redis_value_to_java(mut env: JNIEnv, val: Value) -> JObject { } #[no_mangle] -pub extern "system" fn Java_babushka_ffi_resolvers_BabushkaCoreNativeDefinitions_valueFromPointer< +pub extern "system" fn Java_glide_ffi_resolvers_GlideCoreNativeDefinitions_valueFromPointer< 'local, >( env: JNIEnv<'local>, @@ -54,7 +54,7 @@ pub extern "system" fn Java_babushka_ffi_resolvers_BabushkaCoreNativeDefinitions } #[no_mangle] -pub extern "system" fn Java_babushka_ffi_resolvers_BabushkaCoreNativeDefinitions_startSocketListenerExternal< +pub extern "system" fn Java_glide_ffi_resolvers_GlideCoreNativeDefinitions_startSocketListenerExternal< 'local, >( env: JNIEnv<'local>, diff --git a/logger_core/src/lib.rs b/logger_core/src/lib.rs index 7a57b64fed..f59f81dad7 100644 --- a/logger_core/src/lib.rs +++ b/logger_core/src/lib.rs @@ -81,7 +81,7 @@ pub fn init(minimal_level: Option, file_name: Option<&str>) -> Level { let file_appender = RollingFileAppender::new( Rotation::HOURLY, - "babushka-logs", + "glide-logs", file_name.unwrap_or("output.log"), ); let file_fmt = tracing_subscriber::fmt::layer() @@ -91,7 +91,7 @@ pub fn init(minimal_level: Option, file_name: Option<&str>) -> Level { // Enable logging only from allowed crates let targets_filter = filter::Targets::new() - .with_target("babushka", LevelFilter::TRACE) + .with_target("glide", LevelFilter::TRACE) .with_target("redis", LevelFilter::TRACE) .with_target("logger_core", LevelFilter::TRACE) .with_target(std::env!("CARGO_PKG_NAME"), LevelFilter::TRACE); @@ -125,7 +125,7 @@ pub fn init(minimal_level: Option, file_name: Option<&str>) -> Level { }); } Some(file) => { - let file_appender = RollingFileAppender::new(Rotation::HOURLY, "babushka-logs", file); + let file_appender = RollingFileAppender::new(Rotation::HOURLY, "glide-logs", file); let _ = reloads .file_reload .write() diff --git a/logger_core/tests/test_logger.rs b/logger_core/tests/test_logger.rs index 0a322f824b..87c5771e5d 100644 --- a/logger_core/tests/test_logger.rs +++ b/logger_core/tests/test_logger.rs @@ -7,7 +7,7 @@ mod tests { use logger_core::{init, log_debug, log_trace}; use rand::{distributions::Alphanumeric, Rng}; use std::fs::{read_dir, read_to_string, remove_dir_all}; - const FILE_DIRECTORY: &str = "babushka-logs"; + const FILE_DIRECTORY: &str = "glide-logs"; fn generate_random_string(length: usize) -> String { rand::thread_rng() diff --git a/node/.gitignore b/node/.gitignore index 2651279fe1..1b023a1ae7 100644 --- a/node/.gitignore +++ b/node/.gitignore @@ -130,7 +130,7 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* -*babushka*.node +*glide*.node build-ts/** yarn.lock diff --git a/node/DEVELOPER.md b/node/DEVELOPER.md index 0a8d297c8b..fd0ef20c66 100644 --- a/node/DEVELOPER.md +++ b/node/DEVELOPER.md @@ -1,15 +1,15 @@ # Developer Guide -This document describes how to set up your development environment to build and test the Babushka Node wrapper. +This document describes how to set up your development environment to build and test the GLIDE for Redis Node wrapper. ### Development Overview -The Babushka Node wrapper consists of both TypeScript and Rust code. Rust bindings for Node.js are implemented using [napi-rs](https://github.com/napi-rs/napi-rs). The Node and Rust components communicate using the [protobuf](https://github.com/protocolbuffers/protobuf) protocol. +The GLIDE Node wrapper consists of both TypeScript and Rust code. Rust bindings for Node.js are implemented using [napi-rs](https://github.com/napi-rs/napi-rs). The Node and Rust components communicate using the [protobuf](https://github.com/protocolbuffers/protobuf) protocol. ### Build -- Follow the building instructions for the Node wrapper in the [Build from source](https://github.com/aws/babushka/blob/main/node/README.md#build-from-source) section to clone the code and build the wrapper. +- Follow the building instructions for the Node wrapper in the [Build from source](https://github.com/aws/glide-for-redis/blob/main/node/README.md#build-from-source) section to clone the code and build the wrapper. - For a fast build, execute `npm run build`. This will perform a full, unoptimized build, which is suitable for developing tests. Keep in mind that performance is significantly affected in an unoptimized build, so it's required to build with the `build:release` or `build:benchmark` option when measuring performance. - If your modifications are limited to the TypeScript code, run `npm run build-external` to build the external package without rebuilding the internal package. - If your modifications are limited to the Rust code, execute `npm run build-internal` to build the internal package and generate TypeScript code. diff --git a/node/README.md b/node/README.md index b27cef21ba..7073b7ad26 100644 --- a/node/README.md +++ b/node/README.md @@ -2,7 +2,7 @@ ## System Requirements -The beta release of Babushka was tested on Intel x86_64 using Ubuntu 22.04.1, Amazon Linux 2023 (AL2023), and macOS 12.7. +The beta release of GLIDE for Redis was tested on Intel x86_64 using Ubuntu 22.04.1, Amazon Linux 2023 (AL2023), and macOS 12.7. ## NodeJS supported version Node.js 16.20 or higher. @@ -12,18 +12,18 @@ Node.js 16.20 or higher. ### Installing via Package Manager (npm) -To install babushka using `npm`, follow these steps: +To install GLIDE for Redis using `npm`, follow these steps: 1. Open your terminal. 2. Execute the command below: ```bash - $ npm install babushka + $ npm install glide-for-redis ``` 3. After installation, confirm the client is installed by running: ```bash $ npm list myApp@ /home/ubuntu/myApp - └── babushka@0.1.0 + └── glide-for-redis@0.1.0 ``` ### Build from source @@ -72,8 +72,8 @@ Before starting this step, make sure you've installed all software requirments. 1. Clone the repository: ```bash VERSION=0.1.0 # You can modify this to other released version or set it to "main" to get the unstable branch - git clone --branch ${VERSION} https://github.com/aws/babushka.git - cd babushka + git clone --branch ${VERSION} https://github.com/aws/glide-for-redis.git + cd glide-for-redis ``` 2. Initialize git submodule: ```bash @@ -110,19 +110,15 @@ Before starting this step, make sure you've installed all software requirments. ```bash npm test ``` - -## Integrating the Babushka Package into Your Project - -Before adding the Babushka package into your application, ensure you follow the build steps outlined in "[Build the Node wrapper](#Building-and-installation-steps)". - -Currently, Babushka is not available on npm. Therefore, you'll need to build this repository to your device and add the package using the folder path with the command `npm install /node`. +6. Integrating the built GLIDE package into your project: + Add the package to your project using the folder path with the command `npm install /node`. ## Basic Examples #### Cluster Redis: ```node -import { RedisClusterClient } from "babushka-rs"; +import { RedisClusterClient } from "glide-for-redis"; const addresses = [ { @@ -142,7 +138,7 @@ client.dispose(); #### Standalone Redis: ```node -import { RedisClient } from "babushka-rs"; +import { RedisClient } from "glide-for-redis"; const addresses = [ { diff --git a/node/THIRD_PARTY_LICENSES_NODE b/node/THIRD_PARTY_LICENSES_NODE index beb784ba83..7c95e50d1c 100644 --- a/node/THIRD_PARTY_LICENSES_NODE +++ b/node/THIRD_PARTY_LICENSES_NODE @@ -2660,214 +2660,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: babushka:0.1.0 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ----- - Package: backoff:0.4.0 The following copyrights and licenses were found in the source code of this package: diff --git a/node/npm/babushka/.gitignore b/node/npm/glide/.gitignore similarity index 100% rename from node/npm/babushka/.gitignore rename to node/npm/glide/.gitignore diff --git a/node/npm/babushka/index.ts b/node/npm/glide/index.ts similarity index 76% rename from node/npm/babushka/index.ts rename to node/npm/glide/index.ts index c95b08f296..fe0b72d1da 100644 --- a/node/npm/babushka/index.ts +++ b/node/npm/glide/index.ts @@ -5,10 +5,10 @@ switch (platform) { case 'linux': switch (arch) { case 'x64': - nativeBinding = await import("@scope/babushka-linux-x64"); + nativeBinding = await import("@scope/glide-for-redis-linux-x64"); break; case 'arm64': - nativeBinding = await import("@scope/babushka-linux-arm64"); + nativeBinding = await import("@scope/glide-for-redis-linux-arm64"); break; default: throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); @@ -17,10 +17,10 @@ switch (platform) { case 'darwin': switch (arch) { case 'x64': - nativeBinding = await import("@scope/babushka-darwin-x64"); + nativeBinding = await import("@scope/glide-for-redis-darwin-x64"); break; case 'arm64': - nativeBinding = await import("@scope/babushka-darwin-arm64"); + nativeBinding = await import("@scope/glide-for-redis-darwin-arm64"); break; default: throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); diff --git a/node/npm/babushka/package.json b/node/npm/glide/package.json similarity index 77% rename from node/npm/babushka/package.json rename to node/npm/glide/package.json index 607cec3b02..9f8fe69d88 100644 --- a/node/npm/babushka/package.json +++ b/node/npm/glide/package.json @@ -17,7 +17,7 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/aws/babushka.git" + "url": "git+https://github.com/aws/glide-for-redis.git" }, "keywords": [ "redis", @@ -28,9 +28,9 @@ "author": "Amazon Web Services", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/aws/babushka/issues" + "url": "https://github.com/aws/glide-for-redis/issues" }, - "homepage": "https://github.com/aws/babushka#readme", + "homepage": "https://github.com/aws/glide-for-redis#readme", "devDependencies": { "@types/node": "^18.11.18", "@typescript-eslint/eslint-plugin": "^5.48.0", @@ -39,10 +39,10 @@ "typescript": "^4.9.4" }, "optionalDependencies": { - "${scope}babushka-darwin-arm64": "^1.1.0", - "${scope}babushka-darwin-x64": "^1.1.0", - "${scope}babushka-linux-arm64": "^1.1.0", - "${scope}babushka-linux-x64": "^1.1.0" + "${scope}glide-for-redis-darwin-arm64": "^1.1.0", + "${scope}glide-for-redis-darwin-x64": "^1.1.0", + "${scope}glide-for-redis-linux-arm64": "^1.1.0", + "${scope}glide-for-redis-linux-x64": "^1.1.0" }, "eslintConfig": { "extends": [ diff --git a/node/npm/babushka/tsconfig.json b/node/npm/glide/tsconfig.json similarity index 100% rename from node/npm/babushka/tsconfig.json rename to node/npm/glide/tsconfig.json diff --git a/node/package.json b/node/package.json index 10d2b0165c..f4546908cb 100644 --- a/node/package.json +++ b/node/package.json @@ -1,21 +1,21 @@ { - "name": "babushka", + "name": "glide-for-redis", "description": "An AWS-sponsored, open-source Redis client.", "main": "build-ts/index.js", "types": "build-ts/index.d.ts", "repository": { "type": "git", - "url": "git+https://github.com/aws/babushka.git" + "url": "git+https://github.com/aws/glide-for-redis.git" }, - "homepage": "https://github.com/aws/babushka#readme", + "homepage": "https://github.com/aws/glide-for-redis#readme", "dependencies": { - "babushka-rs-internal": "file:rust-client", + "glide-rs": "file:rust-client", "long": "^5.2.3", "npmignore": "^0.3.0", "protobufjs": "^7.2.2" }, "bundleDependencies": [ - "babushka-rs-internal" + "glide-rs" ], "scripts": { "build": "npm run build-internal && npm run build-protobuf && npm run build-external", @@ -26,7 +26,7 @@ "build-internal:benchmark": "cd rust-client && npm run build:benchmark", "build-external": "rm -rf build-ts && npx tsc", "build-protobuf": "npm run compile-protobuf-files && npm run fix-protobuf-file", - "compile-protobuf-files": "cd src && pbjs -t static-module -o ProtobufMessage.js ../../babushka-core/src/protobuf/*.proto && pbts -o ProtobufMessage.d.ts ProtobufMessage.js", + "compile-protobuf-files": "cd src && pbjs -t static-module -o ProtobufMessage.js ../../glide-core/src/protobuf/*.proto && pbts -o ProtobufMessage.d.ts ProtobufMessage.js", "fix-protobuf-file": "replace 'this\\.encode\\(message, writer\\)\\.ldelim' 'this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim' src/ProtobufMessage.js", "test": "jest --verbose --runInBand", "lint": "eslint -f unix \"src/**/*.{ts,tsx}\"", diff --git a/node/rust-client/Cargo.toml b/node/rust-client/Cargo.toml index 8e064b9bda..f8f6020349 100644 --- a/node/rust-client/Cargo.toml +++ b/node/rust-client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "babushka_js" +name = "glide-rs" version = "0.1.0" edition = "2021" license = "Apache-2.0" @@ -12,7 +12,7 @@ crate-type = ["cdylib"] [dependencies] redis = { path = "../../submodules/redis-rs/redis", features = ["aio", "tokio-comp", "tokio-rustls-comp"] } -babushka = { path = "../../babushka-core" } +glide-core = { path = "../../glide-core" } tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread", "time"] } napi = {version = "2.14", features = ["napi4", "napi6"] } napi-derive = "2.14" diff --git a/node/rust-client/package.json b/node/rust-client/package.json index 5c4048a13f..c3da59fd99 100644 --- a/node/rust-client/package.json +++ b/node/rust-client/package.json @@ -1,5 +1,5 @@ { - "name": "babushka-rs-internal", + "name": "glide-rs", "version": "0.1.0", "description": "Redis client", "main": "index.js", @@ -7,10 +7,10 @@ "files": [ "index.d.ts", "index.js", - "babushka*.*.node" + "glide*.*.node" ], "napi": { - "name": "babushka-rs-internal", + "name": "glide-rs", "triples": { "defaults": true, "additional": [ diff --git a/node/rust-client/src/lib.rs b/node/rust-client/src/lib.rs index 0d819f3d37..ccb54ce68e 100644 --- a/node/rust-client/src/lib.rs +++ b/node/rust-client/src/lib.rs @@ -1,6 +1,6 @@ -use babushka::start_socket_listener; -use babushka::MAX_REQUEST_ARGS_LENGTH; use byteorder::{LittleEndian, WriteBytesExt}; +use glide_core::start_socket_listener; +use glide_core::MAX_REQUEST_ARGS_LENGTH; #[cfg(feature = "testing_utilities")] use napi::bindgen_prelude::BigInt; use napi::{Env, Error, JsObject, JsUnknown, Result, Status}; @@ -26,7 +26,7 @@ pub const MAX_REQUEST_ARGS_LEN: u32 = MAX_REQUEST_ARGS_LENGTH as u32; #[napi] pub const DEFAULT_TIMEOUT_IN_MILLISECONDS: u32 = - babushka::client::DEFAULT_RESPONSE_TIMEOUT.as_millis() as u32; + glide_core::client::DEFAULT_RESPONSE_TIMEOUT.as_millis() as u32; #[napi] struct AsyncClient { @@ -51,7 +51,7 @@ impl AsyncClient { let runtime = Builder::new_multi_thread() .enable_all() .worker_threads(1) - .thread_name("Babushka node thread") + .thread_name("GLIDE node thread") .build()?; let _runtime_handle = runtime.enter(); let client = to_js_result(redis::Client::open(connection_address))?; diff --git a/node/src/BaseClient.ts b/node/src/BaseClient.ts index 1b67d1605e..0cf518d71e 100644 --- a/node/src/BaseClient.ts +++ b/node/src/BaseClient.ts @@ -2,7 +2,7 @@ import { DEFAULT_TIMEOUT_IN_MILLISECONDS, StartSocketConnection, valueFromSplitPointer, -} from "babushka-rs-internal"; +} from "glide-rs"; import * as net from "net"; import { Buffer, BufferWriter, Reader, Writer } from "protobufjs"; import { diff --git a/node/src/Commands.ts b/node/src/Commands.ts index ea602a74aa..4ae0619830 100644 --- a/node/src/Commands.ts +++ b/node/src/Commands.ts @@ -1,7 +1,7 @@ import { MAX_REQUEST_ARGS_LEN, createLeakedStringVec, -} from "babushka-rs-internal"; +} from "glide-rs"; import Long from "long"; import { redis_request } from "./ProtobufMessage"; import RequestType = redis_request.RequestType; diff --git a/node/src/Logger.ts b/node/src/Logger.ts index 0802d77388..e6bbc307bd 100644 --- a/node/src/Logger.ts +++ b/node/src/Logger.ts @@ -1,4 +1,4 @@ -import { InitInternalLogger, Level, log } from "babushka-rs-internal"; +import { InitInternalLogger, Level, log } from "glide-rs"; const LEVEL: Map = new Map([ ["error", Level.Error], diff --git a/node/tests/AsyncClient.test.ts b/node/tests/AsyncClient.test.ts index c914802243..60f9a8ba83 100644 --- a/node/tests/AsyncClient.test.ts +++ b/node/tests/AsyncClient.test.ts @@ -1,5 +1,5 @@ import { afterAll, afterEach, beforeAll, describe } from "@jest/globals"; -import { AsyncClient } from "babushka-rs-internal"; +import { AsyncClient } from "glide-rs"; import RedisServer from "redis-server"; import { runCommonTests } from "./SharedTests"; import { flushallOnPort } from "./TestUtilities"; diff --git a/node/tests/RedisClientInternals.test.ts b/node/tests/RedisClientInternals.test.ts index 0d0501fbdc..0139200638 100644 --- a/node/tests/RedisClientInternals.test.ts +++ b/node/tests/RedisClientInternals.test.ts @@ -1,4 +1,5 @@ import { beforeAll, describe, expect, it } from "@jest/globals"; +import fs from "fs"; import { MAX_REQUEST_ARGS_LEN, createLeakedArray, @@ -7,8 +8,7 @@ import { createLeakedDouble, createLeakedMap, createLeakedString, -} from "babushka-rs-internal"; -import fs from "fs"; +} from "glide-rs"; import Long from "long"; import net from "net"; import os from "os"; diff --git a/node/tests/SharedTests.ts b/node/tests/SharedTests.ts index 1d586bcf6f..5b8b03b289 100644 --- a/node/tests/SharedTests.ts +++ b/node/tests/SharedTests.ts @@ -245,7 +245,7 @@ export function runBaseTests(config: { expect( Number( parseInfoResponse(getFirstResult(OldResult).toString())[ - "total_commands_processed" + "total_commands_processed" ] ) ).toBeGreaterThan(1); @@ -253,7 +253,7 @@ export function runBaseTests(config: { const result = await client.info([InfoOptions.Stats]); expect( parseInfoResponse(getFirstResult(result).toString())[ - "total_commands_processed" + "total_commands_processed" ] ).toEqual("1"); }); diff --git a/python/Cargo.toml b/python/Cargo.toml index 6ffaa89348..d7c62261e5 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pybushka" +name = "glide-for-redis" version = "255.255.255" edition = "2021" license = "Apache-2.0" @@ -7,14 +7,14 @@ authors = ["Amazon Web Services"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "pybushka" +name = "glide" crate-type = ["cdylib"] [dependencies] pyo3 = { version = "^0.20", features = ["extension-module"] } pyo3-asyncio = { version = "^0.20", features = ["tokio-runtime"] } redis = { path = "../submodules/redis-rs/redis", features = ["aio", "tokio-comp", "connection-manager","tokio-rustls-comp"] } -babushka = { path = "../babushka-core" } +glide-core = { path = "../glide-core" } tokio = { version = "^1", features = ["rt", "macros", "rt-multi-thread", "time"] } logger_core = {path = "../logger_core"} tracing-subscriber = "0.3.16" diff --git a/python/DEVELOPER.md b/python/DEVELOPER.md index 79b3332d6a..5295df49c6 100644 --- a/python/DEVELOPER.md +++ b/python/DEVELOPER.md @@ -1,15 +1,15 @@ # Developer Guide -This document describes how to set up your development environment to build and test the Babushka Python wrapper. +This document describes how to set up your development environment to build and test the GLIDE for Redis Python wrapper. ### Development Overview -The Babushka Python wrapper consists of both Python and Rust code. Rust bindings for Python are implemented using [PyO3](https://github.com/PyO3/pyo3), and the Python package is built using [maturin](https://github.com/PyO3/maturin). The Python and Rust components communicate using the [protobuf](https://github.com/protocolbuffers/protobuf) protocol. +The GLIDE for Redis Python wrapper consists of both Python and Rust code. Rust bindings for Python are implemented using [PyO3](https://github.com/PyO3/pyo3), and the Python package is built using [maturin](https://github.com/PyO3/maturin). The Python and Rust components communicate using the [protobuf](https://github.com/protocolbuffers/protobuf) protocol. ### Build -- Follow the building instructions for the Python wrapper in the [Build from source](https://github.com/aws/babushka/blob/main/python/README.md#build-from-source) section to clone the code and build the wrapper. +- Follow the building instructions for the Python wrapper in the [Build from source](https://github.com/aws/glide-for-redis/blob/main/python/README.md#build-from-source) section to clone the code and build the wrapper. - Install Python development requirements with: @@ -43,20 +43,20 @@ git submodule update ``` ### Generate protobuf files -During the initial build, Python protobuf files were created in `python/python/pybushka/protobuf`. If modifications are made to the protobuf definition files (.proto files located in `babushka-core/src/protofuf`), it becomes necessary to regenerate the Python protobuf files. To do so, run: +During the initial build, Python protobuf files were created in `python/python/glide/protobuf`. If modifications are made to the protobuf definition files (.proto files located in `glide-core/src/protofuf`), it becomes necessary to regenerate the Python protobuf files. To do so, run: ```bash -BABUSHKA_ROOT_FOLDER_PATH=. # e.g. /home/ubuntu/babushka -protoc -Iprotobuf=${BABUSHKA_ROOT_FOLDER_PATH}/babushka-core/src/protobuf/ --python_out=${BABUSHKA_ROOT_FOLDER_PATH}/python/python/pybushka ${BABUSHKA_ROOT_FOLDER_PATH}/babushka-core/src/protobuf/*.proto +GLIDE_ROOT_FOLDER_PATH=. # e.g. /home/ubuntu/glide-for-redis +protoc -Iprotobuf=${GLIDE_ROOT_FOLDER_PATH}/glide-core/src/protobuf/ --python_out=${GLIDE_ROOT_FOLDER_PATH}/python/python/glide ${GLIDE_ROOT_FOLDER_PATH}/glide-core/src/protobuf/*.proto ``` #### Protobuf interface files To generate the protobuf files with Python Interface files (pyi) for type-checking purposes, ensure you have installed `mypy-protobuf` with pip, and then execute the following command: ```bash -BABUSHKA_ROOT_FOLDER_PATH=. # e.g. /home/ubuntu/babushka +GLIDE_ROOT_FOLDER_PATH=. # e.g. /home/ubuntu/glide-for-redis MYPY_PROTOC_PATH=`which protoc-gen-mypy` -protoc --plugin=protoc-gen-mypy=${MYPY_PROTOC_PATH} -Iprotobuf=${BABUSHKA_ROOT_FOLDER_PATH}/babushka-core/src/protobuf/ --python_out=${BABUSHKA_ROOT_FOLDER_PATH}/python/python/pybushka --mypy_out=${BABUSHKA_ROOT_FOLDER_PATH}/python/python/pybushka ${BABUSHKA_ROOT_FOLDER_PATH}/babushka-core/src/protobuf/*.proto +protoc --plugin=protoc-gen-mypy=${MYPY_PROTOC_PATH} -Iprotobuf=${GLIDE_ROOT_FOLDER_PATH}/glide-core/src/protobuf/ --python_out=${GLIDE_ROOT_FOLDER_PATH}/python/python/glide --mypy_out=${GLIDE_ROOT_FOLDER_PATH}/python/python/glide ${GLIDE_ROOT_FOLDER_PATH}/glide-core/src/protobuf/*.proto ``` ### Linters @@ -80,10 +80,10 @@ Run from the main `/python` folder > Note: make sure to [generate protobuf with interface files]("#protobuf-interface-files") before running mypy linter ```bash pip install -r dev_requirements.txt - isort . --profile black --skip-glob python/pybushka/protobuf - black . --exclude python/pybushka/protobuf - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=python/pybushka/protobuf,.env/* --extend-ignore=E230 - flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --exclude=python/pybushka/protobuf,.env/* --extend-ignore=E230 + isort . --profile black --skip-glob python/glide/protobuf + black . --exclude python/glide/protobuf + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=python/glide/protobuf,.env/* --extend-ignore=E230 + flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --exclude=python/glide/protobuf,.env/* --extend-ignore=E230 # run type check mypy . ``` diff --git a/python/README.md b/python/README.md index aea87f723f..e4203043ca 100644 --- a/python/README.md +++ b/python/README.md @@ -2,7 +2,7 @@ ## System Requirements -The beta release of Babushka was tested on Intel x86_64 using Ubuntu 22.04.1, Amazon Linux 2023 (AL2023), and macOS 12.7. +The beta release of GLIDE for Redis was tested on Intel x86_64 using Ubuntu 22.04.1, Amazon Linux 2023 (AL2023), and macOS 12.7. ## Python supported version Python 3.8 or higher. @@ -11,17 +11,17 @@ Python 3.8 or higher. ### Installing via Package Manager (pip) -To install babushka using `pip`, follow these steps: +To install GLIDE for Redis using `pip`, follow these steps: 1. Open your terminal. 2. Execute the command below: ```bash - $ pip install babushka + $ pip install glide-for-redis ``` 3. After installation, confirm the client is accessible by running: ```bash $ python3 - >>> import babushka + >>> import glide ``` ### Build from source @@ -70,8 +70,8 @@ Before starting this step, make sure you've installed all software requirments. 1. Clone the repository: ```bash VERSION=0.1.0 # You can modify this to other released version or set it to "main" to get the unstable branch - git clone --branch ${VERSION} https://github.com/aws/babushka.git - cd babushka + git clone --branch ${VERSION} https://github.com/aws/glide-for-redis.git + cd glide-for-redis ``` 2. Initialize git submodule: ```bash @@ -79,8 +79,8 @@ Before starting this step, make sure you've installed all software requirments. ``` 3. Generate protobuf files: ```bash - BABUSHKA_ROOT_FOLDER_PATH=. - protoc -Iprotobuf=${BABUSHKA_ROOT_FOLDER_PATH}/babushka-core/src/protobuf/ --python_out=${BABUSHKA_ROOT_FOLDER_PATH}/python/python/pybushka ${BABUSHKA_ROOT_FOLDER_PATH}/babushka-core/src/protobuf/*.proto + GLIDE_ROOT_FOLDER_PATH=. + protoc -Iprotobuf=${GLIDE_ROOT_FOLDER_PATH}/glide-core/src/protobuf/ --python_out=${GLIDE_ROOT_FOLDER_PATH}/python/python/glide ${GLIDE_ROOT_FOLDER_PATH}/glide-core/src/protobuf/*.proto ``` 4. Create a virtual environment: ```bash @@ -113,7 +113,7 @@ Before starting this step, make sure you've installed all software requirments. #### Cluster Redis: ```python: ->>> from pybushka import ( +>>> from glide import ( ... NodeAddress, ... ClusterClientConfiguration, ... RedisClusterClient, @@ -132,7 +132,7 @@ Before starting this step, make sure you've installed all software requirments. #### Standalone Redis: ```python: ->>> from pybushka import ( +>>> from glide import ( ... NodeAddress, ... RedisClientConfiguration, ... RedisClient, diff --git a/python/THIRD_PARTY_LICENSES_PYTHON b/python/THIRD_PARTY_LICENSES_PYTHON index 38dbdf66b8..a3fe225930 100644 --- a/python/THIRD_PARTY_LICENSES_PYTHON +++ b/python/THIRD_PARTY_LICENSES_PYTHON @@ -11,7 +11,7 @@ Package SPDX-License-Identifier: 0BSD OR MIT OR Apache-2.0 Package Artifact: https://crates.io/api/v1/crates/adler/1.0.2/download Package Artifact: https://github.com/jonas-schievink/adler.git ----------------------- -Package ID: babushka:0.1.0 +Package ID: glide:0.1.0 Package Homepage: Package SPDX-License-Identifier: Apache-2.0 Package Artifact: 0Package Artifact: 0----------------------- @@ -1346,7 +1346,7 @@ Package Artifact: https://github.com/Lokathor/tinyvec.git unicode-ident/1.0.11 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/unicode-ident/1.0.11/LICENSE-APACHE +/home/ubuntu/glide/python/ort_results/Crate/unknown/unicode-ident/1.0.11/LICENSE-APACHE Apache License Version 2.0, January 2004 @@ -1530,7 +1530,7 @@ END OF TERMS AND CONDITIONS unicode-ident/1.0.11 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/unicode-ident/1.0.11/LICENSE-UNICODE +/home/ubuntu/glide/python/ort_results/Crate/unknown/unicode-ident/1.0.11/LICENSE-UNICODE UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE @@ -1584,7 +1584,7 @@ written authorization of the copyright holder. unicode-ident/1.0.11 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/unicode-ident/1.0.11/LICENSE-MIT +/home/ubuntu/glide/python/ort_results/Crate/unknown/unicode-ident/1.0.11/LICENSE-MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -1615,7 +1615,7 @@ DEALINGS IN THE SOFTWARE. adler/1.0.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/adler/1.0.2/LICENSE-APACHE +/home/ubuntu/glide/python/ort_results/Crate/unknown/adler/1.0.2/LICENSE-APACHE Apache License Version 2.0, January 2004 @@ -1824,7 +1824,7 @@ limitations under the License. adler/1.0.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/adler/1.0.2/LICENSE-0BSD +/home/ubuntu/glide/python/ort_results/Crate/unknown/adler/1.0.2/LICENSE-0BSD Copyright (C) Jonas Schievink @@ -1844,7 +1844,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. adler/1.0.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/adler/1.0.2/LICENSE-MIT +/home/ubuntu/glide/python/ort_results/Crate/unknown/adler/1.0.2/LICENSE-MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated @@ -1875,7 +1875,7 @@ DEALINGS IN THE SOFTWARE. openssl/0.10.56 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-macros/LICENSE-APACHE +/home/ubuntu/glide/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-macros/LICENSE-APACHE Apache License Version 2.0, January 2004 @@ -2085,7 +2085,7 @@ openssl/0.10.56 LICENSE openssl/0.10.56 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-macros/LICENSE-MIT +/home/ubuntu/glide/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-macros/LICENSE-MIT Copyright (c) 2022 Steven Fackler @@ -2112,7 +2112,7 @@ SOFTWARE. openssl/0.10.56 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/openssl/0.10.56/openssl/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/openssl/0.10.56/openssl/LICENSE Copyright 2011-2017 Google Inc. 2013 Jack Lloyd @@ -2135,7 +2135,7 @@ limitations under the License. openssl/0.10.56 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-sys/LICENSE-MIT +/home/ubuntu/glide/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-sys/LICENSE-MIT Copyright (c) 2014 Alex Crichton @@ -2168,7 +2168,7 @@ DEALINGS IN THE SOFTWARE. openssl/0.10.56 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-errors/LICENSE-APACHE +/home/ubuntu/glide/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-errors/LICENSE-APACHE Apache License Version 2.0, January 2004 @@ -2378,7 +2378,7 @@ openssl/0.10.56 LICENSE openssl/0.10.56 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-errors/LICENSE-MIT +/home/ubuntu/glide/python/ort_results/Crate/unknown/openssl/0.10.56/openssl-errors/LICENSE-MIT Copyright (c) 2019 Steven Fackler @@ -2405,7 +2405,7 @@ SOFTWARE. pyo3-asyncio/0.19.0 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-asyncio/0.19.0/pyo3-asyncio-0.19.0/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-asyncio/0.19.0/pyo3-asyncio-0.19.0/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -2602,7 +2602,7 @@ pyo3-asyncio/0.19.0 LICENSE pyo3-ffi/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -2799,7 +2799,7 @@ pyo3-ffi/0.19.2 LICENSE pyo3-ffi/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-ffi/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-ffi/LICENSE A. HISTORY OF THE SOFTWARE ========================== @@ -3424,7 +3424,7 @@ docs/license.html_lib. pyo3-ffi/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-macros/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-macros/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -3621,7 +3621,7 @@ pyo3-ffi/0.19.2 LICENSE pyo3-ffi/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-build-config/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-build-config/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -3818,7 +3818,7 @@ pyo3-ffi/0.19.2 LICENSE pyo3-ffi/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-macros-backend/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-ffi/0.19.2/pyo3-macros-backend/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -4015,7 +4015,7 @@ pyo3-ffi/0.19.2 LICENSE pyo3-macros-backend/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -4212,7 +4212,7 @@ pyo3-macros-backend/0.19.2 LICENSE pyo3-macros-backend/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-ffi/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-ffi/LICENSE A. HISTORY OF THE SOFTWARE ========================== @@ -4837,7 +4837,7 @@ docs/license.html_lib. pyo3-macros-backend/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-macros/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-macros/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -5034,7 +5034,7 @@ pyo3-macros-backend/0.19.2 LICENSE pyo3-macros-backend/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-build-config/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-build-config/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -5231,7 +5231,7 @@ pyo3-macros-backend/0.19.2 LICENSE pyo3-macros-backend/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-macros-backend/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros-backend/0.19.2/pyo3-macros-backend/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -5428,7 +5428,7 @@ pyo3-macros-backend/0.19.2 LICENSE pyo3-macros/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -5625,7 +5625,7 @@ pyo3-macros/0.19.2 LICENSE pyo3-macros/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-ffi/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-ffi/LICENSE A. HISTORY OF THE SOFTWARE ========================== @@ -6250,7 +6250,7 @@ docs/license.html_lib. pyo3-macros/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-macros/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-macros/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -6447,7 +6447,7 @@ pyo3-macros/0.19.2 LICENSE pyo3-macros/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-build-config/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-build-config/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -6644,7 +6644,7 @@ pyo3-macros/0.19.2 LICENSE pyo3-macros/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-macros-backend/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3-macros/0.19.2/pyo3-macros-backend/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -6841,7 +6841,7 @@ pyo3-macros/0.19.2 LICENSE pyo3/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3/0.19.2/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3/0.19.2/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -7038,7 +7038,7 @@ pyo3/0.19.2 LICENSE pyo3/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-ffi/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-ffi/LICENSE A. HISTORY OF THE SOFTWARE ========================== @@ -7663,7 +7663,7 @@ docs/license.html_lib. pyo3/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-macros/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-macros/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -7860,7 +7860,7 @@ pyo3/0.19.2 LICENSE pyo3/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-build-config/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-build-config/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -8057,7 +8057,7 @@ pyo3/0.19.2 LICENSE pyo3/0.19.2 LICENSE -/home/ubuntu/babushka/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-macros-backend/LICENSE +/home/ubuntu/glide/python/ort_results/Crate/unknown/pyo3/0.19.2/pyo3-macros-backend/LICENSE Copyright (c) 2017-present PyO3 Project and Contributors. https://github.com/PyO3 @@ -8254,7 +8254,7 @@ pyo3/0.19.2 LICENSE async-timeout/4.0.2 LICENSE -/home/ubuntu/babushka/python/ort_results/PyPI/unknown/async-timeout/4.0.2/LICENSE +/home/ubuntu/glide/python/ort_results/PyPI/unknown/async-timeout/4.0.2/LICENSE Copyright 2016-2020 aio-libs collaboration. @@ -8275,7 +8275,7 @@ limitations under the License. google-api-core/2.12.0 LICENSE -/home/ubuntu/babushka/python/ort_results/PyPI/unknown/google-api-core/2.12.0/LICENSE +/home/ubuntu/glide/python/ort_results/PyPI/unknown/google-api-core/2.12.0/LICENSE Apache License @@ -8485,7 +8485,7 @@ google-api-core/2.12.0 LICENSE google-api-python-client/2.85.0 LICENSE -/home/ubuntu/babushka/python/ort_results/PyPI/unknown/google-api-python-client/2.85.0/LICENSE +/home/ubuntu/glide/python/ort_results/PyPI/unknown/google-api-python-client/2.85.0/LICENSE Apache License Version 2.0, January 2004 @@ -8694,7 +8694,7 @@ google-api-python-client/2.85.0 LICENSE google-api-python-client/2.85.0 LICENSE -/home/ubuntu/babushka/python/ort_results/PyPI/unknown/google-api-python-client/2.85.0/docs/dyn/compute_alpha.licenses.html +/home/ubuntu/glide/python/ort_results/PyPI/unknown/google-api-python-client/2.85.0/docs/dyn/compute_alpha.licenses.html