Single File to Multiple Targets – approach 2

First approach as we discussed, have one process to transfer file to multiple destinations. But as we mentioned that the process will be complex and maintainability ,scale up will be expensive. So it is good to have separate process to transfer file to each target.  Also we can run each process in parallel.

We will have a separate archival process which run at last after all the files are transferred to each destination.

We can use file transfer tracking table to keep track of whether file is transferred successfully nor not.  Each process will insert a record in file transfer tracking table after successful completion.

The archival process needs to check if the file is transferred successfully or not to all the targets. We can do this by calculating number of process successfully run from file transfer tracking table. This job should be scheduled after the main file transfer processes.  Also each process can trigger archival process after completion, in that case we don’t need to schedule it separately.

Benefits:  Each process can  run in parallel. Process will be very simple and maintainability will be high. We can add new process to transfer the file to new target , without changing existing process.