Changeset - ed5f06b073e4
[Not reviewed]
Merge default
0 2 0
Nathan Brink (binki) - 16 years ago 2009-04-30 18:07:34
ohnobinki@ohnopublishing.net
merge
2 files changed with 11 insertions and 14 deletions:
0 comments (0 inline, 0 general)
etc/distren.conf
Show inline comments
 
@@ -5,6 +5,8 @@
 

	
 
/*
 
  currently, server's are only supported rudimentarily. If a job has n frames and there are s servers, n / (s + 1) frames will be sent to each individual server and also rendered on the machine the job was submitted to. There will be no recursive distribution of jobs, but I want to make that possible in the future. AND, I want job IDs to have significance based on 1: the files, 2: the versions of software used to render just like git, mercurial, or bazaar's commit IDs have significance. This will allow global distribution of renderjobs without requiring central servers to coordinate the jobs - a network only need be distributed. And complex algorithms based on timeouts and completion of jobs should allow slow servers to reassign jobs to fast ones and, possibly, find shorter routes to return the resulting images to the original job submitter.
 

	
 
  Just a pointer, for the multiple server architecture, we would need to designate one server as a "master" server to avoid obvious issues. We can code it flexibly though. --Normaldotcom
 
*/
 
server protofusion
 
{
 
@@ -12,6 +14,7 @@ server protofusion
 
  username = "distrenc"
 
  /* method's use is not implemented, ssh is the only option atm ' */
 
  method = "ssh"
 
  type = "backend"
 
}
 

	
 
server ohnopublishing
 
@@ -19,6 +22,7 @@ server ohnopublishing
 
  hostname = "ohnopublishing.net"
 
  username = "distrenc"
 
  method = "ssh"
 
  type = "working-mirror" /* Or frame processor, storage, webinterface, etc. */
 
}
 

	
 
client
src/client/distren.c
Show inline comments
 
@@ -40,9 +40,9 @@
 
int main(int argc, char *argv[])
 
{
 
  struct options_common *options;
 
  
 

	
 
  cfg_t *cfg;
 
  
 

	
 
  cfg_opt_t cfg_opts[] =
 
    {
 
      CFG_STR_LIST("render_types", NULL, 0),
 
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
 
  int i;
 

	
 
  i = 1;
 
  
 

	
 
  if(options_init(argc, argv, &cfg, cfg_opts, "client", &options))
 
    {
 
      fprintf(stderr, "error getting configuration\n");
 
@@ -71,9 +71,7 @@ int main(int argc, char *argv[])
 
  //strcat(username, hostname);
 

	
 

	
 
  if( i == 1 ){
 
    // Create new account on the server if no username exists
 
    // THIS no longer SEGFAULTS!! YAY
 
  // SSH's to client machine with the username speficied.
 
    char buf[10];
 
    struct execio *testrem;
 
    char *execargv[] =
 
@@ -102,14 +100,9 @@ int main(int argc, char *argv[])
 
	fprintf(stderr, "read \"%s\"\n", buf);
 
      }
 
    execio_close(testrem);
 
  }
 

	
 
  else
 
    {
 
      printf("Well now, you must have registered!\n");
 
      /* put code here to ssh to zserver2 w/ execio as the user from the conf file */
 
    }
 

	
 
  // Can we prune off some of this code up here^? I'm not exactly sure how execio returns output, but it seems like more could be happening in execio itself, and less happening where it is actually called.
 
  // We need some code to ssh, and if the SSH fails, tell the user to register.
 
  // Killed the user reg code, as the php interface will take care of this. Although it should check for users...
 

	
 
  options_free(options);
 
  return 0;
0 comments (0 inline, 0 general)