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:
V_S(t)is the set of nodes operating in the logical context identified byS;E_S(t)is the set of overlay adjacencies usable at that time;- an edge
(u, v)means thatuhas a channel or mapping through which it can deliver traffic to next hopv; - each edge is associated with at least one link technology and a driver-specific endpoint.
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.
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:
- its
SIDandDINidentifier pair; - enabled drivers and their channels;
- known mappings between DINs, links, and endpoints;
- local knowledge of other nodes and usable routes;
- queues and policies applied to traffic;
- discovery and time-synchronization state.
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.
- Membership: two nodes declare or have acquired the same SID.
- Adjacency: a directly usable overlay channel exists between two nodes.
- Knowledge: a node has a local entry for another DIN.
- Reachability: a multi-hop path to the destination currently exists.
- Authorization: the node's policies permit the request or forwarding operation.
Each relationship describes a specific state:
- membership associates the node with a SID;
- adjacency records a direct channel;
- knowledge records local information about a DIN;
- reachability requires a valid path;
- authorization applies the local policy;
- discovery detects a candidate that will subsequently be negotiated and authorized.
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:
- known nodes, represented at least by the SID/DIN pair used in the latest communication;
- mapped nodes, associated with channel owner, link type, URI, and direct-channel indication.
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:
DIN_DDIN_BDIN_B -> (_LINK_INET4, URI_B)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:
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:
discovery_off: both discovery search and responses are disabled;discovery_sender_only: searches for existing networks;discovery_receiver_only: hosts discovery and can provide network parameters;discovery_full: performs both functions.
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:
- the application addresses the DIN; mappings and drivers resolve physical endpoints;
- SID and DIN belong to the overlay plane, while links and URIs belong to underlay adaptation;
- direct and routed communication use the same logical destination identity;
- each node makes decisions based on its own local knowledge;
- routes and mappings are dynamic information and may become stale;
- membership, reachability, and trust remain independent concepts;
- transport heterogeneity is confined to drivers and individual hops;
- each node operates on its own local view of the topology.
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.