Specialist or generalist threads.
Hi, I'm working on a system where objects go through some steps.
1st. Mostly database queries
2nd. Mostly hd I/O and xml parsing
3rd. Mostly Webservice communication
4th. Mostly Xml serialization and deserialization
5th. Some optional work
The system need to work with some thousands of objects per hour, so I'll be using a lot of threading, but my question is, whats the best approach?
Some specialist threads for each step: like 5 threads on each step, some threads get objects on 1st step, work on them, update the status on those objects, so another specialist thread on 2nd step get those objects and work on this.
All generalist threads, each thread get some object from step one and goes until the end of step 5.