I need to create a simple .net application (no gui required, hence would prefer console application) that will be deployed into the server. The main objective of this application is to read a queue table (which is populated from a backend process) where each record has a CLOB and create spreadsheet and dump the CLOB into the spreadsheet. This spreadsheet needs to be FTPd to a different server. After processing each record, the processed ones will be deleted from the table.
I'm thinking of implementing this using publisher/subscriber patter. Publisher part takes care of reading from table, create and dumps to spreadsheet and notifies the subscriber.
The subscriber ftp's the file and delete the record from the table.
I thought to run this application indefinitely and using a timer, the table will be poll every 30mins and process the record. But now we decided not to run this application indefinitely. Instead this will be invoked once a day using scheduler and the application has to close automatically after processing all the records in the table.
Should I use pub/sub patter for processing? if yes, how do I detect the completion of processing in subscriber?
If not pub/sub pattern what would be best approach?
Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire