Blog Archive

Monday, October 25, 2010

VsWEBInterface

This module is used to collect files from VSWEB FTP server and send back the final file. It will contain two modules one for collecting the files from FTP and the other one is for sending the file back to the VSWEB. Logic is given below
• Main Module
o Start thread for collecting the file (Collection Module)
o Start Thread for sending the files (Send Module)
• Collection Module
o Collect the list of providers configured for FTP file collection. Use the table Named FtpInfo
o Start a fixed number of threads at a time. Each thread will handle one provider’s file
o If all threads are running wait till any one of them comes out.
o Then start thread again without exceeding the set limits
 Download Thread functionality
 Connect to corresponding directories in a loop and see whether there is any file to download
 Thread will receive structure containing the provider info(path,providerID etc)
 It will then iterate the folder and download files one by one to ATFAS folder
 Check whether same file is exist in the folder and of same size if so skip the downloading
 Once file is completely down loaded create an entry in AudioFileList table
 If backup is enabled move file to backup folder
 Exit from the thread if all files finished
Later we will implement a PHP service to know the new files arrived there and use that for efficiently downloading the file

No comments:

Post a Comment