pcp
[Top] [All Lists]

PCP Updates: Implement fche's Threading Algorithm for Active Probing

To: PCP Mailing List <pcp@xxxxxxxxxxx>
Subject: PCP Updates: Implement fche's Threading Algorithm for Active Probing
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Tue, 03 Jun 2014 12:31:30 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
Hi,

As part of his review, fche suggested an alternate threading algorithm for service discovery via active probing. His algorithm utilizes a pool of threads contending for the next available address+port and attempting connections until no more address+port combinations remain. The algorithm simplified several aspects of the implementation, including eliminating the need to count processed addresses, more robust cleanup and making it easier to handle more than one port for a given service.

He mentioned abandoning the retry when a socked cannot be created due to EAGAIN, suggesting that TCP should be able to handle this. I left this in because it would be difficult to try again with another thread, since the algorithm would already have advanced past the address+port combination in question.

Pushed to the brolley/dev branch of pcpfans.

Dave

--------------------------------------------------------

commit c8e9b3dc926d0285db06d94207ec36f29f8e3678
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Tue Jun 3 12:01:54 2014 -0400

    Implement fche's threading algorithm for active probing.

<Prev in Thread] Current Thread [Next in Thread>