summaryrefslogtreecommitdiff
path: root/PROTOCOL
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-11-15 09:42:53 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2014-11-15 09:42:53 +0100
commit75df5abae42888bd5bf01fc4a8bd1215413cab67 (patch)
tree0784bd39b43b301632751d2f68f093240f437990 /PROTOCOL
parent8f772dc3aa8df1ed52aeb83757136b508084e32d (diff)
downloadbiruda-75df5abae42888bd5bf01fc4a8bd1215413cab67.tar.gz
biruda-75df5abae42888bd5bf01fc4a8bd1215413cab67.tar.bz2
updated and fixed linenoise
history now gets read from file started to document the protocol of biruda
Diffstat (limited to 'PROTOCOL')
-rw-r--r--PROTOCOL41
1 files changed, 41 insertions, 0 deletions
diff --git a/PROTOCOL b/PROTOCOL
new file mode 100644
index 0000000..0b17c3c
--- /dev/null
+++ b/PROTOCOL
@@ -0,0 +1,41 @@
+Messages are sent over nanomsg.
+
+Message format is JSON.
+
+All messages have one string key 'op', a string key 'role' and a
+unique name field, currently 'host'.
+
+'op' can be:
+- 'discover'
+- 'register'
+
+'role' can only be:
+- 'master'
+- 'coordinator'
+- 'worker'
+
+'host' is the FQDN or hostname of a coordinator (depends on the network
+setup).
+
+Operations:
+
+Discovery:
+
+Master sends:
+
+{ "op": "discover" }
+
+Coordinators answer with:
+
+All coordinators send:
+
+{ "op": "register", "role": "coordinator", "host": "server1",
+ "cpus": 2, "os": "cpe:\/o:arch:arch:rolling", "arch": "x86_64" }
+
+The coordinator sends its own configuration to the master.
+
+On receiving a 'register' operation the master must handle accordingly,
+usually adding the coordinator as known and alive and provide new
+platforms and architectures to run workers on. Also currently scheduled
+jobs must be examined.
+