[mythtv] Getting hostname of master backend

Christopher David Petersen christopher.david.petersen at gmail.com
Fri May 6 20:41:37 UTC 2005


On 5/6/05, Kevin Kuphal <kuphal at dls.net> wrote: 
> 
> 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
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> 

Oh. I mis-understood the question. I (incorrectly) assumed that the purpuse 
of knowing the hostname of the backend was to find the database (which is 
often running on the same host).
 My mistake?
 -- 
Christopher David Petersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20050506/3d29a0d6/attachment.htm


More information about the mythtv-dev mailing list