AeroSharp 1.1.1

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package AeroSharp --version 1.1.1                
NuGet\Install-Package AeroSharp -Version 1.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AeroSharp" Version="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AeroSharp --version 1.1.1                
#r "nuget: AeroSharp, 1.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AeroSharp as a Cake Addin
#addin nuget:?package=AeroSharp&version=1.1.1

// Install AeroSharp as a Cake Tool
#tool nuget:?package=AeroSharp&version=1.1.1                

AeroSharp

OSS Template Version

Status Coverage

Version Downloads

Contributor Covenant Contributors Commits Forks Stargazers Issues

Apache 2.0 License

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:

  1. building a client provider that specifies how connections to Aerospike are established (e.g. cluster connection strings, credentials), and
  2. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 143 2/5/2024
1.1.1 208 8/13/2024
1.1.0 22,153 4/13/2023
1.0.0 4,286 3/30/2023
0.4.0 584 3/29/2023
0.3.1 5,846 6/2/2022
0.3.0 776 5/10/2022
0.2.0 1,031 4/13/2022
0.1.2 446 3/28/2022
0.1.1 648 1/31/2022
0.1.0 415 12/9/2021
0.1.0-preview-01 227 12/9/2021
0.1.0-prerelease-02 445 12/9/2021
0.1.0-prerelease-01 203 12/9/2021