[mythtv] Getting hostname of master backend
Kevin Kuphal
kuphal at dls.net
Fri May 6 20:37:15 UTC 2005
Christopher David Petersen wrote:
>
>
> On 5/5/05, *Kevin Kuphal* <kuphal at dls.net <mailto:kuphal at dls.net>> wrote:
>
> Is there any easy way for code running on a frontend to get the proper
> hostname of the master backend for use when saving information to
> the DB
> where you have to set the hostname to the backend name, not the
> frontend
> name?
>
> Thanks,
> Kevin
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org <mailto:mythtv-dev at mythtv.org>
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
> This problem presents itself in almost every distributed system. The
> solution I've always employed is to have the "master" backend,
> database server, load distributor, etc. broadcast a "beacon" via UDP
> to a particular IP subnet. As various "slave" machines (horrible
> nomenclature, but not mine. No flames please.) are attached to the
> subnet they listen for the beacon and determine the address of its
> sender.
>
> I'm not sure whether MythTV employs such a beacon (perhaps MythTV has
> employed a better solution that I'm unaware of), but implementing such
> feature is relatively simple. When I get a MythTV development machine,
> I may even try implementing it.
>
I can probably just write the backend startup to record it's hostname in
a new setting value in the DB if it is the master.
Kevin
More information about the mythtv-dev
mailing list