Please note: All new versions will be located at GitHub under Waarp new project name :
http://waarp.github.com/Waarp/
The project still remains Open Source under GPL V3.
We describe here the logic of the protocol.
A simplified picture is shown here:

First we describe the different value that can be found.
A request of transfer follows a sequential logic:
The request is registered in the database with a TOSUBMIT status.
A Request that was in a INTERRUPTED status is changed in a TOSUBMIT status.
The Commander get some requests with the TOSUBMIT status and makes them as RUNNING status.
The Commander submits those requests as separates ClientRunners.
The ClientRunner first checks that the given Request is not a "Self Requested" request, meaning that only requester host can execute a ClientRunner, except if this request was in the POSTTASK step so that Requested Host can finalize the request.
The ClientRunner gets the remote requested Host address and tries to open the connection. If a network conection with the given requested host is already opened, this network connection is reused by the new ClientRunner.
The connection can use SSL support (different port than non SSL). This is an option of transfer. This option is selected while selecting the Host ID for SSL support for the remote Requested Host. This option is CPU and Memory consuming.
Once the network connection is found, a private connection (in memory connection) is opened to enable the multiplexing of this request with other requests on the same network connection. This private connection is attached to a new LocalChannelReference which references the Request, the session, the remote and private connections. A valid LocalChannelReference contains two private connection Ids, one for the local private connection, and one for the remote private connection.
A Startup Message is sent to the local private connection to initiate it.
-
The same Startup Message is sent on the remote private side (when connection occurs) to initiate the relation between them and to instantiate the same LocalChannelReference on the remote host.
Once the LocalChannelReference is OK, the Requester host sends an Authent Message in order to authenticate this host.
The Requested host sends back its own Authent Message too.
Once authenticated, the Requester Host sends the Request Message.
The Requested Host check if the authentication and the request are compatibles, check some specific options on the request itself (start, restart, ...), then it runs its Pre Task step
-
The Request is in PreProcessingOK as status.
If the Pre Task step is ok, it sends back the validated request to the Requester Host.
The validated Request is now running the Pre Task step.
Now the transmission can start. From now, this is the sender that leads the communication, no more the requester (it could be the same host however, depending on the way of transfer). The sender (which could be either the Requested or the Requester host) launch its own RetrieveRunner. This RetrieveRunner sends to the other host all DataBlock Messages.
Each DataBlock Message can include a Hash control (MD5 or SHA or other) of the packet in it (option of transfer). This option is not mandatory and is CPU consuming.
Once all DataBlock are sent, the RetrieveRunner sends an EndTransfer Message to the receiver host.
The receiver host executes the Post actions.
-
The Request is in PostProcesseingOk status.
The receiver host sends back the validated EndTransfer Message.
The Request is now on Finalize way. Sender host executes the Post actions.
Once the PostProcessing is over, the RetrieveRunner (Sender) sends to the remote host a EndRequest Message.
The remote host sends back the validated EndRequest Message.
-
The Request is now totally finished and its status is CompleteOk ALLDONE.
At each step, an error can occurs and will stop the request, setting its UpdatedInfo to INERROR or INTERRUPTED status. The GlobalStep could be in ERROR status if the ERROR step action is run.