Summary
Aerospike is an Open Source NoSQL database. It has some similarities with Redis. The whole database can reside in memory or on file system. It uses the term of Record, equivalent of a row in RDBMS. The record size is limited by server startup configuration write-block-size parameter. Currently supported size is 1, 2, 4, 8 MB. Each record cannot exceed the configured size. It is not designed to support any type of application. In this test, I focused on it C# dotnet core client API, and did not test it for performance.
- Aerospike installation
- Testing with Docker
- Using Powershell/C# client to do CRUD
- Using F#/Paket/FSI and Aerospike dotnet core nuget pkg
Aerospike installation
Aerospike server install is straight forward. Please use the doc here
- I noticed that Aerospike use a huge executable to package all dependencies in a single file.
- You cannot run 2 or more Aerospike instances concurrently in one Linux server, this is because Aerospike uses a lot of memory, all processes read the memory for a single fixed address.
Testing with Docker
I have code examples
Using Powershell/C# client to do CRUD
The dotnet client is written in C#. The source code is lacking quality control. It is not Common Language Specification (CLS) compliant. You will see plenty of Java style variable names mixed with some in C# style. Because of this, it does not work with Powershell. If you need Powershell to do some tasks like testing Aerospike connectivity, authentication or simple query, I have a fork.
This can be fixed by doing something like this and fixing all the errors from Visual Studio.
using System;
[assembly:CLSCompliant(true)]
namespace DesignLibrary {}
I have a working example
Using F#/Paket/FSI and Aerospike dotnet core nuget pkg
If you do not want to create a C# project to run basic tests, F#, specifically FSI (F# script interactive) is for you. To make it work, you need to have Paket.
# install paket, assuming you have dotnet sdk installed
dotnet tool install -g paket
# to verify
dotnet tool list -g
# create a directory, and run paket init
$my_fsi_project_dir = ''
cd $my_fsi_project_dir
paket init
# add dependency
# go to nuget site: https://www.nuget.org/packages/Aerospike.Client/
# you make also
paket add Aerospike.Client --version 3.9.2
# generate F# load script
paket install --generate-load-scripts --load-script-framework netcoreapp3.1 --load-script-type fsx
Please check my sample F# CRUD code