c# - Multi-threading in Web Application (WCF / WebAPI) -
i have "engine" want expose via http layer (hosted webapi / wcf).
this engine simple read operations on large volumes of data , can benefit parallelism. simple switch for(...) parallel.for(...) wonders.
now think shouldn't these kind of multi-threading in web server, i'm trying figure out best way host this.
ideally i'd hosted in iis standard web app either webapi or wcf. if not solution, alternative?
would better self host webapi or wcf in standard windows service? i'm not sure if issues here iis or asp.net specific.
or maybe not problem , i'm worrying much?
any inputs appreciated.
thanks
i'm not entirely clear concerns i'll try give basis on can decide:
you can use multithreading in iis/asp.net safely. of course, many parallel request don't need because parallelism happens @ higher level (in fact, thoughput suffer, slightly). few parallel requests though can reduce latency using parallelism @ lower level (parallel.for
).
so multi-threading in asp.net more reducing latency increasing throughput.
i don't see how self-hosting change of this.
you seem have little diffuse concerns viable approach. try formulate specific concerns , i'll address them.
Comments
Post a Comment