c# - WCF, dealing with simultaneous requests from multiple servers -
i have block of work ive split smaller blocks. want assign each block instance of numbercruncher (each instance hosted @ unique endpoint , run on specific thread on server). instance of numbercruncher @ specified endpoint go , crunch numbers passed client proxy, before returning results in txt file format.
from client side, im assuming need keep 2 threadsafe list, 1 containing endpoints linked instances of numbercruncher waiting return results. 2nd instances of numbercruncher waiting assigned more work?
regarding adding items these lists, how possible deal multiple requests servers? 1 can added @ time, im assuming client need send message service saying "yes added list, stop requesting added."?
edit
i'm trying run analysis on time series have collected. ive written program (number cruncher) splits different parameters want check , assigns them different threads (determined number of cores in pc). each thread runs number cruncher assigned input. unfortunately taking stupid amount of time on pc when using cores. wanted run same program on several pc's (servers), , write single program allocate work servers. each simulation takes ~1hr. im looking @ 520hrs of computation time (ie not feasible single pc).
i think you're on thinking this.
in wcf have control on number of instances (single, per-session , per-request) , whether instance single or multi-threaded. not on thread-affinity of request.
and don't need to, seems me should configure instance-per-request (depends on details of coding , state-management).
you can throttle server achieve maximum capacity , acceptable latency. don't mess thread-management if don't have to.
after edit
you can use wcf distributed computing problem, specialized software exists.
you run worker pcs server, seems current direction. would:
- run 1 server splits work , administers workitems
- needs check 'overdue' items , re-issue them
- run multiple clients can ask workitems have cores
- need configured max load. cores+2 or cores-1
Comments
Post a Comment