← Back to context

Comment by kragen

8 days ago

Flooding does work for sending individual messages from user A to user B at a small enough scale, but it gets progressively less efficient as the network grows, and at some level it will collapse.

Flooding works if there is not too much hops between the sender and the recipient. For indoor IoT, it is very rare to have more than 3 hops and the data rates are extremely low and messages are just few bytes (on/off light, temperature).

It would only take 4 people at 5 hops apart trying to exchange photos of less than a megabyte to completely saturate a network of hundred devices.

  • It depends on how often they're exchanging those photos, but it doesn't depend on the number of hops, or even the number of nodes, just the total number of publishers and the bandwidth desired by each publisher. In flooding every message gets transmitted (eventually) by every device, so the bandwidth available for the average publisher is the bandwidth of the slowest device divided by the number of publishers, regardless of how many hops or nodes there are.

    • No, because messages have a TTL precisely to avoid continuously flooding of the entire network, or messages looping, etc. Without this, all the links would quickly become saturated, as would the caches, and the network would collapse.

      Ideally, the TTL should be as low as possible in order to preserve maximum bandwidth and not hit nodes far from the transmitter.

      The Bitchat documentation indicates that the maximum TTL is 7. There is also mention of gateways on the internet to enable long-distance communication.

      In the case of IoT devices, their location is generally fixed and the gateway or hub is placed in the centre in order to limit the TTL, save bandwith, limit wakeup time. Some more advanced mesh network protocols use flooding only for announcements and network mapping in order to avoid this problem. This allows it to define preferred routes, set up an acknowledgement system, replay, etc.

      1 reply →