ServerTools.ServerCommands
1.0.0
See the version list below for details.
dotnet add package ServerTools.ServerCommands --version 1.0.0
NuGet\Install-Package ServerTools.ServerCommands -Version 1.0.0
<PackageReference Include="ServerTools.ServerCommands" Version="1.0.0" />
paket add ServerTools.ServerCommands --version 1.0.0
#r "nuget: ServerTools.ServerCommands, 1.0.0"
// Install ServerTools.ServerCommands as a Cake Addin
#addin nuget:?package=ServerTools.ServerCommands&version=1.0.0
// Install ServerTools.ServerCommands as a Cake Tool
#tool nuget:?package=ServerTools.ServerCommands&version=1.0.0
About
ServerCommands facilitates running of units of code or commands remotely. It incorporates principles of messaging architectures used by most messaging tools and frameworks, like Azure Service Bus, AWS SQS, RabbitMQ, or Azure Storage Queues, Apache Kafka without any of the knowledge and configuration expertise to manage such installations and configurations.
Currently, the library requires an Azure Storage account to run. But by no means this is a major dependency. All messaging services work very similarly, and the choice to use Azure Storage is purely for simplictiy and cost. Azure Storage provides both storage and queueing service at a minimal cost. In future iterations, and upon demand, versions of this library that work with all the other messaging services will be provided.
More documentation is available at the ServerCommands.
How to Use
To post a command:
var _container = new CommandContainer();
_container.RegisterCommand<AddNumbersCommand>();
var c = new Commands(_container, Environment.GetEnvironmentVariable("StorageAccounName"), Environment.GetEnvironmentVariable("StorageAccountKey"));
_ = await c.PostCommand<AddNumbersCommand>(new { Number1 = 2, Number2 = 3 });
To execute commands:
var _container = new CommandContainer();
_container.RegisterCommand<AddNumbersCommand>();
var c = new Commands(_container, Environment.GetEnvironmentVariable("StorageAccounName"), Environment.GetEnvironmentVariable("StorageAccountKey"));
var result = await c.ExecuteCommands();
//check if something was wrong or if any items were processed at all
Assert.IsTrue(!result.Item1);
//check if 1 or more items were processed
Assert.IsTrue(result.Item2 > 0);
//check if there was any errors
Assert.IsTrue(result.Item3.Count > 0); //This value keeps the list of error messages that were encountered. After retrying 5 times the command is moved to the deadletterqueue.
And that's that!
For more detailed documentation and more complex use cases head to the offical documentation at the GitHub repo. If theer are questions or request new feautures do not hesitate to post them there.
Key Features
- Enhanced simplicity
- Asynchroneous remote execution
- Batching and correlation of commands
- Commands with remote response execution
- High performance
- Supports .NET 5.0+
Related Packages
- Azure.Storage.Queues: GitHub | Nuget
- Microsoft.Extensions.Logging: Nuget
- DryIoc: GitHub | Nuget
- Polly: GitHub | Nuget
Feedback
ServerCommands is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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. |
-
net5.0
- Azure.Storage.Queues (>= 12.8.0)
- DryIoc.dll (>= 4.8.4)
- FluentAssertions (>= 6.2.0)
- FluentAssertions.Analyzers (>= 0.13.0)
- Microsoft.Extensions.Logging (>= 6.0.0)
- NewtonSoft.Json (>= 13.0.1)
- Polly (>= 7.2.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ServerTools.ServerCommands:
Package | Downloads |
---|---|
ServerTools.ServerCommands.AzureStorageQueues
ServerCommands facilitates running of units of code or commands remotely. It incorporates principles of messaging architectures used by most messaging tools and frameworks, like Azure Service Bus, AWS SQS, RabbitMQ, or Azure Storage Queues, or Apache Kafka without any of the knowledge and configuration expertise to manage such installations and configurations. More documentation is available at https://github.com/hgjura/ServerTools.ServerCommands. |
|
ServerTools.ServerCommands.AzureServiceBus
ServerCommands facilitates running of units of code or commands remotely. It incorporates principles of messaging architectures used by most messaging tools and frameworks, like Azure Service Bus, AWS SQS, RabbitMQ, or Azure Storage Queues, or Apache Kafka without any of the knowledge and configuration expertise to manage such installations and configurations. More documentation is available at https://github.com/hgjura/ServerTools.ServerCommands. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Some release notes