All Projects → jchristn → WatsonCluster

jchristn / WatsonCluster

Licence: MIT license
A simple C# class using Watson TCP to enable a one-to-one high availability cluster.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to WatsonCluster

WatsonWebsocket
A simple C# async websocket server and client for reliable transmission and receipt of data
Stars: ✭ 158 (+777.78%)
Mutual labels:  watson, nuget, messaging, message
Bigq
Messaging platform in C# for TCP and Websockets, with or without SSL
Stars: ✭ 18 (+0%)
Mutual labels:  ssl, messaging, message
SimpleSockets
Asynchronous TCP .NET library with reliable transmission and receipt of data, with an ssl implementation.
Stars: ✭ 74 (+311.11%)
Mutual labels:  ssl, nuget, messaging
Watsontcp
WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
Stars: ✭ 209 (+1061.11%)
Mutual labels:  ssl, nuget, messaging
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (+5594.44%)
Mutual labels:  clustering, high-availability
Eliasdb
EliasDB a graph-based database.
Stars: ✭ 611 (+3294.44%)
Mutual labels:  clustering, cluster
Hawk
A web-based GUI for managing and monitoring the Pacemaker High-Availability cluster resource manager
Stars: ✭ 130 (+622.22%)
Mutual labels:  clustering, high-availability
Rayo.js
Micro framework for Node.js
Stars: ✭ 170 (+844.44%)
Mutual labels:  clustering, cluster
Micro Cluster
Run multiple micro servers and a front proxy at a time
Stars: ✭ 173 (+861.11%)
Mutual labels:  clustering, cluster
Masstransit
Distributed Application Framework for .NET
Stars: ✭ 4,103 (+22694.44%)
Mutual labels:  nuget, messaging
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+1361.11%)
Mutual labels:  ssl, messaging
Simpletcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 99 (+450%)
Mutual labels:  ssl, messaging
Elasticluster
Create clusters of VMs on the cloud and configure them with Ansible.
Stars: ✭ 298 (+1555.56%)
Mutual labels:  clustering, cluster
Supervizer
NodeJS Application Manager
Stars: ✭ 278 (+1444.44%)
Mutual labels:  clustering, cluster
Cluster
Easy Map Annotation Clustering 📍
Stars: ✭ 1,132 (+6188.89%)
Mutual labels:  clustering, cluster
pulseha
PulseHA is a active-passive high availability cluster daemon that uses GRPC and is written in GO.
Stars: ✭ 15 (-16.67%)
Mutual labels:  clustering, cluster
magento-cluster
Highly Available and Auto-scalable Magento Cluster
Stars: ✭ 21 (+16.67%)
Mutual labels:  clustering, cluster
mongo-replica-with-docker
How to deploy a MongoDB Replica Set using Docker
Stars: ✭ 105 (+483.33%)
Mutual labels:  clustering, cluster
genie
Genie: A Fast and Robust Hierarchical Clustering Algorithm (this R package has now been superseded by genieclust)
Stars: ✭ 21 (+16.67%)
Mutual labels:  clustering, cluster
Watsonwebserver
Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
Stars: ✭ 125 (+594.44%)
Mutual labels:  watson, nuget

alt tag

Watson Cluster

NuGet Version NuGet

Watson Cluster is the simplest, easiest, and fastest way to build highly-available applications using traditional 1+1 clustering. Watson Cluster enables a one-to-one high availability cluster and is targeted to .NET Core and .NET Framework, with or without SSL. Events are used to notify the encompassing application when the cluster is healthy (client and server connected) or unhealthy (client or server disconnected).

alt tag

New in v3.0.0

  • Breaking changes; migration from Func-based callbacks to Events
  • Added send with metadata functionality
  • Dependency update

Contributions

Thanks to @brudo for adding async support to WatsonCluster (v1.0.6) and all of your help from then!

Simple Example

Refer to the TestNode project for a full example.

using WatsonCluster; 

// Initialize
ClusterNode node = new ClusterNode(
  "127.0.0.1",  // listener IP
  8000,         // listener port
  "127.0.0.1",  // peer IP
  8001,         // peer port
  null,         // PFX certificate filename, for SSL
  null);        // PFX certificate file password

// Set configurable parameters
node.AcceptInvalidCertificates = true;   // if using SSL
node.MutuallyAuthenticate = true;        // always leave as false if not using SSL 

// Set events
node.MessageReceived += MessageReceived; 
node.ClusterHealthy += ClusterHealthy;
node.ClusterUnhealthy += ClusterUnhealthy;

// Implement events
static void ClusterHealthy(object sender, EventArgs args)
{
  Console.WriteLine("Cluster is healthy!");
}

static void ClusterUnhealthy(object sender, EventArgs args)
{
  Console.WriteLine("Cluster is unhealthy!");
}

static void MessageReceived(object sender, MessageReceivedEventArgs args)
{
  Console.WriteLine("New message: " + Encoding.UTF8.GetString(args.Data));
}

// Let's go!
node.Start();

// Send some messages
await node.Send("Hello, world!");

Test App

The TestNode project will help you understand and exercise the class library. You can spawn two instances of the TestNode app using opposing ports to test the functionality. The TestNode app hard-codes to 127.0.0.1.

Node 1
C:\node1> testnode.exe
Local port  : 8000
Remote port : 8001

Node 2
C:\node2> testnode.exe
Local port  : 8001
Remote port : 8000

Running under Mono

While .NET Core is the preferred environment for multi-platform deployments, WatsonCluster supports Mono environments with .NET Framework.
Watson works well in Mono environments to the extent that we have tested it. It is recommended that when running under Mono, you execute the containing EXE using --server and after using the Mono Ahead-of-Time Compiler (AOT).

NOTE: Windows accepts '0.0.0.0' as an IP address representing any interface. On Mac and Linux with Mono you must supply a specific IP address ('127.0.0.1' is also acceptable, but '0.0.0.0' is NOT).

mono --aot=nrgctx-trampolines=8096,nimt-trampolines=8096,ntrampolines=4048 --server myapp.exe
mono --server myapp.exe

Version History

Refer to CHANGELOG.md for details from previous versions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].