Get the SDK

Architecture/Nodes & segments

Architecture

Nodes, segments, and overlay topology

Formal model of identity, membership, and reachability in the DaaS-IoT overlay mesh.

DaaS-IoT is an overlay mesh network: it builds a logical network of nodes on top of one or more existing communication systems. IP, BLE, LoRa, UART, Zigbee, MQTT, and the other drivers form the underlay; SID, DIN, mappings, and routing define the overlay.

The application addresses the node DIN. The overlay resolves the next hop, driver, and physical endpoint, allowing an end-to-end path to cross different technologies while keeping node identity and application content stable.

Formal model of the mesh

At time t, a DaaS-IoT segment with SID S can be represented as a directed, dynamic graph:

G_S(t) = (V_S(t), E_S(t))

where:

An overlay edge may represent an IP channel, a BLE connection, a serial bus, or a relationship provided by an MQTT broker.

A path exists from u to v when the following sequence of adjacencies is available:

P(u, v, t) = (u = n0, n1, ..., nk = v)

with (ni, ni+1) ∈ E_S(t) for every hop. Reachability describes whether the path exists in the graph at time t.

Node A
Node B
Node C
Node D
Overlay path A → D, composed of three heterogeneous hops.

The mesh allows each node to maintain multiple adjacencies and forward traffic over different paths and transports. Available links, mappings, and policies determine which paths can be used.

Overlay node

A node is the logical unit that participates in the mesh. Processes, gateways, mobile applications, and microcontrollers can host a DaaS-IoT instance; a single host may run multiple separate instances.

The observable state of a node includes at least:

A forwarding-enabled node receives a message addressed to another DIN and delegates it to the next hop according to the current route and policy.

Identity: SID and DIN

Operational identity is described by the pair:

I(n) = (SID(n), DIN(n))

The SID identifies the network context to which the node belongs. The DIN identifies the node within the DaaS-IoT context in which it is used. In the libdaas API, both are 64-bit values; 0 represents the initial state before assignment.

A mapping connects the logical identity to its underlay channel:

DIN -> (channel_owner, link, URI, direct_channel)

This indirection makes it possible to replace an IP endpoint, change radio technology, or route traffic through another node. The application protocol continues to refer to the DIN.

The API supports explicit initialization with doInit(sid, din) and parameter acquisition through discovery and join. When the join completes, nodeConnectedToNetwork(sid, din) reports the effective pair. The application treats both values as opaque identifiers.

Overlay segment

A segment is the logical domain identified by a SID. Formally:

V_S(t) = { n | SID(n, t) = S }

The segment establishes the context in which membership and identity are interpreted. It may span multiple IP subnets, VLANs, and radio or serial transports. The same physical infrastructure may carry distinct DaaS-IoT segments.

A node equipped with multiple drivers connects heterogeneous portions of the underlay through overlay forwarding. In API terminology, the segment corresponds to the DaaS network identified by the SID.

Mesh relationships

A correct description of the mesh requires five relationships to remain separate.

  1. Membership: two nodes declare or have acquired the same SID.
  2. Adjacency: a directly usable overlay channel exists between two nodes.
  3. Knowledge: a node has a local entry for another DIN.
  4. Reachability: a multi-hop path to the destination currently exists.
  5. Authorization: the node's policies permit the request or forwarding operation.

Each relationship describes a specific state:

The libdaas trust_* policies classify mapped nodes, nodes belonging to the same network, routed traffic, and unknown DINs. During discovery, the policy may temporarily become more permissive and then be restored.

Local knowledge and convergence

Each participant builds a local view of the topology through configuration, mappings, discovery, join, locate, and observed traffic.

The main local information is of two types:

The API exposes known nodes through listNodes() and mappings through getNodeList(). The SID stored for a peer corresponds to the most recent communication and is updated through subsequent interactions.

Routes therefore have limited validity. Their TTL limits use of a path that may have become stale; locate(din, timeout, ttl) starts a search bounded in both time and maximum hop count. Mesh convergence is the process by which these local views are updated after changes to the underlay or segment composition.

Multi-hop forwarding

For a destination reachable over multiple hops, the overlay delegates the message to an intermediate node. Each hop resolves its own next link:

logical destination DIN_D
local route: next hop DIN_B
local mapping: DIN_B -> (_LINK_INET4, URI_B)
Each hop resolves only its own next link.

The next node repeats the decision using its own view of the network. Underlay details can therefore change from hop to hop. Logical source and destination identities remain in the overlay plane; links and URIs describe delivery to the next hop.

A route remains usable while all required edges are available and the policies of intermediate nodes permit its use. A forwarding error may leave the packet queued, trigger a new route search, or produce an error state, depending on the configured options and policies.

Discovery, join, and the membership lifecycle

Discovery detects DaaS networks reachable through one or more drivers. The networkDiscovered(host_din, sid, link) event reports the host node, detected SID, and link over which the network was discovered.

Join associates the node with a discovered network:

initialstate
availabledriver
discovery ofone or more SIDs
join of theselected SID
assignment orconfirmation
operational nodein the segment
The membership lifecycle, from initial state to operational node.

If join() is called with a null SID, libdaas attempts to join the first available network among those discovered. If the node already belongs to a network, the API first leaves the current network and rebuilds communication in the new SID.

Discovery modes define node behavior:

The node responding to discovery provides an ingress point to the mesh.

Topology changes

The topology G_S(t) changes when nodes, links, or mappings change.

Join. A node discovers a segment, completes the join, and acquires the identity valid for that context. Local views update progressively.

Departure or failure. Removing a node or channel invalidates affected routes and starts a new path search.

Partition. Removing some edges temporarily divides the graph into separate components. Nodes retain their SID, DIN, and prior information; reachability remains confined to the current component.

Reconnection. Restoring a link reconnects two components. Mappings, routes, and identities are validated against the new topology.

Architectural invariants

A DaaS-IoT SDK should preserve the following invariants:

Operational model

The node is the logical actor in the network. The segment is the overlay domain identified by the SID. Adjacencies describe the channels available between nodes, while routes compose those adjacencies into multi-hop paths. Mappings and drivers connect each logical hop to a concrete transport.

A DaaS-IoT mesh crosses different underlays, updates paths as links change, and preserves an application API based on SID, DIN, and DDO.

See the topology form itself, node by node.

Open the Lab Simulator