This is a great idea, I have been working on a similar scheme, but the problem I encountered is properly setting the -j# flag at compile time. How would you let your Makefile's know how many servers are available in this dynamic setup?
Here was my solution: I am running a distcc/ccache farm using samba shares for a distributed cache. Samba messages inherently provide info like hostname, IP address, etc., and also supports running a script after a message is received, so using these features... 1) machine boots up, init script tells a machine designated as the hub that it is available for compiling (via samba messages) 2) the hub relays the message to the rest of the available machines 3) addresses are distributed and stored in the distcc hosts file 4) post-message script tallys the number of addresses in the hosts file, and saves this number in another file 5) this file is included in my Makefile, so that I know which -j# is appropriate for the number of available machines on the farm However this solution is obviously not ideal for everyone. If distcc was able to manage something like this internally that would be very interesting. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dan Kegel Sent: Thursday, August 11, 2005 2:38 AM To: Dan Kegel Cc: 'distcc@lists.samba.org' Subject: [distcc] Re: Simple autodiscovery of distcc servers Dan Kegel wrote: > Experience seems to indicate that to be practical for wide deployment > in a largish organization, users must be able to use distcc without > configuring it. > > There are patches to add Rendezvous support to distcc > (see http://www.crocodile.org/lord/DistCCRendezvous.pdf for a writeup), > but being a troglodyte (and more to the point, one without > the power to install zeroconf anywhere), I prefer a simpler approach. > > Stop me if you've heard this one before. > This scheme simply requires that distcc servers > have DNS aliases distcc1, distcc2, distcc3, ... I should mention that the scheme is identical to having the hostnames distcc1 distcc2 distcc3 ... in the hosts list, except that it discards missing servers without forcing any local compilations, and ignores servers which are on a different network than distcc1. Hence my hope that it can be implemented in very few lines of code. - Dan -- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/distcc __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/distcc