The alternate approach might be called end-to-end check and retry. Suppose
that as an aid to coping with threat (1), stored with each file is a checksum that
has sufficient redundancy to reduce the chance of an undetected error in the file
to an acceptably negligible value. The application program follows the simple
steps above in transferring the file from A to B. Then, as a final additional step,
the part of the file transfer application residing in host B reads the transferred
file copy back from its disk storage system into its own memory, recalculates the
checksum, and sends this value back to host A, where it is compared with the
checksum of the original. Only if the two checksums agree does the file transfer
application declare the transaction committed. If the comparison fails, something
has gone wrong, and a retry from the beginning might be attempted.