Hi,
I am about to develeop an app that is going to query hundreds or even thousands of clients for some WMI-strings over the WAN. The app will be launched as using Scheduled Task or manually when needed, and will read an text file with hostnames to contact and peform the WMI-querys. The result will be saved in a new text file this as an example:
Hostname | Date | LastBootuptime | LoggedOnUser
A123456 | 20313-04-01 | 2013-02-15 | Joe Smith
A234567 | 20313-04-01 | 2013-03-29 | John Doe
A345678 | 20313-04-01 | 2013-03-02 | Sally Johnson
I´m sure that the only way to handle all thoose calls to a lot of clients, must be done as an multi threaded solution. This in order to maintain speed and handle all possible connection problems to some off-line clinets without have to waiting for each time out e.t.c.
Here comes the 1000 dollar question:
What code structure or threading model do you recommend me to use regarding the actual Multithreading solution to use to handle the client connection & WMI-querys for each clients in the text file?
Please give me a brief code example of how it could look regarding the thread calls of sub or function.
I have done a lot of reading on this but I'am still confused regarding which thread model to use like BackgroundWorker or ThreadPooli or whats more available. Need your expertise to get started, then I can move on with the rest.
Thanx in advance :sneakiness:
I am about to develeop an app that is going to query hundreds or even thousands of clients for some WMI-strings over the WAN. The app will be launched as using Scheduled Task or manually when needed, and will read an text file with hostnames to contact and peform the WMI-querys. The result will be saved in a new text file this as an example:
Hostname | Date | LastBootuptime | LoggedOnUser
A123456 | 20313-04-01 | 2013-02-15 | Joe Smith
A234567 | 20313-04-01 | 2013-03-29 | John Doe
A345678 | 20313-04-01 | 2013-03-02 | Sally Johnson
I´m sure that the only way to handle all thoose calls to a lot of clients, must be done as an multi threaded solution. This in order to maintain speed and handle all possible connection problems to some off-line clinets without have to waiting for each time out e.t.c.
Here comes the 1000 dollar question:
What code structure or threading model do you recommend me to use regarding the actual Multithreading solution to use to handle the client connection & WMI-querys for each clients in the text file?
Please give me a brief code example of how it could look regarding the thread calls of sub or function.
I have done a lot of reading on this but I'am still confused regarding which thread model to use like BackgroundWorker or ThreadPooli or whats more available. Need your expertise to get started, then I can move on with the rest.
Thanx in advance :sneakiness: