Occasionally a large file is dropped into a Windows folder on our corporate Internet, and whenever it is, it should be inserted into a staging table in the database.
The database will consume the staging table on a schedule. The Oracle database is on the UNIX side, and the files are on the Windows side.
What I have tried:
(1) I have mostly finished implementing a Windows service in C# which continuously watches the folder for changes given an XML config file, and
(2) I have finished implementing an efficient importer which uses the Managed Oracle Client if it is given the file name and the same XML config file.
Question:
How do I connect the two components using best practices? I want to have (1) call (2) spawning a separate thread for each file. So do I use Threading, Background Workers, or Tasks?
I like the idea of an event which fires when a new large file has finished changing.
I like the idea of subscribing to this event and doing whatever you like with that knowledge.
Yet I want to keep it simple.