We require a simple C++ application that will monitor a folder for files, read each file and insert its' content to a DB with the filename. After inserting the file to the DB, the file should be deleted from the folder.
The application must be VERY fast, as it's expected to handle 50 files/sec.
Database fields: id, content, timestamp
Filename example: [login to view URL]
Example row:
id- abcdefg (no .xml!)
content- hello world!
timestamp- (the creation time of the file, not the insert time)
The program should sleep for 500ms if there are no files to handle.
Input folder name and connection string to the DB should be taken from dedicated environment variables (INPUT_FOLDER, DB_CONNECTION).
In case there's no connection to the DB, the files should be moved to a "failed" directory under the input folder.
Sorry for writing such a long spec, but I believe that now there is very little room for misunderstandings and it's better for everyone.
Regards,
Eyal.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Windows 2003
MS SQL Server 2005 or 2000
C++