From d6d77e6b02675b8d663df878b8bc7c85ecd4f9c6 Mon Sep 17 00:00:00 2001 From: postmannen Date: Wed, 3 Feb 2021 08:28:21 +0100 Subject: [PATCH] updated doc --- README.md | 36 ++++++++++++++++++++++++++++++++---- publisher.go | 4 +++- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9a1fbc5..22242f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,32 @@ # steward -Async management of Edge units. +Async management of Edge Cloud units. +The idea is to build and use a pure message passing architecture for the control traffic back and forth from the Edge cloud units. The message passing backend used is + +```text + ┌─────────────────┐ + │ │ + │ │ + │ ┌────────────┐ │ + │ │ Edge Unit │ │ + ┌─────────────────┐ ┌─────────────────┐ │ └────────────┘ │ + │ │ │ │ ────Event────▶ │ │ + │ ┌────────────┐ │ ─────Event────▶ │ ┌───────────┐ │ ◀────ACK ───── │ │ + │ │ Management │ │ │ │ Message │ │ └─────────────────┘ + │ │ station │ │ │ │ broker │ │ ┌─────────────────┐ + │ │ │ │ │ └───────────┘ │ │ │ + │ └────────────┘ │ ◀─────ACK ───── │ │ ────Event────▶ │ │ + │ │ │ │ ◀────ACK ───── │ ┌────────────┐ │ + └─────────────────┘ └─────────────────┘ │ │ Edge Unit │ │ + │ └────────────┘ │ + │ │ + │ │ + └─────────────────┘ +``` + +## Disclaimer + +All code in this repository are to be concidered not-production-ready. The code are the attempt to concretize the idea of a purely async management system where the controlling unit is decoupled from the receiving unit, and that that we know the state of all the receiving units at all times. ## Concepts/Ideas @@ -18,7 +44,7 @@ Async management of Edge units. Subject naming are case sensitive, and can not contain the space are the tab character. -`..` +`...` Nodename: Are the hostname of the device. This do not have to be resolvable via DNS, it is just a unique name for the host to receive the message. @@ -26,12 +52,14 @@ Command/Event: Are type of message sent. `command` or `event`. Description of th Method: Are the functionality the message provide. Example could be `shellcommand` or `syslogforwarding` +Domain: Are used to describe what domain the method are for. For example there can be several logging services on an installation, but rarely there are several logging services in place for the same Domain using the same logging method. By having a specific Domain field we will be able to differentiate several loggers having for example `method=syslogforwarding` where one might be for `domain=nginx` and another for `domain=apache`. + ##### Complete subject example For syslog of type event to a host named "ship1" -`ship1.event.syslogforwarding` +`ship1.event.syslogforwarding.nginx` and for a shell command of type command to a host named "ship2" -`ship2.command.shellcommand` +`ship2.command.shellcommand.operatingsystem` diff --git a/publisher.go b/publisher.go index c729465..7fdc854 100644 --- a/publisher.go +++ b/publisher.go @@ -156,7 +156,9 @@ type subject struct { // process are represent the communication to one individual host type process struct { messageID int - // the subject used for the specific process + // the subject used for the specific process. One process + // can contain only one sender on a message bus, hence + // also one subject subjects subject // Put a node here to be able know the node a process is at. // NB: Might not be needed later on.