-
Notifications
You must be signed in to change notification settings - Fork 4
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
-
flagmust be the stringconfig -
textjson representing the config file
####Setting Config Frontend -> Controller
flag: "setConfig", text: string
-
flagmust be the stringsetConfig -
textis a json string of the new configuration file
####Get Config deprecated, updates to the config file are now sent automatically
Frontend -> Controller
flag: "getConfig"
-
flagmust be the stringgetConfig
Controller -> Frontend
flag: "config", text: string
-
flagmust be the stringconfig -
textjson 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
-
flagmust be the stringcassandraNodeInfo -
textis 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
-
flagmust be the stringcassandraNodeRing -
textis the ouput from runningcassandra nodetool ring
##IPFS ####Upload JAR implementation pending
Frontend -> Controller
flag: "submit", id: string, name: string
-
flagmust be the stringsparkSubmit -
idan identifier for this submission which will be sent back with any status updates -
namethe full path+name of the file to upload on the system
Controller -> Frontend
flag: "submit", id: string, name: string, success: bool
-
flagmust be the stringsparkSubmit -
idan identifier for this submission which will be sent back with any status updates -
namethe full path+name of the file to upload on the system -
success:is a truthy representing whether submission succeeded or failed