Skip to main content

Edge modes

Edges in a federation are in one of three possible modes - INTERACTIVE, ONLINE, or AUTONOMOUS. The modes indicate to what extent the edges interacts with the server.

ModeInteractivityEdge queriesCreation
INTERACTIVEHave an uplink to the server. Edge state can be set from the server, which will trigger a poll from the edge.Possible to send continous queries from the server and see the results.Default mode for edges.
ONLINEHas no uplink, but polls the server at regular intervals. Edge state can be set from the server, the request will await next poll.Runs models and queries independently. To store the results and send to the server when connecting, use Store and Forward.Set an edge to online explicitly.
AUTONOMOUSNot reachable from the server at all, managed individually.No, only runs models started at the edge.Start the SA Engine instance at the edge in autonomous mode.

Viewing and changing edge mode

All edges have a specific state which includes the edge mode. It also shows which models are loaded and the last load errors.

To get the state of an edge, call

edge:actual_state("EDGE_NAME");

This will return a record that specifies the edge mode, loaded models and load errors, for example

{"models:loaded":[],"last_load_errors":[],"edge_mode":'INTERACTIVE'}

To set the mode of an edge, use edge:set_mode, for example this query will set the mode of "edge_name" to ONLINE.

edge:set_mode("edge_name", "ONLINE");

It is convenient to use interactive edges while developing models. For large fleets in production, it is advisable to use online mode to limit the load on the server.