static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); nodeConfig.NodeId = "ServerA"; nodeConfig.NodeName = "StitchIntegration.ServerA"; using (var core = new CrossStitchCore(nodeConfig)) { Console.Title = core.Name; _testLog = new ModuleLog(core.MessageBus, "ServerA"); core.AddModule(new BackplaneModule(core)); core.AddModule(new StitchesModule(core)); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Start(); _testLog.LogInformation("Waiting for ServerB"); // Wait until we get a node joined event with ServerB. Kick off the test and unsubscribe core.MessageBus.Subscribe <ClusterMemberEvent>(b => b .WithTopic(ClusterMemberEvent.EnteringEvent) .Invoke(m => TestStep1(core.MessageBus, m.NodeId, m.NetworkNodeId)) .OnThreadPool() .MaximumEvents(1)); Console.ReadKey(); core.Stop(); } }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { core.MessageBus.Subscribe <NodeAddedToClusterEvent>(s => s.WithChannelName(NodeAddedToClusterEvent.EventName).Invoke(NodeAdded)); core.MessageBus.Subscribe <NodeRemovedFromClusterEvent>(s => s.WithChannelName(NodeRemovedFromClusterEvent.EventName).Invoke(NodeRemoved)); core.MessageBus.Subscribe <ObjectReceivedEvent <NodeStatus> >(b => b .WithChannelName(ReceivedEvent.ReceivedEventName(NodeStatus.BroadcastEvent)) .Invoke(ReceiveNodeStatus)); core.MessageBus.TimerSubscribe(1, b => b.Invoke(m => SendPing(core))); core.AddModule(new BackplaneModule(core)); core.AddModule(new LoggingModule(core, Common.Logging.LogManager.GetLogger("CrossStitch"))); core.Start(); core.Log.LogInformation("Started MASTER node {0}", core.NodeId); Console.ReadKey(); core.Log.LogInformation("Stopping node {0}", core.NodeId); core.Stop(); } }
private static void Main(string[] args) { var config = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(config)) { var stitchesConfiguration = StitchesConfiguration.GetDefault(); var stitches = new StitchesModule(core, stitchesConfiguration); core.AddModule(stitches); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.MessageBus.Subscribe <StitchHealthEvent>(b => b .WithTopic(StitchHealthEvent.TopicUnhealthy) .Invoke(e => core.Log.LogInformation("Stitch {0} is unhealthy", e.InstanceId))); core.MessageBus.Subscribe <StitchHealthEvent>(b => b .WithTopic(StitchHealthEvent.TopicReturnToHealth) .Invoke(e => core.Log.LogInformation("Stitch {0} is Healthy again", e.InstanceId))); core.Start(); StartBuiltinStitch(core); Console.ReadKey(); core.Stop(); } }
static void Main(string[] args) { var config = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(config)) { var stitchesConfiguration = StitchesConfiguration.GetDefault(); var stitches = new StitchesModule(core, stitchesConfiguration); core.AddModule(stitches); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Start(); // First stitch is a Process, using STDIO StartProcessStitch(core, "Stdio", MessageChannelType.Stdio); // Second stitch is a Process using Pipes StartProcessStitch(core, "Pipes", MessageChannelType.Pipe); // Second stitch is a built -in class StartBuiltinStitch(core); Console.ReadKey(); core.Stop(); } }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { core.MessageBus.Subscribe <NodeAddedToClusterEvent>(l => l .WithTopic(NodeAddedToClusterEvent.EventName) .Invoke(NodeAdded)); core.MessageBus.Subscribe <NodeRemovedFromClusterEvent>(l => l .WithTopic(NodeRemovedFromClusterEvent.EventName) .Invoke(NodeRemoved)); core.AddModule(new BackplaneModule(core)); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Start(); core.Log.LogInformation("Starting CLIENT node {0}", core.NodeId); Console.ReadKey(); core.Log.LogInformation("Stopping node {0}", core.NodeId); core.Stop(); } }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { core.MessageBus.Subscribe <NodeAddedToClusterEvent>(s => s.WithTopic(NodeAddedToClusterEvent.EventName).Invoke(NodeAdded)); core.MessageBus.Subscribe <NodeRemovedFromClusterEvent>(s => s.WithTopic(NodeRemovedFromClusterEvent.EventName).Invoke(NodeRemoved)); core.MessageBus.Subscribe <ObjectReceivedEvent <NodeStatus> >(b => b .WithTopic(ReceivedEvent.ReceivedEventName(NodeStatus.BroadcastEvent)) .Invoke(ReceiveNodeStatus)); core.MessageBus.TimerSubscribe("tick", 1, b => b.Invoke(m => SendPing(core))); core.AddModule(new BackplaneModule(core)); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Start(); core.Log.LogInformation("Started MASTER node {0}", core.NodeId); Console.ReadKey(); core.Log.LogInformation("Stopping node {0}", core.NodeId); core.Stop(); } }
private static void StartBuiltinStitch(CrossStitchCore core) { var group3 = new StitchGroupName("StitchStart", "BuiltIn", "1"); var packageResult3 = core.MessageBus.RequestWait <DataRequest <PackageFile>, DataResponse <PackageFile> >(DataRequest <PackageFile> .Save(new PackageFile { Id = group3.ToString(), GroupName = group3, Adaptor = new InstanceAdaptorDetails { Type = AdaptorType.BuildInClassV1, Parameters = new Dictionary <string, string> { { CrossStitch.Stitch.BuiltInClassV1.Parameters.TypeName, typeof(StitchStartBuiltInStitch).AssemblyQualifiedName } } }, }, true)); var createResult3 = core.MessageBus.RequestWait <LocalCreateInstanceRequest, LocalCreateInstanceResponse>(new LocalCreateInstanceRequest { Name = "StitchStart.BuiltIn", GroupName = group3, NumberOfInstances = 1 }); core.MessageBus.RequestWait <InstanceRequest, InstanceResponse>(InstanceRequest.ChannelStart, new InstanceRequest { Id = createResult3.CreatedIds.FirstOrDefault() }); }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { core.MessageBus.Subscribe <NodeAddedToClusterEvent>(l => l .WithChannelName(NodeAddedToClusterEvent.EventName) .Invoke(NodeAdded)); core.MessageBus.Subscribe <NodeRemovedFromClusterEvent>(l => l .WithChannelName(NodeRemovedFromClusterEvent.EventName) .Invoke(NodeRemoved)); core.AddModule(new BackplaneModule(core)); core.AddModule(new LoggingModule(core, Common.Logging.LogManager.GetLogger("CrossStitch"))); core.Start(); core.Log.LogInformation("Starting CLIENT node {0}", core.NodeId); Console.ReadKey(); core.Log.LogInformation("Stopping node {0}", core.NodeId); core.Stop(); } }
private static void StartProcessStitch(CrossStitchCore core, string name, MessageChannelType channelType) { var group1 = new StitchGroupName("StitchStart", name, "1"); var packageResult1 = core.MessageBus.RequestWait <DataRequest <PackageFile>, DataResponse <PackageFile> >(DataRequest <PackageFile> .Save(new PackageFile { Id = group1.ToString(), GroupName = group1, Adaptor = new InstanceAdaptorDetails { Type = AdaptorType.ProcessV1, Parameters = new Dictionary <string, string> { { Parameters.RunningDirectory, "." }, { Parameters.ExecutableName, "StitchStart.Client.exe" } }, RequiresPackageUnzip = false, Channel = channelType } }, true)); var createResult1 = core.MessageBus.RequestWait <LocalCreateInstanceRequest, LocalCreateInstanceResponse>(new LocalCreateInstanceRequest { Name = "StitchStart." + name, GroupName = group1, NumberOfInstances = 1, }); core.MessageBus.RequestWait <InstanceRequest, InstanceResponse>(InstanceRequest.ChannelStart, new InstanceRequest { Id = createResult1.CreatedIds.FirstOrDefault() }); }
public StitchAdaptorFactory(CrossStitchCore core, StitchesConfiguration configuration, StitchFileSystem fileSystem, IModuleLog log, IStitchEventObserver observer) { _core = core; _configuration = configuration; _fileSystem = fileSystem; _log = log; _observer = observer; }
public StitchMonitorModule(CrossStitchCore core, NodeConfiguration configuration) { _messageBus = core.MessageBus; _configuration = configuration; var data = new DataHelperClient(core.MessageBus); var log = new ModuleLog(_messageBus, Name); _heartbeatService = new StitchHeartbeatService(data, log, new HeartbeatSender(_messageBus)); }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { // Setup an in-memory data store var store = new InMemoryDataStorage(); core.AddModule(new DataModule(core.MessageBus, store)); // Backplane so we can cluster core.AddModule(new BackplaneModule(core)); // Stitches so we can host the stitch instances var stitchesConfig = StitchesConfiguration.GetDefault(); core.AddModule(new StitchesModule(core, stitchesConfig)); // Setup logging. var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); // Create a stitch instance to run on startup var groupName = new StitchGroupName("PenPal.StitchA.1"); var packageFile = new PackageFile { Id = groupName.ToString(), GroupName = groupName, Adaptor = new InstanceAdaptorDetails { Type = AdaptorType.ProcessV1, Parameters = new Dictionary <string, string> { { Parameters.RunningDirectory, "." }, { Parameters.ExecutableArguments, "" }, { Parameters.ExecutableName, "PenPal.StitchA.exe" } } }, }; store.Save(packageFile, true); var stitch = new StitchInstance { Name = "StitchA", GroupName = groupName, OwnerNodeName = core.Name, OwnerNodeId = core.NodeId, State = InstanceStateType.Running }; store.Save(stitch, true); core.Start(); Console.ReadKey(); core.Stop(); } }
public StitchesService(CrossStitchCore core, IDataRepository data, StitchFileSystem fileSystem, StitchInstanceManager stitchInstanceManager, IModuleLog log, IStitchEventNotifier notifier) { _fileSystem = fileSystem; _data = data; _core = core; _notifier = notifier; _log = log; _stitchInstanceManager = stitchInstanceManager; }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { var httpServer = new NancyHttpModule(core.MessageBus); core.AddModule(httpServer); var dataStorage = new InMemoryDataStorage(); var data = new DataModule(core.MessageBus, dataStorage); core.AddModule(data); var stitchesConfiguration = StitchesConfiguration.GetDefault(); var stitches = new StitchesModule(core, stitchesConfiguration); core.AddModule(stitches); var groupName = new StitchGroupName("HttpTest", "Stitch", "1"); var packageFile = new PackageFile { Id = groupName.ToString(), GroupName = groupName, Adaptor = new InstanceAdaptorDetails { Type = AdaptorType.ProcessV1, Parameters = new Dictionary <string, string> { { Parameters.RunningDirectory, "." }, { Parameters.ExecutableName, "HttpTest.Stitch.exe" }, //{ Parameters.ArgumentsFormat, "{ExecutableName} {CoreArgs} -- {CustomArgs}" }, //{ Parameters.ExecutableFormat, "dotnet" }, } }, }; dataStorage.Save(packageFile, true); var stitch = new StitchInstance { Name = "HttpTest.Stitch", GroupName = groupName, State = InstanceStateType.Running }; dataStorage.Save(stitch, true); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Log.LogInformation("Started"); core.Start(); Console.ReadKey(); core.Stop(); } }
public StitchMonitorModule(CrossStitchCore core, NodeConfiguration configuration) { _configuration = configuration; var log = new ModuleLog(core.MessageBus, Name); var calculator = new StitchHealthCalculator(configuration.MissedHeartbeatsThreshold); var heartbeatSender = new HeartbeatSender(core.MessageBus); var healthNotifier = new StitchHealthNotifier(core.MessageBus); _heartbeatService = new StitchHeartbeatService(log, heartbeatSender, healthNotifier, calculator); _subscriptions = new SubscriptionCollection(core.MessageBus); }
public CrossStitchServiceControl() { var nodeConfiguration = NodeConfiguration.GetDefault(); _core = new CrossStitchCore(nodeConfiguration); _core.AddModule(new LoggingModule(_core, Common.Logging.LogManager.GetLogger("CrossStitch"))); _core.AddModule(new NancyHttpModule(_core.MessageBus)); _core.AddModule(new DataModule(_core.MessageBus, new FolderDataStorage())); _core.AddModule(new StitchesModule(_core)); _core.AddModule(new BackplaneModule(_core)); }
public MasterModule(CrossStitchCore core, NodeConfiguration configuration) { _configuration = configuration; _messageBus = core.MessageBus; _log = new ModuleLog(core.MessageBus, Name); var data = new DataHelperClient(core.MessageBus); _data = new MasterDataRepository(core.NodeId, data); var stitches = new StitchRequestHandler(core.MessageBus); var sender = new ClusterMessageSender(core.MessageBus); _service = new MasterService(core, _log, _data, stitches, sender); }
public StitchesModule(CrossStitchCore core, StitchesConfiguration configuration = null) { _messageBus = core.MessageBus; configuration = configuration ?? StitchesConfiguration.GetDefault(); var fileSystem = new StitchFileSystem(configuration, new DateTimeVersionManager()); var manager = new StitchInstanceManager(configuration, fileSystem); var log = new ModuleLog(_messageBus, Name); var observer = new StitchEventObserver(_messageBus, log); var data = new DataHelperClient(core.MessageBus); var notifier = new StitchEventNotifier(_messageBus); _service = new StitchesService(core, data, fileSystem, manager, observer, log, notifier); }
public CrossStitchServiceControl() { var nodeConfiguration = NodeConfiguration.GetDefault(); _core = new CrossStitchCore(nodeConfiguration); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); _core.AddModule(new LoggingModule(_core, logger)); _core.AddModule(new NancyHttpModule(_core.MessageBus)); _core.AddModule(new DataModule(_core.MessageBus, new FolderDataStorage())); _core.AddModule(new StitchesModule(_core)); _core.AddModule(new BackplaneModule(_core)); }
public BackplaneModule(CrossStitchCore core, IClusterBackplane backplane = null, BackplaneConfiguration configuration = null) { _messageBus = core.MessageBus; _log = new ModuleLog(_messageBus, Name); _configuration = configuration ?? BackplaneConfiguration.GetDefault(); _backplane = backplane ?? new ZyreBackplane(core, _configuration); // Forward messages from the backplane to the IMessageBus _backplane.MessageReceived += MessageReceivedHandler; _backplane.ClusterMember += ClusterMemberHandler; _backplane.ZoneMember += ZoneMemberHandler; }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(nodeConfig)) { var httpServer = new NancyHttpModule(core.MessageBus); core.AddModule(httpServer); var dataStorage = new InMemoryDataStorage(); var data = new DataModule(core.MessageBus, dataStorage); core.AddModule(data); var stitchesConfiguration = StitchesConfiguration.GetDefault(); var stitches = new StitchesModule(core, stitchesConfiguration); core.AddModule(stitches); var groupName = new StitchGroupName("HttpTest", "Stitch", "1"); var packageFile = new PackageFile { Id = groupName.ToString(), GroupName = groupName, Adaptor = new InstanceAdaptorDetails { Type = AdaptorType.ProcessV1, Parameters = new Dictionary <string, string> { { CrossStitch.Stitch.ProcessV1.Parameters.DirectoryPath, "." }, { CrossStitch.Stitch.ProcessV1.Parameters.ExecutableName, "HttpTest.Stitch.exe" } } }, }; dataStorage.Save(packageFile, true); var stitch = new StitchInstance { Name = "HttpTest.Stitch", GroupName = groupName, State = InstanceStateType.Running, LastHeartbeatReceived = 0 }; dataStorage.Save(stitch, true); core.AddModule(new LoggingModule(core, Common.Logging.LogManager.GetLogger("CrossStitch"))); core.Start(); Console.ReadKey(); core.Stop(); } }
public StitchesService(CrossStitchCore core, IDataRepository data, StitchFileSystem fileSystem, StitchInstanceManager stitchInstanceManager, StitchEventObserver observer, IModuleLog log, IStitchEventNotifier notifier) { _fileSystem = fileSystem; _data = data; _core = core; _notifier = notifier; _log = log; _stitchInstanceManager = stitchInstanceManager; _stitchInstanceManager.StitchStateChange += observer.StitchInstancesOnStitchStateChanged; _stitchInstanceManager.HeartbeatReceived += observer.StitchInstanceManagerOnHeartbeatReceived; _stitchInstanceManager.LogsReceived += observer.StitchInstanceManagerOnLogsReceived; _stitchInstanceManager.RequestResponseReceived += observer.StitchInstanceManagerOnRequestResponseReceived; _stitchInstanceManager.DataMessageReceived += observer.StitchInstanceManagerOnDataMessageReceived; }
public StitchesModule(CrossStitchCore core, StitchesConfiguration configuration = null) { configuration = configuration ?? StitchesConfiguration.GetDefault(); var log = new ModuleLog(core.MessageBus, Name); var data = new DataHelperClient(core.MessageBus); var observer = new StitchEventObserver(core.MessageBus, data, log); var fileSystem = new StitchFileSystem(configuration, new DateTimeVersionManager()); var adaptorFactory = new StitchAdaptorFactory(core, configuration, fileSystem, log, observer); var manager = new StitchInstanceManager(fileSystem, adaptorFactory); var notifier = new StitchEventNotifier(core.MessageBus); _service = new StitchesService(core, data, fileSystem, manager, log, notifier); _subscriptions = new SubscriptionCollection(core.MessageBus); }
public string BuildCoreArgumentsString(StitchInstance stitchInstance, CrossStitchCore core, ProcessParameters parameters) { var sb = new StringBuilder(); AddArgument(sb, Arguments.CoreId, core.NodeId); AddArgument(sb, Arguments.CorePid, core.CorePid.ToString()); AddArgument(sb, Arguments.InstanceId, stitchInstance.Id); AddArgument(sb, Arguments.Application, stitchInstance.GroupName.Application); AddArgument(sb, Arguments.Component, stitchInstance.GroupName.Component); AddArgument(sb, Arguments.Version, stitchInstance.GroupName.Version); AddArgument(sb, Arguments.GroupName, stitchInstance.GroupName.ToString()); AddArgument(sb, Arguments.DataDirectory, parameters.DataDirectory); AddArgument(sb, Arguments.ChannelType, parameters.ChannelType.ToString()); AddArgument(sb, Arguments.Serializer, parameters.SerializerType.ToString()); return(sb.ToString()); }
private static void SendPing(CrossStitchCore core) { string remote = _remoteNodeId; if (string.IsNullOrEmpty(remote)) { return; } var request = new CommandRequest { Command = CommandType.Ping, Target = _remoteNodeId }; var response = core.MessageBus.Request <CommandRequest, CommandResponse>(request); Console.WriteLine($"Sent ping Response={response.Result} JobId={response.ScheduledJobId}"); }
static void Main(string[] args) { var config = NodeConfiguration.GetDefault(); using (var core = new CrossStitchCore(config)) { var dataStorage = new InMemoryDataStorage(); var groupName = new StitchGroupName("JsStitch", "Stitch", "1"); dataStorage.Save(new PackageFile { Id = groupName.ToString(), GroupName = groupName, Adaptor = new InstanceAdaptorDetails { Type = AdaptorType.ProcessV1, Parameters = new Dictionary <string, string> { { Parameters.RunningDirectory, "." }, { Parameters.ExecutableName, "JsStitch.Stitch.js" } } }, }, true); dataStorage.Save(new StitchInstance { Name = "JsStitch.Stitch", GroupName = groupName, State = InstanceStateType.Running }, true); var data = new DataModule(core.MessageBus, dataStorage); core.AddModule(data); var stitchesConfiguration = StitchesConfiguration.GetDefault(); var stitches = new StitchesModule(core, stitchesConfiguration); core.AddModule(stitches); var logger = new LoggerFactory().AddConsole(LogLevel.Debug).CreateLogger <Program>(); core.AddModule(new LoggingModule(core, logger)); core.Start(); Console.ReadKey(); core.Stop(); } }
public ZyreBackplane(CrossStitchCore core, BackplaneConfiguration config = null, ISerializer serializer = null) { _core = core; _config = config ?? BackplaneConfiguration.GetDefault(); _serializer = serializer ?? new JsonSerializer(); // TODO: Need to expose more zyre options in the config, including broadcast port, broadcast interface, // and beacon interval. _zyre = new NetMQ.Zyre.Zyre(core.NodeId); _zyre.EnterEvent += ZyreEnterEvent; _zyre.StopEvent += ZyreStopEvent; _zyre.ExitEvent += ZyreExitEvent; _zyre.EvasiveEvent += ZyreEvasiveEvent; _zyre.JoinEvent += ZyreJoinEvent; _zyre.LeaveEvent += ZyreLeaveEvent; _zyre.WhisperEvent += ZyreWhisperEvent; _zyre.ShoutEvent += ZyreShoutEvent; }
public ProcessStitchAdaptor(CrossStitchCore core, StitchesConfiguration configuration, StitchInstance stitchInstance, IStitchEventObserver observer, ProcessParameters parameters, IModuleLog log) { Assert.ArgNotNull(core, nameof(core)); Assert.ArgNotNull(configuration, nameof(configuration)); Assert.ArgNotNull(stitchInstance, nameof(stitchInstance)); Assert.ArgNotNull(observer, nameof(observer)); Assert.ArgNotNull(parameters, nameof(parameters)); Assert.ArgNotNull(log, nameof(log)); _core = core; _stitchInstance = stitchInstance; _observer = observer; _parameters = parameters; _log = log; _channelFactory = new CoreMessageChannelFactory(core.NodeId, stitchInstance.Id); _serializerFactory = new MessageSerializerFactory(); _processFactory = new ProcessFactory(stitchInstance, core, log); _stopRequested = false; }
public MasterService(CrossStitchCore core, IModuleLog log, MasterDataRepository data, IStitchRequestHandler stitches, IClusterMessageSender clusterSender) { _core = core; _log = log; _data = data; _stitches = stitches; _clusterSender = clusterSender; _clusterZones = new string[0]; _jobManager = new JobManager(_core.MessageBus, _data, _log); _commandHandlers = new Dictionary <CommandType, ICommandHandler> { { CommandType.Ping, new PingCommandHandler(_core.NodeId, data, _jobManager, _clusterSender) }, { CommandType.StartStitchInstance, new StartStitchCommandHandler(data, _jobManager, stitches, _clusterSender) }, { CommandType.StopStitchInstance, new StopStitchCommandHandler(data, _jobManager, stitches, _clusterSender) }, { CommandType.RemoveStitchInstance, new RemoveStitchCommandHandler(data, _jobManager, stitches, _clusterSender) }, { CommandType.StartStitchGroup, new StartAllStitchGroupCommandHandler(core.NodeId, data, _jobManager, stitches, _clusterSender) }, { CommandType.StopStitchGroup, new StopAllStitchGroupCommandHandler(core.NodeId, data, _jobManager, stitches, _clusterSender) } }; }
static void Main(string[] args) { var nodeConfig = NodeConfiguration.GetDefault(); nodeConfig.NodeId = "ServerB"; nodeConfig.NodeName = "StitchIntegration.ServerB"; using (var core = new CrossStitchCore(nodeConfig)) { Console.Title = core.Name; core.AddModule(new BackplaneModule(core)); core.AddModule(new StitchesModule(core)); core.AddModule(new LoggingModule(core, Common.Logging.LogManager.GetLogger("CrossStitch"))); // This Node just runs. ServerA will generate and send commands to this node to produce changes core.Start(); Console.ReadKey(); core.Stop(); } }