Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
Benedikt Scholtes edited this page Aug 26, 2015 · 3 revisions

Welcome to the FidiStat wiki!

Detail of the Communications Specification

Generally every Package send is a JSON encoded string.

  • tls.h provides a read and write function.
  • void sendOverTLS(struct tls* ctx, const char *buf) sends the size, directly followed by the content of but over the connection ctx.
  • json_t recvOverTLS(struct tls* ctx)receives the size of the buffer, creates an appropriate buffer and parses this string directly to an json_object()

The first Object of each connection is send by the client, and includes:

  • from: the clientName of the client sending this package
  • auth: a very basic form of authentication against the server.
  • type: what type of connection does the server want
  • size: how many objects are coming?

Depending on the type, the client sends now exactly size packages.

  • HELLO: the client sends an array with all stats he has to offer. The server then answers with a list of stats he wants the client to bootstrap, i.e. send the graph settings.
  • NEWDATA: client sends an object including the new values for the graph
    • name: which status do these values belong to?
    • type: Graph, bar or csv (encoded as integers)
    • payload: an array of title:value pairs.
  • CREATE: After a HELLO, the client opens a new CREATE connection for each graph the server needs to bootstrap.
  • UPDATE: Same content as a CREATE, but the datapoints of the old graph are preserved.
  • DELETE: Delete all graphs from this client.
Clone this wiki locally