Link Local Discovery
Link Local Discovery enables nodes on the same WiFi or LAN to discover and communicate with each other directly, without any cloud dependency.
Overview
| Attribute | Value |
|---|---|
| Scope | Same local network (WiFi, LAN) |
| Cloud dependency | None |
| Communication | Direct node-to-node |
| Capabilities | Full HTTP, WebSocket, SSE |
How It Works
Link Local Discovery uses a supernode architecture:
-
Supernode election: One node broadcasts via mDNS to become the supernode. If multiple nodes start simultaneously, capability-based negotiation determines the supernode.
-
Node registration: New nodes discover the supernode via mDNS and register themselves, including their capabilities and available services.
-
Discovery queries: When a node needs to find other nodes or services, it queries the supernode, which returns a list of matching registered nodes.
-
Direct communication: Nodes communicate directly with each other. The supernode is a registry only and does not relay traffic.
Supernode Role
The supernode maintains a registry of all nodes on the local network. It does not participate in actual data communication between nodes.
Supernode responsibilities:
- Accept node registrations
- Respond to discovery queries
- Maintain heartbeat with registered nodes
Supernode election criteria:
- Device stability and uptime
- Available resources
- Network connectivity
- Stationary devices preferred over mobile
Failover: If the supernode goes offline, remaining nodes automatically elect a new supernode through capability-based negotiation.
API Usage
Discover nodes on your local network using the Insight API:
curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/nodes?type=linkLocal" \
-H "Authorization: Bearer $API_KEY"
Response (200 OK)
{
"data": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Living Room Hub",
"os": "linux",
"addresses": [
{
"type": "local",
"url": { "href": "http://192.168.1.101:8083" }
}
],
"services": []
}
]
}
Each node in the response includes a local address you can call directly:
curl -X GET "http://192.168.1.101:8083/my-agent/v1/data" \
-H "Authorization: Bearer $API_KEY"
Link-local discovery does not require a stored JWT. The API key from the addon manifest is sufficient.
Use Cases
- Offline applications: No internet connectivity required
- Low-latency: Direct node-to-node communication
- Privacy-first: Data stays on local network
- Smart home: Nodes on home WiFi
- Enterprise: Nodes on corporate LAN
Network Requirements
- All nodes on the same subnet
- mDNS (UDP port 5353) not blocked by firewall
- HTTP ports accessible between nodes
Limitations
- Same network only (cannot discover nodes on different networks)
- Some enterprise networks block mDNS
For discovering nodes across different networks, use Account-Based Discovery or Proximity Discovery.