Loop suppresion
Loop suppression
Loop suppression in owserver
(added version 2.4p9)
OWFS components can be linked in complex arrangements.
The most common arrangement it seen above. It allows several "front end" programs (owfs, owhttpd, owftpd, languages...) to bind to a single adapter without interference. Indeed, they share caching and can communicate remotely.
More complex arrangements are possible. Each element can connect to an arbitrary number of owservers, or adapters. And there is a risk of this topology:
Messages sent from owfs or owhttpd will find both adapters, but then continue looping around indefinitely. Even worse, an arrangement like this:
would have each message increase geometrically.
Antiloop algorithm
Each message from an owserver, has an identifier placed at the end. The identifier (16bytes) is unique to the owserver. Incomming messages to an owserver have their list of identifiers scanned, and if the owserver's tag is already there, it's a loop and isn't processed.
Previous page: owserver protocol
Next page: tcp messages