Flooding algorithm

From Wikipedia, the free encyclopedia

flooding algorithm
flooding algorithm
flooding algorithm with ack messages
flooding algorithm with ack messages

A flooding algorithm is an algorithm for distributing material to every part of a connected network. The name derives from the concept of inundation by a flood.

Flooding algorithms are used in systems such as Usenet and peer-to-peer file sharing systems and as part of some routing protocols, including OSPF, DVMRP, and those used in ad-hoc wireless networks.

There are several variants of flooding algorithm: most work roughly as follows.

  1. Each node acts as both a transmitter and a receiver.
  2. Each node tries to forward every message to every one of its neighbors except the source node.

This results in every message eventually being delivered to all reachable parts of the network.

Real-world flooding algorithms have to be more complex than this, since precautions have to be taken to avoid wasted duplicate deliveries and infinite loops, and to allow messages to eventually expire from the system.

Flooding algorithms are also useful for solving many mathematical problems, including maze problems and many problems in graph theory.

Contents

[edit] Disadvantages of Flooding

There are several disadvantages with this approach to routing. It is very wasteful in terms of the networks total bandwidth. While a message may only have one destination it has to be sent to every host. This increases the maximum load placed upon the network.

Messages can also become duplicated in the network further increasing the load on the networks bandwidth as well as requiring an increase in processing complexity to disregard duplicate messages.

A variant of flooding called selective flooding partially addresses these issues by only sending packets to routers in the same direction.

[edit] Advantages of Flooding

The main advantage of flooding is the increased reliability provided by this routing method. Since the message will be sent at least once to every host it is almost guaranteed to reach its destination.

[edit] See also

[edit] Examples

  • Ricochet A flooding networking app written in Java
Languages