Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thoughts on how to implement project

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hello
I have to build a windows service that will send different users a report based on their "filter". They can elect to receive thie email at any time of the day. I to keep in mind that they can request to have this sent to them as often as they like also between a start hour and an end hour. What i have implemented might not be the best way so I thought I would throw it out here for some thoughts.

What i have done
> read the db that is storing the filter
> for each row returned, create a new thread to service that filter request. I feel the need to do this because each filter may have different interval for how often to run the report or different start end times. I use a timer object and set the users defined interval to the timer.

I feel that creating multiple threads is not the best thing since I may have many filters.

Any thoughts are greatly appreciated.

Thanks,
RalphTrent
 
This is a good article about how to get the most out of threading.

I think your project is a case when threading, done correctly, could add to the performance of your service. Personally I would look for a way to group jobs into 3 or 4 categories that are similar and could use the same resources and group those into threads by themselves.

Without knowing exactly what those reports contain it would be hard for me to pick what those could be, but try to find similarities based on the resources you'll be using and see if that doesn't help you categorize your work load.

hope that helps some

Travis Hawkins
jobs.bestcodingpractices.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top