Petabridge.Cmd.Cluster 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Petabridge.Cmd.Cluster --version 1.0.0                
NuGet\Install-Package Petabridge.Cmd.Cluster -Version 1.0.0                
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="Petabridge.Cmd.Cluster" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Petabridge.Cmd.Cluster --version 1.0.0                
#r "nuget: Petabridge.Cmd.Cluster, 1.0.0"                
#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 Petabridge.Cmd.Cluster as a Cake Addin
#addin nuget:?package=Petabridge.Cmd.Cluster&version=1.0.0

// Install Petabridge.Cmd.Cluster as a Cake Tool
#tool nuget:?package=Petabridge.Cmd.Cluster&version=1.0.0                

Akka.Cluster Petabridge.Cmd palettes for cluster management and monitoring.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Petabridge.Cmd.Cluster:

Package Downloads
FAkka.Shared

Package Description

FAkka.Seed.7.0

Package Description

FAkka.Server.Linux

Package Description

FAkka.FAkka.Seed.7.0

Package Description

FAkka.Shared.Linux

Package Description

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Petabridge.Cmd.Cluster:

Repository Stars
petabridge/akkadotnet-code-samples
Akka.NET professional reference code samples
Aaronontheweb/InMemoryCQRSReplication
Akka.NET Reference Architecture - CQRS + Sharding + In-Memory Replication
Version Downloads Last updated
1.4.3 32,278 6/17/2024
1.4.2 804 6/11/2024
1.4.1 22,597 3/18/2024
1.4.0 22,767 1/12/2024
1.3.3 352 1/10/2024
1.3.2 71,389 7/18/2023
1.3.1 22,364 5/4/2023
1.3.0 17,531 3/3/2023
1.3.0-beta1 221 3/1/2023
1.2.2 13,622 1/19/2023
1.2.1 2,395 12/19/2022
1.2.0 3,289 11/18/2022
1.1.4 1,755 7/17/2023
1.1.3 11,554 10/20/2022
1.1.2 6,370 9/28/2022
1.1.1 710 9/23/2022
1.1.0 73,722 6/9/2022
1.0.2 70,076 11/16/2021
1.0.1 35,253 8/3/2021
1.0.0 2,412 7/26/2021
0.8.5 86,464 5/3/2021
0.8.4 552 4/30/2021
0.8.3 9,009 3/18/2021
0.8.2 37,017 11/24/2020
0.8.1 9,718 11/16/2020
0.8.0 56,472 3/11/2020
0.8.0-rc2 496 3/10/2020
0.8.0-rc1 463 3/3/2020
0.7.1 7,347 3/3/2020
0.7.0 35,790 10/3/2019
0.6.3 11,724 7/30/2019
0.6.2 5,976 6/19/2019
0.6.1 2,528 5/19/2019
0.6.0 8,240 5/9/2019
0.5.0 52,242 3/6/2019
0.4.1 3,405 12/7/2018
0.4.0 1,534 11/27/2018
0.3.3 31,379 2/27/2018
0.3.2 16,034 12/20/2017
0.3.1 3,319 9/19/2017
0.3.0 1,139 9/14/2017
0.2.2 5,702 6/25/2017
0.2.1 975 6/6/2017
0.2.0 5,553 5/21/2017
0.1.2 962 4/25/2017
0.1.1 992 4/21/2017
0.1.0 1,622 4/18/2017

Petabridge.Cmd v1.0.0 is a major release of Petabridge.Cmd that doesn't include any breaking changes for older clients.
Programmatic `IPbmClient` Support**
It is now possible to invoke Petabridge.Cmd programmatically, as of Petabridge.Cmd 1.0.0 - and this can be done in one of two ways:
1. In-process, inside the same Akka.NET `ActorSystem` that is running the `PetabridgeCmd` host;
2. Remotely, from an external process that connects to the `PetabridgeCmd` host using the same TCP port used by the `pbm` CLI clients.
We've added [extensive documentation to the Petabridge.Cmd website which documents how to use these new `IPbmClient` implementations](https://cmd.petabridge.com/articles/clients/index.html#ipbmclient-programmatic-client), but we've also included a small example here:
```csharp
// <configureHost>
// create a Petabridge.Cmd host from our ActorSystem
// host is configured to run on port 11555 via HOCON
var pbmHost = PetabridgeCmd.Get(Sys);
// start the host
pbmHost.Start();
// </configureHost>
// <clientActorSystem>
// create client ActorSystem
using ActorSystem clientSystem = ActorSystem.Create("ClientSystem");
// grab copy of the PetabridgeCmdClient extension (Petabridge.Cmd.Common NuGet package)
var clientExt = PetabridgeCmdClient.Get(clientSystem);
// create IpEndPoint or DnsEndPoint for contacting remote host
// either one of these would work
var ip = new IPEndPoint(IPAddress.Loopback, 11555);
var dns = new DnsEndPoint("localhost", 11555);
// start a new IPbmClient attached to one of these EndPoints
// by default this operation will time out in 5 seconds.
// you can extend that by passing in a custom CancellationToken
IPbmClient remoteClient = await clientExt.StartRemoteClient(ip);
// </clientActorSystem>
// <runClient>
// invoke a "log peek" command, just like you would on CLI
CommandSession session = await remoteClient.ExecuteTextCommandAsync("log peek");
// grab a hold of the Akka.Streams materializer from ActorSystem
var materializer = Sys.Materializer();
// pipe the Akka.Streams Source<CommandResponse> to a Sink<CommandResponse>
// in this case, we're just going to send everything to a TestActor.
//
// This Akka.Streams "graph" can be materialized into a Task, which will
// complete once the stream is marked as complete by the Petabridge.Cmd host.
var completionTask = session.Stream.RunForeach(rsp =>
{
TestActor.Tell(rsp);
}, materializer);
// a client can also cancel the stream using the KillSwitch included
// inside the CommandSession object
session.KillSwitch.Shutdown();
// once either of those two events occur, the Task returned earlier
// will be complete
await completionTask;
// and we can validate that the TestActor received at least one CommandResponse
var response = ExpectMsg<CommandResponse>();
// </runClient>
```
Multiple Concurrent Client Sessions**
Another major architectural change we've introduced to Petabridge.Cmd in order to support programmatic clients is the notion of multiple client-facing sessions all originating from the same connection. Petabridge.Cmd now effectively supports command multi-plexing on the server and client side.
In effect, a single `IPbmClient` can now run multiple streaming commands at once - such as `log tail`, `cluster tail`, and `remote tail`, all over the same TCP connection.
This is a minor breaking change to some command palettes - all of the official Petabridge ones will be updated shortly to support this, but user-defined `CommandPalette`s may also need to be updated in order to support this. We will update our "[Creating Custom Commands](https://cmd.petabridge.com/articles/commands/custom-commands.html)" documentation shortly to help developers implement these changes successfully - the changes required are minor.