Industry problems

Building offline mesh in-house vs using an SDK: what does it cost?

Building an offline mesh in-house means writing and maintaining discovery, both Bluetooth roles on each platform, routing with hop limits and duplicate suppression, retries and an outbox, encryption and identity, sync, and handling for each platform's permission and background rules, then testing all of it on real devices. Using an SDK replaces most of that engineering with a license and, if you use hosted services, usage fees. Which costs less depends on your team, your timeline, and how central the mesh is to your product.

Learning objectives

After reading this article you will be able to:

  • List the parts an in-house phone mesh needs, from discovery to platform rules
  • Describe the failure boundaries worth testing on real devices whichever path you choose
  • Compare SDK license, usage fee and integration costs with building in-house

The question behind the question

“Build or buy?” is usually asked as a cost question, but the real comparison is between two kinds of cost. Building turns the mesh into engineering work your team owns for as long as the product exists. Buying turns most of it into a license, usage fees for any hosted services, and a dependency on someone else’s roadmap.

Neither is free, and neither number is meaningful until you list what the mesh actually has to do.

What an in-house mesh has to include

Discovery and links on each platform. Two phones can only connect over Bluetooth Low Energy if one advertises and accepts connections while the other scans. Android’s BLE guide states that two devices that only support the central role cannot talk to each other, so each phone needs both roles: CBPeripheralManager and CBCentralManager on iOS, the advertiser, GATT server, and scanner on Android.

Framing. Messages must be split to fit the negotiated link size and reassembled on the other side, with a way to notice missing pieces.

Routing. Forwarding for other devices, with unique message identifiers, a hop limit, and duplicate suppression so traffic does not circle.

Delivery. Acknowledgments, retries with backoff, an outbox that survives restarts, expiry, and clear failure reporting.

Encryption and identity. Device keys, a way to verify them, and end-to-end encryption so relaying phones carry content they cannot read. For groups, a protocol such as MLS (RFC 9420) handles members joining and leaving with forward secrecy and post-compromise security; implementing or integrating it is its own project.

Shared data, if needed. Merge rules for state edited on several devices while apart.

Platform rules. iOS limits what a Bluetooth app can do in the background and documents how its behaviour changes there. Android asks for separate Bluetooth permissions to scan, advertise, and connect from Android 12. Both change between OS releases, so this part is never finished.

Testing is part of the cost

Every part above needs testing on real devices: mixed iPhone and Android pairs, several manufacturers, foreground and background, crowds rather than pairs, and long disconnections. Offline Protocol’s own production guide lists boundaries worth testing whatever you choose:

  • internet disconnected while peers keep communicating
  • a peer partition, local work, and later reconnection
  • process termination and restart with pending records
  • queue expiry and capacity exhaustion
  • rejected or duplicate business operations
  • backend outage, recovery, and reconciliation

An in-house team carries all of this for every OS release. An SDK vendor carries the protocol part, and you still test your own workflow on your own hardware.

What using an SDK costs

SDK costs come in three parts, and vendors combine them differently:

  • License. Permissive, copyleft, or commercial terms. Check what your distribution model needs, especially for closed-source apps and app stores.
  • Usage fees. Some vendors charge per monthly active user or per message for the SDK itself; others charge only for optional hosted services.
  • Integration and testing. Still needed for your own workflow and hardware.

For Offline Protocol, from its live pricing page: the mesh SDK is free under AGPL-3.0-only, including in production, when the product meets the license’s obligations. Closed-source apps, Apple App Store apps, and closed-source firmware need the commercial license, which is annual and has no published price; paid evaluations of one workflow run 4 to 16 weeks and are priced to scope. Traffic that moves device to device over a local transport is never metered on any plan. Hosted services are optional and metered: plans run from Free at $0 to Pro at $99 and Scale at $499 a month, with quotas for OfflineID users, hosted relay deliveries, telemetry events, and location verifications.

How to decide

  1. List the parts you need. A two-phone handoff needs far less than a group chat across a crowd.
  2. Estimate each part with your own team, including testing and the ongoing cost of OS changes.
  3. Price the SDK options on license, usage fees, and the hosted services you would actually use, read from each vendor’s pricing page on the day.
  4. Weigh control against focus. Building gives full control and full responsibility. Buying lets the team spend its time on the product, at the cost of a dependency.

If the mesh is your product, building may be the point. If it is a feature that keeps your product working when the network fails, weigh the parts list above against the time your team would spend owning it.

Frequently asked questions

How long does it take to build a phone mesh in-house?

It depends on the team, the platforms, and what the mesh must do, so any single number would be a guess. List the parts above, decide which you need, and estimate each with your own engineers, including the device testing.

Is an open-source SDK free to use in a commercial product?

It depends on the license. Permissive licenses ask little. Copyleft licenses such as the AGPL let a business use the code in production if it meets the license's obligations; for the Offline Protocol mesh SDK, closed-source apps, Apple App Store apps, and closed-source firmware need the commercial license instead.

Build it with Offline Protocol

The production guide lists the deployment contract to record, the failure boundaries to test, and what to operate, which applies whether you build the mesh yourself or adopt the SDK.

Read production qualification