id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 750,Patch: Add simple ability for frontend to autodiscover backend server,Sean.Jensen@…,Isaac Richards,"This is a fairly simple enhancement to the MythTV system. Granted there's mfd and some other things going on that are very similar and when finished will make this patch look silly but for the time being there's no way for a frontend to automatically figure out where the backend system is. This I believe is a problem, and so I've decided to try and fix it. The problem is that the end user must specify all the details (database IP, database name, username, and password) of where the backend server is. I believe that to most end users, and even developers (like myself) find this not a fun task to do. So to solve this I created ZeroConfig; yes I realize that mfd has a plugin called ZeroConfig, which is quite simple. When the mythbackend starts up a separate thread is started containing a listening UDP server which listens for broadcasts from the mythfrontend. If it catches a packet containing such a broadcast it then responds by telling the frontend the details needed to connect. (***WARNING*** This is not secure, and is/was never meant to be. ***END WARNING***) Example exchange: {{{ Frontend: Sends udp broadcast message ""MYTHTVDISCOVER"" Backend: Receives udp broadcast message Sends ""dbHostName:vvv;dbUserName:www;dbPassword:xxx;dbType:yyy;dbName:zzz"" Frontend: Receives response Tries to connect using the response's parsed data If failed goes to standard startup (aka ask user for information) }}} The reason everything is in clear test is that the mythbackend is probably on a private network and the mythfrontend is on the same private network. Since these are private networks sending data in the clear (database name, IP, username, and password) is okay. To be on the safe side ZeroConfig is not enabled by default on the backend; on the frontend it is, to enable it you must pass the parameter '--usezeroconfig' when starting mythbackend. The result in this patch allows people the simplicity of being able to start mythbackend on a server in another room or on the same machine as mythfrontend, and then start mythfrontend and it finds the backend with out any user input. The limitation of this software is that only Live (I assume, I don't use this feature), and recorded TV work currently. The reason for this is that some of the other plugins (mythmusic, mythvideo, etc) assume that the filesystem(s) containing the data are mounted locally on the frontend machine; this is usually done via nfs or smbfs (Personally I would prefer to see everything streamed from the backend server with out the need for the frontend to mount any filesystems other than it's local ones, but this is just my view)",patch,closed,minor,0.20,mythtv,head,low,wontfix,zeroconfig autoconfig,,0