See the assignment turn-in page (last modified on 25 February 2003) for instructions on turning in your assignment.
NLRS systems comprise two different client-server subsystems, called the the Directory and Supplier subsystems. A Supplier subsystem is responsible for providing files to clients; the Directory subsystem is responsible for keeping track of the available Supplier subsystems. A complete NLRS system comprises one Directory and zero or more Suppliers (a system with zero Suppliers won't be able to do much, but it's still a valid configuration).
Client interaction with a NLRS system is has three phases, of which the middle one is optional. Suppose client program C is looking for a particular resource (a file, say) and wants to use a NLRS system N to find the file. C performs the following:
For example, the event diagram
shows a client C searching for some resource and receiving from D the reply that Suppliers S1 and S2 have the resource. C pings both suppliers and decides that S2 is faster, and makes its resource request to S2.
The Directory D and Suppliers in a NLRS system N also interact:
Notice that only clients are pure RPC clients; they only make requests and receive replies. Both the Directory and the Suppliers act like RPC servers and clients. For example, the Directory replies to clients' search requests and make ping requests to registered Suppliers.
?
to match any single character and *
to match zero or more characters.
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().
This change may be useful to, for example, pass in the directory's host and port number to a supplier so it knows where to register.
This page last modified on 28 April 2003.