View a markdown version of this page

Amazon Keyspaces (適用於 Apache Cassandra) 程式庫和工具 - Amazon Keyspaces (適用於 Apache Cassandra)

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Amazon Keyspaces (適用於 Apache Cassandra) 程式庫和工具

本節提供有關 Amazon Keyspaces (適用於 Apache Cassandra) 程式庫、程式碼範例和工具的資訊。

程式庫和範例

您可以在 GitHub 的 和 AWS 範例儲存庫中找到 Amazon Keyspaces 開放原始碼程式庫AWS和開發人員工具。

Amazon Keyspaces (適用於 Apache Cassandra) 開發人員工具組

此儲存庫提供適用於 Amazon Keyspaces 的實用開發人員工具的 Docker 映像。例如,它包含具有最佳實務的 CQLSHRC 檔案、cqlsh 的選用 AWS 身分驗證擴展,以及執行常見任務的協助工具。此工具組已針對 Amazon Keyspaces 最佳化,但也適用於 Apache Cassandra 叢集。

https://github.com/aws-samples/amazon-keyspaces-toolkit.

Amazon Keyspaces (適用於 Apache Cassandra) 範例

此儲存庫是我們 Amazon Keyspaces 範例程式碼的官方清單。儲存庫依語言細分為區段 (請參閱範例)。每種語言都有自己的範例子區段。這些範例示範您可以在建置應用程式時使用的常見 Amazon Keyspaces 服務實作和模式。

https://github.com/aws-samples/amazon-keyspaces-examples/.

AWS Signature 第 4 版 (SigV4) 身分驗證外掛程式

外掛程式可讓您使用 AWS Identity and Access Management (IAM) 使用者和角色來管理對 Amazon Keyspaces 的存取。

Java:https://github.com/aws/aws-sigv4-auth-cassandra-java-driver-plugin

Node.js:https://github.com/aws/aws-sigv4-auth-cassandra-nodejs-driver-plugin

Python: https://github.com/aws/aws-sigv4-auth-cassandra-python-driver-plugin.

Go:https://github.com/aws/aws-sigv4-auth-cassandra-gocql-driver-plugin

反白的範例和開發人員工具儲存庫

以下是適用於 Amazon Keyspaces (適用於 Apache Cassandra) 的一系列實用社群工具。

Amazon Keyspaces 通訊協定緩衝區

您可以將通訊協定緩衝區 (Protobuf) 與 Amazon Keyspaces 搭配使用,以提供 Apache Cassandra 使用者定義類型 (UDTs) 的替代方案。Protobuf 是免費且開放原始碼的跨平台資料格式,用於序列化結構化資料。您可以使用 CQL BLOB資料類型存放 Protobuf 資料,並重構 UDTs同時保留跨應用程式和程式設計語言的結構化資料。

此儲存庫提供程式碼範例,可連線至 Amazon Keyspaces、建立新的資料表,以及插入包含 Protobuf 訊息的資料列。然後,會以強式一致性讀取資料列。

https://github.com/aws-samples/amazon-keyspaces-examples/tree/main/java/datastax-v4/protobuf-user-defined-types

CloudFormation 為 Amazon Keyspaces (適用於 Apache Cassandra) 指標建立 Amazon CloudWatch 儀表板的 範本

此儲存庫提供 CloudFormation 範本,可快速設定 Amazon Keyspaces 的 CloudWatch 指標。使用此範本可讓您透過使用常用指標提供可部署的預先建置 CloudWatch 儀表板,更輕鬆地開始使用。

https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templates.

搭配 使用 Amazon Keyspaces (適用於 Apache Cassandra) AWS Lambda

儲存庫包含示範如何從 Lambda 連線至 Amazon Keyspaces 的範例。以下是一些範例。

C#/。NET:https://github.com/aws-samples/amazon-keyspaces-examples/tree/main/dotnet/datastax-v3/connection-lambda

Java:https://github.com/aws-samples/amazon-keyspaces-examples/tree/main/java/datastax-v4/connection-lambda

另一個顯示如何從 Python Lambda 部署和使用 Amazon Keyspaces 的 Lambda 範例可從下列儲存庫取得。

https://github.com/aws-samples/aws-keyspaces-lambda-python

搭配 Spring 使用 Amazon Keyspaces (適用於 Apache Cassandra)

這是示範如何使用 Amazon Keyspaces 搭配 Spring Boot 的範例。

https://github.com/aws-samples/amazon-keyspaces-examples/tree/main/java/datastax-v4/spring

搭配 Scala 使用 Amazon Keyspaces (適用於 Apache Cassandra)

這是示範如何使用 SigV4 身分驗證外掛程式搭配 Scala 連線至 Amazon Keyspaces 的範例。

https://github.com/aws-samples/amazon-keyspaces-examples/tree/main/scala/datastax-v4/connection-sigv4

搭配 使用 Amazon Keyspaces (適用於 Apache Cassandra) AWS Glue

這是示範如何使用 Amazon Keyspaces 的範例 AWS Glue。

https://github.com/aws-samples/amazon-keyspaces-examples/tree/main/scala/datastax-v4/aws-glue

要 CloudFormation 轉換的 Amazon Keyspaces (適用於 Apache Cassandra) Cassandra 查詢語言 (CQL)

此套件實作命令列工具,將 Apache Cassandra 查詢語言 (CQL) 指令碼 CloudFormation 轉換為 (CloudFormation) 範本,這可讓 Amazon Keyspaces 結構描述在 CloudFormation 堆疊中輕鬆管理。

https://github.com/aws/amazon-keyspaces-cql-to-cfn-converter.

適用於 Java 的 Apache Cassandra 驅動程式的 Amazon Keyspaces (適用於 Apache Cassandra) 協助程式

此儲存庫包含搭配 Amazon Keyspaces (適用於 Apache Cassandra) 使用 DataStax Java 驅動程式時的驅動程式政策、範例和最佳實務。

https://github.com/aws-samples/amazon-keyspaces-java-driver-helpers.

Amazon Keyspaces (適用於 Apache Cassandra) 快照壓縮示範

此儲存庫示範如何壓縮、存放和讀取/寫入大型物件,以提高效能並降低輸送量和儲存成本。

https://github.com/aws-samples/amazon-keyspaces-compression-example.

Amazon Keyspaces (適用於 Apache Cassandra) 和 Amazon S3 轉碼器示範

自訂 Amazon S3 Codec 支援透明、使用者可設定的 UUID 指標映射至 Amazon S3 物件。

https://github.com/aws-samples/amazon-keyspaces-large-object-s3-demo.