AeroSharp 1.0.0
See the version list below for details.
dotnet add package AeroSharp --version 1.0.0
NuGet\Install-Package AeroSharp -Version 1.0.0
<PackageReference Include="AeroSharp" Version="1.0.0" />
paket add AeroSharp --version 1.0.0
#r "nuget: AeroSharp, 1.0.0"
// Install AeroSharp as a Cake Addin #addin nuget:?package=AeroSharp&version=1.0.0 // Install AeroSharp as a Cake Tool #tool nuget:?package=AeroSharp&version=1.0.0
AeroSharp
About The Project
AeroSharp is a wrapper around the .NET Aerospike client. This library provides a variety of generic methods for storing and retrieving data on Aerospike while handling serialization, client-side compression, policy validation, and other features under the hood.
Installation
Get the latest version with NuGet:
// NuGet package manager console
Install-Package AeroSharp
Usage
In AeroSharp, accessing data stored in Aerospike (e.g. blobs or lists) generally involves two steps:
- building a client provider that specifies how connections to Aerospike are established (e.g. cluster connection strings, credentials), and
- building a data access object that provides an easy-to-use interface for interacting with the Aerospike database.
In general, you should only need to build one client provider and the underlying Aerospike client will maintain connections to all nodes in the Aerospike cluster. Once a client provider is built, you can then build a variety of data access objects to store and retrieve your various data types in Aerospike.
For example, this code builds a client provider that connects to a local instance of Aerospike and then writes and reads a blob of a custom data type (via KeyValueStore) and appends a few items to a list (via List).
var clientProvider = ClientProviderBuilder
.Configure()
.WithBootstrapServers(new string[] { "localhost" })
.WithoutCredentials()
.Build(); // Only do this once.
var keyValueStore = KeyValueStoreBuilder
.Configure(clientProvider)
.WithDataContext(new DataContext("my_namespace", "my_set"))
.UseMessagePackSerializer()
.Build<MyDataType>();
await keyValueStore.WriteAsync("record_key", new MyDataType("some data"), CancellationToken.None);
KeyValuePair<string, MyDataType> keyValueResult = await keyValueStore.ReadAsync("record_key", CancellationToken.None);
// keyValueResult contains [ Key = "record_key", Value = MyDataType("some data") ]
var list = ListBuilder
.Configure(clientProvider)
.WithDataContext(new DataContext("my_namespace", "my_set"))
.UseMessagePackSerializer()
.WithKey("list_record_key")
.Build<MyDataType>();
await list.AppendAsync(new MyDataType("list item 1"), CancellationToken.None);
await list.AppendAsync(new MyDataType("list item 2"), CancellationToken.None);
IEnumerable<MyDataType> listResult = await list.ReadAllAsync(CancellationToken.None);
// listResult contains [ MyDataType("list item 1"), MyDataType("list item 2") ]
Full library documentation can be found at the docs site.
Code examples can be found in the examples directory.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see CONTRIBUTING.md.
License
Distributed under the Apache 2.0
License. See LICENSE for more information.
Contact
Project Link: https://github.com/wayfair-incubator/AeroSharp
References
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Aerospike.Client (>= 6.0.0)
- FluentValidation (>= 11.0.3)
- lz4net (>= 1.0.15.93)
- MessagePack (>= 2.3.112)
- Polly (>= 7.2.3)
- protobuf-net (>= 3.1.4)
-
net7.0
- Aerospike.Client (>= 6.0.0)
- FluentValidation (>= 11.0.3)
- lz4net (>= 1.0.15.93)
- MessagePack (>= 2.3.112)
- Polly (>= 7.2.3)
- protobuf-net (>= 3.1.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.0-preview-7 | 141 | 2/5/2024 |
1.1.1 | 191 | 8/13/2024 |
1.1.0 | 21,987 | 4/13/2023 |
1.0.0 | 3,941 | 3/30/2023 |
0.4.0 | 578 | 3/29/2023 |
0.3.1 | 5,815 | 6/2/2022 |
0.3.0 | 766 | 5/10/2022 |
0.2.0 | 1,021 | 4/13/2022 |
0.1.2 | 440 | 3/28/2022 |
0.1.1 | 637 | 1/31/2022 |
0.1.0 | 409 | 12/9/2021 |
0.1.0-preview-01 | 225 | 12/9/2021 |
0.1.0-prerelease-02 | 443 | 12/9/2021 |
0.1.0-prerelease-01 | 201 | 12/9/2021 |