Protocol — A description of how we communicate

Because we have both ends of the wire we are going to use twisted’s Perspective Broker (PB) protocol.

This should allow us to perform remote procedure calls.

However PB is not designed for large files, not will it take them (limits will stop us), so to transfer files between clients we will use an FTP server and client pair. Both of these will be hosted by twisted.

PB objects

There are two major classes of objects that are involved, Server side and Client side. Obviously server side objects are found on the server and client side on the client.

Server side

The server side objects are responsible for handling client identities and there current status.

On connection a HBQueue object is created on the server and passed back to the client. This objects references the jobs assigned to the client, and the client is then responsible for carrying out the jobs.

Along side the HBQueue object there exist HBJob objects. These objects contain information on what needs to be done, and provide remote calls to allow the client to request resources from the server required to complete a job.

Client side

The client side objects exists just allow the server to control them. Using client side objects the server can force the client to send a status update, or get it to stop a job etc.

After the client connects and retrieves its HBQueue object reference, it creates a HBClient object which is passed back to the server. This object allows the server to instruct the client to stop partial jobs, or force a status update etc.

Note:

We have this the wrong way around. When the client connects it can request the root object from the server. After that the client can pass an object to the server using remote calls on the root objects.

This would mean that when we connect the client would get the remote object, then register with the server by passing it a HBClient object, and get HBQueue object in return.

From here the server would add new HBJob items to HBQueue objects. From here it use the HBClient objects to inform the clients of an update to their HBQueue.

The client then retrieves the new info, and starts working on the new HBJob, or leaves it in waiting. Where the server may then decided to reshuffle the HBJob objects between HBQueues.

Project Versions

Table Of Contents

Previous topic

HBClasses — Documentation on the basic classes

Next topic

Sending files

This Page