Overview

All communication between the Hub and other Flowee components happens over a network-enabled API. This Application Programmer Interface (API) is designed specifically for the Hub and you should understand several basic concepts that it is based on in order to get the most out of them.

Using APIs works by connecting to an endpoint of your hub. Connections happen over TCP/IP bi-directional sockets and the server doesn’t normally disconnect. Which is to say, the API is not RESTful. This is a bit different, but definitely worth it.

API requests are encapsulated in individual messages. One message for a request, and typically one message for a reply.

A message is comprised of a list of tagged-fields. Each tagged-field is a triplet of name, format and value. (specification).

Each message will have a message-id as well as a service-id . Those two make up the structure of the API. You can imagine a list of methods to call is mapped to a list of message-ids. A unique service allows for a list of methods, much like methods on a class.

Example message.

Message-headers

In the protocol I separte the message into a header and a body. The header has basic information that is used by the network-layer with details like the message id and the service id .

A full table is detailed in the SystemService page.

Services

Each and every message has a service-id which maps to a unique service provided by the server. Clients send a request message and receive an answer with the same service-id.

For more details, look at the independent services.