Blog
Engineering

Service discovery without a server

Offline Protocol · Jun 25, 2026
engineeringservice discovery
Service discovery without a server

On the internet, finding a service means asking infrastructure. DNS resolves a name, a load balancer picks a server, a registry lists what exists. Every step assumes connectivity to something central, and when that something is unreachable, discovery fails before your request ever leaves the device.

Service Discovery, the coordination layer of Offline Protocol, inverts the model. A device announces what it can do, and nearby devices learn about it directly. There is no registry server to keep alive, because the announcement itself, carried by the devices, is the registry.

The four steps

Advertise. Any device publishes a named capability with a request/response contract: an ID, a version, and key-value capability metadata, for example the languages a translation service supports or the format a sensor emits. The registration lives in the mesh.

Discover. Peers up to 8 hops away learn of the capability through the same multi-hop routing that carries regular messages on the DORS mesh. A consumer broadcasts a discovery query, for one service ID or for everything in range, and each responding provider announces its peer ID, version, capabilities, and how many hops away it sits. Discovery works identically with or without internet present.

Authenticate. Caller and provider verify each other with OfflineID, Ed25519 identities on a trust-on-first-use model, and open an MLS-encrypted session. No CA lookup, no round-trip to a server.

Invoke. Request and response travel over the mesh with acknowledgment, retry, and deduplication. Requests are correlated by ID, so multiple invocations can be in flight at once. A device five hops away is invocable like an API endpoint.

Not mDNS

Developers searching for local discovery usually land on mDNS, Bonjour, or DNS-SD. Those protocols answer a narrower question: what is on this WiFi segment right now. They stop at the subnet boundary, they assume everyone shares an access point, and they say nothing about calling the service you found.

Service Discovery is built for the case where there is no shared network at all. Announcements travel over BLE and WiFi Direct links, cross transports mid-route, and reach peers up to 8 hops away. Discovery and invocation are one primitive: finding a service and calling it use the same authenticated, encrypted session machinery.

It is application code, not infrastructure work

All of this ships in the same TypeScript SDK as transport and identity, running on a Rust core on iOS and Android. The SDK surface is the one every developer already knows from HTTP clients. Here is what starting a node and sending over the mesh looks like:

// npm install @offline-protocol/mesh-sdk
import { OfflineProtocol, MessagePriority } from '@offline-protocol/mesh-sdk';

const protocol = new OfflineProtocol({ appId: 'my-app', userId: 'user123' });

protocol.on('message_received', (event) =>
  console.log(`From ${event.sender}: ${event.content}`));

await protocol.start();

await protocol.sendMessage({
  recipient: 'user456',
  content: 'Hello!',
  priority: MessagePriority.High,
});

Registering a capability and invoking one work through the same protocol object, with encryption, retry, and multi-hop routing as the default path rather than extra code you write.

What people build with it

The pattern shows up wherever devices need to coordinate without a broker. A device with a loaded model registers an inference service and nearby devices send it requests without cloud access. Sensors register as data providers and get queried in real time. Devices that have cached maps or firmware updates serve them to the nearest peer. At a venue, live polling, file drops, and local chat rooms register as services on the crowd’s own mesh, no app server required.

This is the only discovery-and-invocation primitive in production that survives losing the internet, running on the same network that carries 350,000+ devices across 80+ countries. The deeper walkthrough is on the service discovery page, and if you want to scope it against a real system, talk to us.

More posts
Perspective · Jul 8, 2026

The hourly cost of being offline

Perspective · Jun 9, 2026

Why the edge is disconnected