[ccache] globally unique hashes

Martin Pool mbp at sourcefrog.net
Tue Jun 22 00:07:33 MDT 2010


On 22 June 2010 15:36, Reuben Hawkins <reubenhwk at gmail.com> wrote:
>
>
> On Tue, Jun 22, 2010 at 4:39 AM, Martin Pool <mbp at sourcefrog.net> wrote:
>>
>> On 22 June 2010 11:42, Reuben Hawkins <reubenhwk at gmail.com> wrote:
>> > On 06/21/2010 06:06 PM, Martin Pool wrote:
>> >> On 22 June 2010 10:18, Reuben Hawkins <reubenhwk at gmail.com> wrote:
>> >>
>> >>> Hi Martin,
>> >>>
>> >>> Yes, there would need to be a daemon to respond to multicasts.  I
>> >>> think
>> >>> distcc requires setting all the hosts manually on each client (correct
>> >>> me if
>> >>> I'm wrong).  Maybe what I need is distcc servers to respond to
>> >>> multicast so
>> >>> I can avoid maintaining the servers manually on the clients...  I see
>> >>> you're
>> >>> one of the distcc developers.  Would that be a welcome enhancement?
>> >>>
>> >> Using multicast would probably still require some configuration on the
>> >> clients about which multicast group to use, etc.  Is there anything
>> >> wrong with using mdns?
>> >>
>> >>
>> > Maybe I'm misunderstanding exactly what you're suggesting.  There's
>> > nothing wrong with using mdns, but my understanding is that even with
>> > mdns, the names must still be known by the client.  For example...
>> >
>> > $ distcc-config --set-hosts "localhost c1.local c2.local c3.local ...
>> > cN.local"
>> >
>> > What I'd like to be able to do is...
>> >
>> > $ distcc-config --multicast
>> >
>> > So when distcc starts a build, it will call out to the local network,
>> > "who's running distccd?" and the servers will reply such that my local
>> > machine can automatically update its list of hosts.
>>
>> mdns has a mechanism to say "who offers this service?"  Apple's distcc
>> version in Xcode does this.  I don't know how well that works on
>> generic unix but it seems like a good place to start, and the distcc
>> list would be a good place to ask about it.
>>
>> > RFC 3307 suggest that permanent IPv6 multicast addresses can be assigned
>> > (which I haven't really looked into yet, I was just going to pick one at
>> > random for now).  I was not planning on using IPv4 at all.
>> >
>> > Is that reasonable or am I missing something?
>>
>> I don't think it would be reasonable to have one IPv6 address that is
>> "the global ccache service for the whole world."  If the address is
>> intended to be just network-wide or organization-wide, then really you
>> do have per-machine configuration, you're just choosing to hardcode it
>> into the program.
>>
>> --
>> Martin
>
> I also agree it's unreasonable to have a whole world multicast address for
> distcc.  But I'm not suggesting a global multicast address, just a link
> local address that doesn't route.  Something in the FF02:: scope.  I could
> use the link local all nodes address FF02::1, but the it would get lots of
> unwanted traffic.  Hardcoding should be ok even if it is FF02::1 (all link
> local nodes) as this is what multicast is for...right?

[please reply on the list]

This sounds a lot like a reinvention of mDNS DNS-SD, which provides a
generalized way to find a service on the local network by multicast
queries.  See eg <http://en.wikipedia.org/wiki/Apple_Rendezvous>.

-- 
Martin


More information about the ccache mailing list