From: Robert E. <pa...@tu...> - 2004-02-04 17:56:13
|
> Another feature that would be really nice would be some sort of wildcarding > for expected host names. If I'm running Chromium between PSC machines and > Argonne vis cluster machines (with names like tg-v???.uc.teragrid.org) it > would be nice to be able to say 'Expect to hear from 32 machines with names of > that form'. As it stands now, I have to start up an interactive job at > Argonne, see what nodes I get assigned, and copy those node names into a .conf > file. Towards this end... The current mothership.py (checked in yesterday) has a first stab at something like this. It offers a config file the option of specifying a dynamic marker instead of a host name for calls like CRNetworkNode(). Syntactically, instead of specifying a host name, you specify a string starting with the pound "#" character (e.g., "#1", "#2", "#server12", etc. The mothership collects all the dynamic markers. After it starts listening for connections, but before it signals the main application to continue, the mothership will listen for connections from the servers, and will resolve markers to appropriate hostnames. (This has to be done before the main application continues, because one of the first thing the main application will do is ask for the list of servers, which must all be resolved by that point.) Constraints: - The main application cannot continue until all the dynamic servers have connected. This could reduce startup performance somewhat. - Windows Python doesn't implement signalling, so there's a race condition on that platform (as the mothership doesn't have the ability to signal the main application to continue). If the mothership and main application are running on Windows, the mothership and servers will have to be started sufficiently before the application to allow all the servers to connect (or the application will have to sleep for an undefined amount of time). - The mothership cannot be dynamic; the machine hosting the mothership must be known to all the servers (so that they can connect). - Servers cannot be autostarted via this mechanism; if the mothership is going to start the server, it clearly must know the server's name. It can't wait until the server makes contact to resolve the name (at least until we develop clairvoyant software ;-) Is this useful at all? Are there other things that can be done to make it better? (I didn't implement a syntax for matching the host name against an expected pattern, because I didn't think it necessary (would a random unexpected machine really start a crserver and make contact with an unknown mothership?), but it is still possible to implement, if it's needed.) Bob Ellison Tungsten Graphics, Inc. |