Supplier initialization questions.


R. Clayton (rclayton@monmouth.edu)
(no date)


How will a supplier know about the Directory Service? Is it taken as an input
to the program? If it is, how can there be specialised code in the main which
is generated? Are you thinking of a mechanism like an init() function to be
implemented by the user code? If yes, then we may require additional
documentaion to be part of the submission code, which explains this to the user
of this code.

  You may modify your sRPC implementation to include two new input parameters
  on the server-side initialization call-spec:

    call initialize
    in int argc
    in array of string argv
    out string emsg

  Your server-side main can then construct the new in parameters from its own
  argc and argv and pass them along in the call to initialize(). Two of the
  command-line arguments passed through would be the directory's host and port.

  This is only an option; if you've already implemented something else (DIRHOST
  and DIRPORT environment variables, say), you can stick with that and needn't
  implement the new initialize arguments.

On what basis are the files selected for sharing? I mean, how does a Supplier
know which files are to be shared? Is it based on a directory which the
Supplier takes in as an input to the program? If yes, Same problem as in
question 1 exists here.

  You could do it that way, in which case the file directory would be passed
  into initialize as a command-line argument or option in argv.

  Alternatively, and in the absence of any command-line parameters, the
  supplier could serve the files in a default directory. The two most likely
  candidate default directories are the current directory in which the supplier
  is running and /tmp.
  



This archive was generated by hypermail 2.0b3 on Tue May 06 2003 - 14:00:05 EDT