Networking
How nodes communicate, share data, and mule data
Peer-to-peer network
Delta uses a peer-to-peer network to communicate between devices. This has several advantages:
- Decentralized: There is no central server that can be attacked or taken down.
- Resilient: The network can continue to function even if some devices are offline.
- No internet requirement: Devices can be connected over any existing network, so if the internet is down, devices can still communicate over LAN, Bluetooth, or other networks.
Centralized network
If you prefer a centralized network, you can use a Delta server to act as a central point of communication. This is particularly useful if you expect devices themselves to disconnect frequently, as they can continue working on their local copies before they come back online.
Data sharing
To understand more about how data is shared between devices, see the Merging and Discovery sections.
Delta comes with an existing websocket implementation. It will establish a websocket between devices and the master node, if available.
Custom protocols
Delta encodes all messages in a custom binary format. This is to ensure that messages are as small as possible, and can be sent over low-bandwidth networks. This also allows you to use any transport protocol that is available on the device.
You can either write your own protocol, have Bruinen write one for you, or select from our upcoming offerings:
- Bluetooth: For devices that are close to each other, but not connected to the internet.
- LoRa/LoRaWAN: For devices that are far apart, but can still communicate over long distances.
Some crazy ways that you could exchange changelogs between devices include:
- QR codes: Devices could display a QR code that another device could scan.
- Sound: Devices could emit a sound that another device could pick up.
- Light: Devices could emit a light that another device could pick up.
- Carrier pigeon: Devices could send a pigeon with a USB stick attached.
At the end of the day, it’s up to you how you want to exchange data between devices. Delta is designed to be flexible and work in a variety of environments.