-
Notifications
You must be signed in to change notification settings - Fork 6
Frontend Wire Protocol
While Flare uses go as a system controller for Nodes, golang is not the most extensively developed language for making web apps and frontends. The graphical interface for nodes is a meteor server which connects over websockets to the controller. Below is their communication protocol.
##Configuration File ####Sending config the controller watches the config file set in the FLARECONF environment variable for changes and pushes those changes to the frontend.
Controller -> Frontend
flag: "config"
, text:
string
-
flag
must be the stringconfig
-
text
json representing the config file
####Setting Config Frontend -> Controller
flag: "setConfig"
, text:
string
-
flag
must be the stringsetConfig
-
text
is a json string of the new configuration file
####Get Config deprecated, updates to the config file are now sent automatically
Frontend -> Controller
flag: "getConfig"
-
flag
must be the stringgetConfig
Controller -> Frontend
flag: "config"
, text:
string
-
flag
must be the stringconfig
-
text
json representing the config file
##Log Operations ####Returning Logs Controller -> Frontend
flag: "log"
, type:
string, success:
bool
-
flag
: must be the string "log" -
type
: is the type of log. must be one oftracing
,session
,spark
,sparkUI
-
success:
is a truthy representing whether retrieval succeeded or failed
####Requesting Logs Frontend -> Controller
flag: "getLog"
, type:
string
-
type
: is the type of log. must be one oftracing
,session
,spark
,sparkUI
Controller -> Frontend
flag: "log"
, type:
string, success:
bool
-
flag
: must be the string "log" -
type
: is the type of log. must be one oftracing
,session
,spark
,sparkUI
-
success:
is a truthy representing whether retrieval succeeded or failed
##Cassandra ####Cassandra Info the controller regularly polls cassandra for node info and if new data exists sends it to the frontend
Controller -> Frontend
flag: "cassandraNodeInfo"
, text:
string
-
flag
must be the stringcassandraNodeInfo
-
text
is the ouput from runningcassandra nodetool info
####Cassandra Ring the controller regularly polls cassandra for the node ring and if new data exists sends it to the frontend
Controller -> Frontend
flag: "cassandraNodeRing"
, text:
string
-
flag
must be the stringcassandraNodeRing
-
text
is the ouput from runningcassandra nodetool ring
##IPFS ####Upload JAR implementation pending
Frontend -> Controller
flag: "submit"
, id:
string, name:
string
-
flag
must be the stringsparkSubmit
-
id
an identifier for this submission which will be sent back with any status updates -
name
the full path+name of the file to upload on the system
Controller -> Frontend
flag: "submit"
, id:
string, name:
string, success:
bool
-
flag
must be the stringsparkSubmit
-
id
an identifier for this submission which will be sent back with any status updates -
name
the full path+name of the file to upload on the system -
success:
is a truthy representing whether submission succeeded or failed