Notes on homework 3
The actual assignment page is here.
For question 4, where you have to write the RPC stubs, feel free to
make reasonable simplifications to the performance of your
implementation. For example, my sample solution makes the following
Other simplifications that might be reasonable could include:
- The queues only hold Integers, which simplifies
converting the memory objects for transmission and reception.
- Each server machine serves only a single queue, so all clients
connecting to that server get the same queue.
- The underlying PriorityQueue object for the server is
passed as an argument to the server stub constructor.
- The address of the server to connect to is passed as an arugment
to the client stub constructor.
It is less reasonable for the server to assume that there is only one
client ever. After one client is done processing the server
needs to be able to accept connections from other clients.
- There is only ever one client running at a time (avoids a bunch of
synchronization and threading issues at the server)
Your server stub will probably need to have a member function which
actually implements the server loop. For example, the code that
drives the server in my implementation does the following:
PriorityQueue q = new PriorityQueue ();
PQServerStub s = new PQServerStub (q);