Queue processing
As already said ftpcluster makes extensive use of a queue to increase the cluster's fault tolerance. The queue is processed by the programs
This may sound like an item for the todo list but it's not. Let's look at the upload queue. server submits files to this queue as they are uploaded and later moved to a cluster node by store. But store doesn't have any idea about the storage strategy you want. Do you want some kind of load balancing (read: balance used space) perhaps with some omission? I don't know and I don't care. Instead I leave this up to you.
Well, then how is the upload queue intended to work? Before you start your store process you can inspect the contents of the current upload queue, calculate prefered cluster nodes on whatever strategy you want and resubmit the files to the queue. You can use the store-queue for the resubmitted files to mark these jobs as already processed from the upload queue.
The same idea is true for replicate and it's queue. You create queue jobs according to your needs which are then processed by replicate.
This means simply that what ever you do the cluster's queue is safe from processed by two (or more) concurrent queue processors which would introduce various race conditions.
The lock file is usually automatically removed when the program that created it terminates. If however the program terminates unexpected (the queue processors are gawk scripts and terminate unexpected on a very low level) you might come into a situation where you have the .queue.lock but no running queue processor. In this case remove the lock file and continue.
Additionally queue file (created by one of the cluster programs) show date and time of their creation in their names. Furthermore the exist as long as there is at least one pending queue job in it. This way you can easyly monitor who old a particular queue job is.