Tuesday, September 20, 2011

So my test is on its way

I have been commissioned to write a distributed Backup service system. basically we’re talking about a Server element and multiple Services each polled by the server or polling the server – I have yet to decide that.

Each Service element will be able to backup a server and communicate back to the main Server element about its success or failure.

The server will then commission all the backup up data and get it to the main location.

the server will create a log detailing each services state : success/failure.

In step 2, there will be a GUI

Step 1, Design the Backup service element


For Now I have the Service element which I named BackupUtility

It asks a Factory for the right BackupEngine (I called it BackupWorker) and using IBackupWorker I manipulate it.

I Took newkie’s code from code-project (love that site btw) ThreadBase<T>.

He wrote two implementations, and using some knowhow I transformed it into a cancalable version I decided I don’t need, and reverted back. YEAY Sad smile

So now I wrote a class that implements it and adds logging to the start and finish and has some more fun parts. and a Factory to retrieve it. – had a heck of a time with log4net not reading its configuration file. – I wish log4net could just say HEY COUNLDNT FIND CONFIG FILE instead of spewing garbage when in debug mode – ooof


Next is the Parser

as the Workers are Threads and run asynchronously, 

As a worker threads are run asynchronously, the log files are also very jumbled up.  I have two options:

1) create two log files

2) parse/ sort the single log file

I’m guessing I’ll go with 1 because I think I wont know how many log files there will be until runtime. and I plan to use some version of DataTable to store my data. <this will also help in part two which is the WCF service and data transfers>


I have found a Microsoft Tool called Log Parser, so it’s a dandy

checking it out now

No comments: