A light-weight, low ceremony app fabric for .NET
The Core of CrossStitch is comprised of a few bits: The CrossStitchCore class which is the top-level and organizes everything else, the CoreModule which allows the core to communicate with the message bus, and the CoreService which implements some logic specific to the core.
Every CrossStitchCore object has an ID and a Name. The Name is friendly and non-unique, and is only included for readability. The node ID should be unique, in the cluster. If it isn’t, and CrossStitch cannot enforce this requirement by itself, the status of one node may overwrite the status of other nodes in the cluster.
CrossStitch uses JSON for config files, and each module may have its own configuration as necessay. The Core module and other built-in modules use the file “node.json” to hold config values. The contents of this file are deserialized into a CrossStitch.Core.NodeConfiguration object. It has the following keys:
On startup, CrossStitch will attempt to get the ID in the following way:
node.json config file and uses that if it exists"StateFileFolder" config value (defaults to “.”), and uses the contents of that fileIf you want to use a particular id for your node, you can either set it up in the node.json config file or create a NODEID file with the ID value as the only contents of that file. There is no limit on the size of the node ID, but keep in mind that this value is used throughout CrossStitch for various communications, and having very large ID strings is going to cause performance and bandwidth problems. Try to keep them short and meaningful.
On startup, CrossStitch will attempt to get a friendly name. It uses this procedure:
node.json config file, and uses that if it exists"StateFileFolder" config value (defaults to “.”), and uses the contents of that fileThe process is nearly identical to NodeId.