At our workplace, we have a Master-Workers system with multi-threaded features that will run in a distributed network environment
At present, the Master distributes the files to the workers in a very inefficient manner by creating new wcfClients for every message pertaining to a particular file that it needs to assign to a particular worker. To elaborate, a wcfclient is
1-created
2-opened
3-used
4-closed
5-Disposed
for every file that is distributed to a particular worker. It is highly inefficient, and will reduce speed performance.
The files are text files that the Workers will need to process. There will be 1000s of files being sent out every few seconds in a very rapid manner. Please keep in mind that it is in a distributed server network environment. Could someone please tell me how I should handle the creation and use of the WCF clients? To elaborate, I do Not want to keep creating,....,using,...disposing. How can implement the system so that it works quickly and efficiently, and does Not have WCF clients that make faulty connections?